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.

30 lines
1008 B

class FeaStitch : public API_FeaStitch
{
public:
FeaStitch();
~FeaStitch();
GenPanInfo Init(GD_VIDEO_FRAME_S img, FrameInfo info);
void SetOutput(std::string filename, std::string outdir);
SINT32 Run(GD_VIDEO_FRAME_S img, FrameInfo para);
GD_VIDEO_FRAME_S ExportPanAddr();
cv::Mat ExportPanMat();
private:
void SetBase(cv::Mat& img, FrameInfo& info, EdgeDirection edgeDirection);
EdgeDirection isNearEdge(cv::Mat& H);
void calculateInitialOffset(EdgeDirection direction, int& offsetX, int& offsetY);
float calculateIOU(const cv::Mat& H1, const cv::Mat& H2, const cv::Size& imgSize);
bool checkHContinuity(const cv::Mat& prevH, const cv::Mat& currH);
FeatureMatcher* _FeaMatcher;
std::vector<FrameInfo> _paraVec;
std::vector<cv::Mat> _imgVec;
std::vector<std::vector<cv::KeyPoint>> _keypointsVec;
std::vector<cv::Mat> _descriptorsVec;
std::vector<cv::Mat> _currMatrix;
cv::Mat _panImage;
GenPanInfo _panPara;
SINT32 _totalFrameCnt;
SINT32 _failedFrameCnt; // 连续失败帧计数
};