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.

78 lines
1.7 KiB

#include "API_UnderStitch.h"
#include "opencv2/opencv.hpp"
5 months ago
#include "Arith_GeoSolver.h"
#include "Arith_FeaMatch.h"
6 months ago
#include "StitchStruct.h"
6 months ago
#include "Arith_BATask.h"
#include "FileCache.h"
#include "GoogleTile.h"
5 months ago
#include "Arith_BlendMap.h"
class UnderStitch :public API_UnderStitch
{
public:
UnderStitch(SINT32 nWidth, SINT32 nHeight);
~UnderStitch();
UPanInfo Init(FrameInfo info);
5 months ago
BYTE8 GeoStitch(GD_VIDEO_FRAME_S img, FrameInfo para);
// 接收帧
SINT32 ReceiveFrame(GD_VIDEO_FRAME_S img, FrameInfo para);
// 处理帧
SINT32 ProcessFrame();
// 输出地理产品:kml png全景
bool ExportGeoPng(std::string dir, std::string name);
//
bool ExportGoogleTile(std::string dir, std::string name);
public:
6 months ago
GD_VIDEO_FRAME_S ExportPanAddr();
// 全景图地理信息计算
PointBLH getBLHFromPan(cv::Point2f ptInPan, cv::Mat _H_panPara);
cv::Point2f getPanXYFromBLH(PointBLH ptInBLH, cv::Mat _H_panPara);
5 months ago
private:
cv::Mat getAffineFromGeo2Pan(UPanInfo _pan);//计算全景图投影,从地理系到全景地图,统一计算
UPanInfo InitMap(FrameInfo info);
private:
vector<KeyType> _recvFrameKey;// 接收帧总表
FileCache<FrameCache>* _cache;//文件缓存,存储外部传入的原始帧信息以及预处理结果
private:
googleTile _googleProduct;
5 months ago
GeoSolver* _GeoSolver;//外参计算
FeatureMatcher* _FeaMatcher;//特征匹配
6 months ago
BA_Task* _BATask;//BA
5 months ago
MapBlend* _BlendTask;// 融合模块
UPanInfo _panPara;//全景图配置
5 months ago
cv::Mat _H_pan;//全景图投影矩阵:从地理系到全景地图
cv::Mat _panImage;
cv::Mat _panMask; //覆盖区域遮罩
int _totalFrameCnt;//处理帧计数
};