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.

129 lines
2.3 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "Arith_CommonDef.h"
#include "opencv2/opencv.hpp"
#include "PlatformDefine.h"
using std::vector;
using cv::Point2d;
using cv::Point2f;
using cv::Mat;
using cv::Mat_;
// 下视拼接参数控制
struct UPanConfig
{
bool bUseBA;//开启BA
bool bOutFrameTile;//输出单帧正射图
bool bOutGoogleTile;//输出谷歌瓦片
};
// 帧内外方位元素
struct FrameInfo
{
int nFrmID;//帧编号唯一ID
AirCraftInfo craft;
CamInfo camInfo;
ServoInfo servoInfo;
int nEvHeight;//相对高差
int nWidth;
int nHeight;
};
// 下视全景图配置
struct UPanInfo
{
int m_pan_width;
int m_pan_height;
float scale;// 比例尺
float map_shiftX;// 平移X
float map_shiftY;// 平移Y
};
// 匹配关系网BA的边
struct Match_Net
{
int imgNo; //! image no. start from 0
vector<int> relatedImgs; //! the position index of overlap-image in visitOrder
vector<vector<Point2d> > PointSet;
};
#define IMG_CACHE_SIZE (1920 * 1080 * 3) //图像缓存尺寸
#define FEA_NUM_MAX 500 // 单帧特征点数量
#define FEA_DES_SIZE 128 // 特征点描述子尺度
// 帧缓存:按照固定大小设计,便于管理
struct FrameCache
{
FrameInfo _para;
GD_VIDEO_FRAME_S _frame_info;
BYTE8 _data[IMG_CACHE_SIZE];
SINT32 ptNum;
cv::KeyPoint _pt[FEA_NUM_MAX];
FLOAT32 _desp[FEA_NUM_MAX * FEA_DES_SIZE];
DOUBLE64 H[9];// H矩阵
// SE3
DOUBLE64 RtK[21]; //R(9)+T(3)+K(9)
DOUBLE64 se3[6]; //旋转向量+平移向量,李代数(优化项)
};
// 前视极坐标范围
struct PoleArea
{
float left;
float right;
float up;
float bottom;
};
// 扫描范围(-180-180
struct ScanRange
{
float Agl0;
float Agl1;
};
// 前视全景图配置
struct FPanInfo
{
int m_pan_width;
int m_pan_height;
float fAglRes;
// 大地系范围
ANGLE32F centerGeo;
ScanRange stAzRangeGeo;
ScanRange stPtRangeGeo;
};
//
// cuda显存资源
struct cuda_Mem
{
unsigned char* global_cuda_Frame;
unsigned char* global_cuda_Pan;
unsigned char* global_cuda_pan_mask;
double* global_cuda_H_inv_data;
};
// 通用全景图配置
struct GenPanInfo
{
int m_pan_width;
int m_pan_height;
};