#ifndef GOOGLE_TILE_H #define GOOGLE_TILE_H #include #include #include struct TileInfo { int x; int y; double north; double south; double east; double west; }; class googleTile { public: googleTile(); ~googleTile(); public: // 输出kml png void ExportGeoPng(cv::Mat _pan, TileInfo info, std::string dir, std::string name); // 输出tile void ExportTile(cv::Mat _pan, TileInfo info, std::string dir, std::string name); public: void generateTiles(); private: cv::Mat image_; std::vector> geoCorners_; // 左上、右上、右下、左下 int zoom_; cv::Point2f latLonToGlobal(double lat, double lon); std::pair globalToLatLon(const cv::Point2f& pt); cv::Mat computeHomography(); }; #endif // GOOGLE_TILE_H