/***************************************************************************** * * * @file FeatureMatching.h * * @brief 基于orb的特征点匹配 * * Details. * * * * @author X P * * @version 1.0.0.0 * * @date 2023-03-28 * * @license GNU General Public License (GPL) * * * *****************************************************************************/ #ifndef _FEATURE_MATCHING_H_ #define _FEATURE_MATCHING_H_ #include #include #include #include "ImgProcessGlobal.h" using namespace std; class CVX_PROCESS_EXPORT FeatureMatching { public: FeatureMatching(); ~FeatureMatching(); void ExtractDescriptors(const cv::Mat spread, int id); void Matching(cv::Mat& homMat2d, float thresh = 30.f); void AffineImage(cv::Mat &out); void AffinePoint(const QPoint& pointOri, QPoint& pointDst); static void AffinePoint(const cv::Mat& homMat2d,const QPoint& pointOri, QPoint& pointDst); private: int features_; float scale_factory_; int pyramid_levels_; cv::Ptr orb_; //cv::Ptr orb_; typedef vector KeyPoints; cv::Mat spreads_[2]; cv::Mat homMat2d; KeyPoints keypoints_[2]; cv::Mat descriptors_[2]; }; #endif