33 #include <opencv2/highgui/highgui.hpp> 34 #include <opencv2/core/core.hpp> 35 #include <opencv2/features2d/features2d.hpp> 40 #if CV_MAJOR_VERSION < 3 62 namespace xfeatures2d {
65 class BriefDescriptorExtractor;
66 #if CV_MAJOR_VERSION < 3 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION <= 3) || (CV_MAJOR_VERSION == 3 && (CV_MINOR_VERSION < 4 || (CV_MINOR_VERSION==4 && CV_SUBMINOR_VERSION<11))) 72 class FastFeatureDetector;
77 #if CV_MAJOR_VERSION < 3 || (CV_MAJOR_VERSION == 4 && CV_MINOR_VERSION <= 3) || (CV_MAJOR_VERSION == 3 && (CV_MINOR_VERSION < 4 || (CV_MINOR_VERSION==4 && CV_SUBMINOR_VERSION<11))) 78 typedef cv::xfeatures2d::SIFT
CV_SIFT;
82 typedef cv::xfeatures2d::SURF
CV_SURF;
83 typedef cv::FastFeatureDetector
CV_FAST;
84 typedef cv::xfeatures2d::FREAK
CV_FREAK;
85 typedef cv::xfeatures2d::DAISY CV_DAISY;
86 typedef cv::GFTTDetector
CV_GFTT;
87 typedef cv::xfeatures2d::BriefDescriptorExtractor
CV_BRIEF;
89 typedef cv::ORB CV_ORB;
101 #if CV_MAJOR_VERSION < 3 119 kFeatureOrbOctree=10,
120 kFeatureSuperPointTorch=11,
121 kFeatureSurfFreak=12,
122 kFeatureGfttDaisy=13,
123 kFeatureSurfDaisy=14};
134 case kFeatureFastFreak:
136 case kFeatureFastBrief:
138 case kFeatureGfttFreak:
140 case kFeatureGfttBrief:
144 case kFeatureGfttOrb:
148 case kFeatureOrbOctree:
150 case kFeatureSuperPointTorch:
152 case kFeatureSurfFreak:
154 case kFeatureGfttDaisy:
156 case kFeatureSurfDaisy:
166 static void filterKeypointsByDepth(
167 std::vector<cv::KeyPoint> & keypoints,
168 const cv::Mat & depth,
171 static void filterKeypointsByDepth(
172 std::vector<cv::KeyPoint> & keypoints,
173 cv::Mat & descriptors,
174 const cv::Mat & depth,
177 static void filterKeypointsByDepth(
178 std::vector<cv::KeyPoint> & keypoints,
179 cv::Mat & descriptors,
180 std::vector<cv::Point3f> & keypoints3D,
184 static void filterKeypointsByDisparity(
185 std::vector<cv::KeyPoint> & keypoints,
186 const cv::Mat & disparity,
188 static void filterKeypointsByDisparity(
189 std::vector<cv::KeyPoint> & keypoints,
190 cv::Mat & descriptors,
191 const cv::Mat & disparity,
194 static void limitKeypoints(std::vector<cv::KeyPoint> & keypoints,
int maxKeypoints);
195 static void limitKeypoints(std::vector<cv::KeyPoint> & keypoints, cv::Mat & descriptors,
int maxKeypoints);
196 static void limitKeypoints(std::vector<cv::KeyPoint> & keypoints, std::vector<cv::Point3f> & keypoints3D, cv::Mat & descriptors,
int maxKeypoints);
197 static void limitKeypoints(
const std::vector<cv::KeyPoint> & keypoints, std::vector<bool> & inliers,
int maxKeypoints);
198 static void limitKeypoints(
const std::vector<cv::KeyPoint> & keypoints, std::vector<bool> & inliers,
int maxKeypoints,
const cv::Size & imageSize,
int gridRows,
int gridCols);
200 static cv::Rect
computeRoi(
const cv::Mat & image,
const std::string & roiRatios);
201 static cv::Rect
computeRoi(
const cv::Mat & image,
const std::vector<float> & roiRatios);
212 std::vector<cv::KeyPoint> generateKeypoints(
213 const cv::Mat & image,
214 const cv::Mat &
mask = cv::Mat());
215 cv::Mat generateDescriptors(
216 const cv::Mat & image,
217 std::vector<cv::KeyPoint> & keypoints)
const;
218 std::vector<cv::Point3f> generateKeypoints3D(
220 const std::vector<cv::KeyPoint> & keypoints)
const;
222 virtual void parseParameters(
const ParametersMap & parameters);
230 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat()) = 0;
231 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const = 0;
255 virtual void parseParameters(
const ParametersMap & parameters);
259 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat());
260 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
282 virtual void parseParameters(
const ParametersMap & parameters);
286 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat());
287 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
306 virtual void parseParameters(
const ParametersMap & parameters);
310 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat());
311 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
337 virtual void parseParameters(
const ParametersMap & parameters);
341 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat());
373 virtual void parseParameters(
const ParametersMap & parameters);
377 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
392 virtual void parseParameters(
const ParametersMap & parameters);
396 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
414 virtual void parseParameters(
const ParametersMap & parameters);
417 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat());
436 virtual void parseParameters(
const ParametersMap & parameters);
440 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
455 virtual void parseParameters(
const ParametersMap & parameters);
459 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
477 virtual void parseParameters(
const ParametersMap & parameters);
481 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
499 virtual void parseParameters(
const ParametersMap & parameters);
503 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
516 virtual void parseParameters(
const ParametersMap & parameters);
520 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat());
521 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
538 virtual void parseParameters(
const ParametersMap & parameters);
542 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat());
543 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
553 #if CV_MAJOR_VERSION > 2 554 cv::Ptr<cv::KAZE> kaze_;
565 virtual void parseParameters(
const ParametersMap & parameters);
569 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat());
570 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
591 virtual void parseParameters(
const ParametersMap & parameters);
595 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat());
596 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
614 virtual void parseParameters(
const ParametersMap & parameters);
618 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
626 #if CV_MAJOR_VERSION > 2 627 cv::Ptr<CV_DAISY> _daisy;
638 virtual void parseParameters(
const ParametersMap & parameters);
642 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
650 #if CV_MAJOR_VERSION > 2 651 cv::Ptr<CV_DAISY> _daisy;
GLM_FUNC_DECL genIType mask(genIType const &count)
virtual Feature2D::Type getType() const
int fastCVLastImageHeight_
virtual Feature2D::Type getType() const
double gpuKeypointsRatio_
virtual Feature2D::Type getType() const
cv::Ptr< CV_FREAK > _freak
virtual Feature2D::Type getType() const
float getMinDepth() const
cv::Ptr< CV_FREAK > _freak
cv::BriefDescriptorExtractor CV_BRIEF
cv::Ptr< ORBextractor > _orb
std::map< std::string, std::string > ParametersMap
double contrastThreshold_
std::vector< float > _roiRatios
cv::Ptr< CV_BRISK > brisk_
cv::Ptr< CV_ORB_GPU > _gpuOrb
virtual Feature2D::Type getType() const
cv::FastFeatureDetector CV_FAST
int getMaxFeatures() const
bool orientationNormalized_
float getMaxDepth() const
virtual Feature2D::Type getType() const
virtual Feature2D::Type getType() const
cv::Ptr< CV_FAST_GPU > _gpuFast
cv::Ptr< SPDetector > superPoint_
virtual Feature2D::Type getType() const
bool orientationNormalized_
virtual Feature2D::Type getType() const
cv::Ptr< CV_FREAK > _freak
cv::Rect RTABMAP_EXP computeRoi(const cv::Mat &image, const std::string &roiRatios)
bool orientationNormalized_
static std::string typeName(Type type)
cv::gpu::SURF_GPU CV_SURF_GPU
cv::Ptr< CV_BRIEF > _brief
bool orientationNormalized_
cv::Ptr< CV_BRIEF > _brief
virtual Feature2D::Type getType() const
virtual Feature2D::Type getType() const
virtual Feature2D::Type getType() const
cv::gpu::ORB_GPU CV_ORB_GPU
virtual const ParametersMap & getParameters() const
bool orientationNormalized_
cv::gpu::FAST_GPU CV_FAST_GPU
virtual Feature2D::Type getType() const
virtual Feature2D::Type getType() const
virtual cv::Mat generateDescriptorsImpl(const cv::Mat &, std::vector< cv::KeyPoint > &) const
cv::Ptr< cv::FeatureDetector > _fast
virtual Feature2D::Type getType() const
ParametersMap parameters_
cv::Ptr< CV_SURF_GPU > _gpuSurf
virtual Feature2D::Type getType() const