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.

93 lines
2.0 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(std::string cachedir = "./cache");
~UnderStitch();
UPanInfo Init(FrameInfo info);
5 months ago
void SetOutput(std::string filename, std::string outdir);
BYTE8 GeoStitch(GD_VIDEO_FRAME_S img, FrameInfo para);
// 实时裁切瓦片
void CutTileRealTime();
// 接收帧
SINT32 ReceiveFrame(GD_VIDEO_FRAME_S img, FrameInfo para);
// 处理帧
SINT32 ProcessFrame();
// 输出地理产品:kml png全景
bool ExportGeoPng();
//
bool ExportGoogleTile();
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;// 融合模块
private:
UPanInfo _panPara;//全景图配置
TileInfo _panTile;//全景图瓦片配置
5 months ago
cv::Mat _H_pan;//全景图投影矩阵:从地理系到全景地图
vector<TileInfo> _taskTilesVec;//划分的小瓦片方案
cv::Mat _panImage;
cv::Mat _panMask; //覆盖区域遮罩
int _totalFrameCnt;//处理帧计数
private:
string _kmlPath;
string _filename;//输出文件标识
string _outDir;//输出拼接成果路径
string _cacheDir;//缓存路径优先使用SSD
};