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.
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.
// 全局BA
/*********版权所有( C) 2025, 武汉高德红外股份有限公司***************************************
* 文件名称: Arith_BAProc.h
* 文件标识: BA
* 内容摘要:光束平差
* 其它说明:
* 当前版本: V0.5
* 创建作者: 04046wcw
* 创建日期: 2025/01/15
* 包含关系:
*****************************************************************************************/
# pragma once
# include "StitchStruct.h"
# include <opencv2/core.hpp>
# include <opencv2/imgproc.hpp>
# include "Arith_GeoSolver.h"
# include "Arith_FeaMatch.h"
using cv : : Mat_ ;
class BA_Task
{
public :
BA_Task ( GeoSolver * pGeoTrans ) ;
~ BA_Task ( ) ;
// 加入优化帧
SINT32 addFrame ( GD_VIDEO_FRAME_S img , FrameInfo para ) ;
// BA优化
void optimizeBA ( cv : : Mat H_pan ) ;
// 使用地理系H矩阵和全景图H重投影所有帧
void remap ( vector < cv : : Mat_ < double > > H_Vec , cv : : Mat_ < double > H_pan , std : : string winname ) ;
private :
SINT32 CalMatchMat ( float fiou_thre ) ; //计算匹配性矩阵(以IOU约束)
private :
GeoSolver * _GeoStitcher ; //外参计算
FeatureMatcher * _FeaMatcher ; //特征匹配
private :
Mat_ < int > _MatchMat ; //配准点邻接表
Mat_ < float > _IOUMat ; //交汇邻接表
vector < cv : : Mat_ < double > > _origMatrix ; //初始H矩阵
vector < cv : : Mat_ < double > > _currMatrix ; //当前H矩阵
//超大空间, 考虑文件cache todo!
private :
vector < cv : : Mat > _imgVec ; //图像缓存
vector < vector < cv : : KeyPoint > > _FeaPtVec ; //特征点缓存
vector < cv : : Mat > _FeaDespVec ; //特征点描述子
vector < FrameInfo > _paraVec ;
vector < vector < cv : : Point2f > > _polygon ; //帧包围四边形
} ;
void drawPolygons ( cv : : Mat & image , const std : : vector < std : : vector < cv : : Point2f > > & polygons ) ;