You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
875 B

#ifndef GOOGLE_TILE_H
#define GOOGLE_TILE_H
6 months ago
#include <opencv2/opencv.hpp>
#include <string>
#include <vector>
6 months ago
struct TileInfo
{
int x;
int y;
double north;
double south;
double east;
double west;
};
class googleTile
6 months ago
{
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:
6 months ago
void generateTiles();
6 months ago
private:
cv::Mat image_;
std::vector<std::pair<double, double>> geoCorners_; // 左上、右上、右下、左下
int zoom_;
cv::Point2f latLonToGlobal(double lat, double lon);
std::pair<double, double> globalToLatLon(const cv::Point2f& pt);
cv::Mat computeHomography();
};
#endif // GOOGLE_TILE_H