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 _paraVec; std::vector _imgVec; std::vector> _keypointsVec; std::vector _descriptorsVec; std::vector _currMatrix; cv::Mat _panImage; GenPanInfo _panPara; SINT32 _totalFrameCnt; SINT32 _failedFrameCnt; // 连续失败帧计数 };