#ifndef GOOGLE_TILE_H #define GOOGLE_TILE_H #include #include #include class googleTile { public: struct TileInfo { int x; int y; double north; double south; double east; double west; }; googleTile(const cv::Mat& img, const std::vector>& geoCorners, int zoom, const std::string& outputDir); void generateTiles(); private: cv::Mat image_; std::vector> geoCorners_; // 左上、右上、右下、左下 int zoom_; std::string outputDir_; cv::Point2f latLonToGlobal(double lat, double lon); std::pair globalToLatLon(const cv::Point2f& pt); cv::Mat computeHomography(); void generateKML(const std::vector& tiles); }; #endif // GOOGLE_TILE_H