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 {
64 class BriefDescriptorExtractor;
69 class FastFeatureDetector;
74 typedef cv::xfeatures2d::SIFT
CV_SIFT;
75 typedef cv::xfeatures2d::SURF
CV_SURF;
76 typedef cv::FastFeatureDetector
CV_FAST;
77 typedef cv::xfeatures2d::FREAK
CV_FREAK;
78 typedef cv::GFTTDetector
CV_GFTT;
79 typedef cv::xfeatures2d::BriefDescriptorExtractor
CV_BRIEF;
81 typedef cv::ORB CV_ORB;
91 #if CV_MAJOR_VERSION < 3 98 enum Type {kFeatureUndef=-1,
113 static void filterKeypointsByDepth(
114 std::vector<cv::KeyPoint> & keypoints,
115 const cv::Mat & depth,
118 static void filterKeypointsByDepth(
119 std::vector<cv::KeyPoint> & keypoints,
120 cv::Mat & descriptors,
121 const cv::Mat & depth,
125 static void filterKeypointsByDisparity(
126 std::vector<cv::KeyPoint> & keypoints,
127 const cv::Mat & disparity,
129 static void filterKeypointsByDisparity(
130 std::vector<cv::KeyPoint> & keypoints,
131 cv::Mat & descriptors,
132 const cv::Mat & disparity,
135 static void limitKeypoints(std::vector<cv::KeyPoint> & keypoints,
int maxKeypoints);
136 static void limitKeypoints(std::vector<cv::KeyPoint> & keypoints, cv::Mat & descriptors,
int maxKeypoints);
137 static void limitKeypoints(std::vector<cv::KeyPoint> & keypoints, std::vector<cv::Point3f> & keypoints3D, cv::Mat & descriptors,
int maxKeypoints);
138 static void limitKeypoints(
const std::vector<cv::KeyPoint> & keypoints, std::vector<bool> & inliers,
int maxKeypoints);
140 static cv::Rect
computeRoi(
const cv::Mat & image,
const std::string & roiRatios);
141 static cv::Rect
computeRoi(
const cv::Mat & image,
const std::vector<float> & roiRatios);
150 std::vector<cv::KeyPoint> generateKeypoints(
151 const cv::Mat & image,
152 const cv::Mat &
mask = cv::Mat())
const;
153 cv::Mat generateDescriptors(
154 const cv::Mat & image,
155 std::vector<cv::KeyPoint> & keypoints)
const;
156 std::vector<cv::Point3f> generateKeypoints3D(
158 const std::vector<cv::KeyPoint> & keypoints)
const;
160 virtual void parseParameters(
const ParametersMap & parameters);
168 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat())
const = 0;
169 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const = 0;
193 virtual void parseParameters(
const ParametersMap & parameters);
197 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat())
const;
198 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
220 virtual void parseParameters(
const ParametersMap & parameters);
224 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat())
const;
225 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
243 virtual void parseParameters(
const ParametersMap & parameters);
247 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat())
const;
248 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
274 virtual void parseParameters(
const ParametersMap & parameters);
278 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat())
const;
279 virtual cv::Mat
generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const {
return cv::Mat();}
302 virtual void parseParameters(
const ParametersMap & parameters);
306 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
321 virtual void parseParameters(
const ParametersMap & parameters);
325 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
343 virtual void parseParameters(
const ParametersMap & parameters);
346 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat())
const;
365 virtual void parseParameters(
const ParametersMap & parameters);
369 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
384 virtual void parseParameters(
const ParametersMap & parameters);
388 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
406 virtual void parseParameters(
const ParametersMap & parameters);
410 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
423 virtual void parseParameters(
const ParametersMap & parameters);
427 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat())
const;
428 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
445 virtual void parseParameters(
const ParametersMap & parameters);
449 virtual std::vector<cv::KeyPoint> generateKeypointsImpl(
const cv::Mat & image,
const cv::Rect & roi,
const cv::Mat &
mask = cv::Mat())
const;
450 virtual cv::Mat generateDescriptorsImpl(
const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints)
const;
460 #if CV_MAJOR_VERSION > 2 461 cv::Ptr<cv::KAZE> kaze_;
GLM_FUNC_DECL genIType mask(genIType const &count)
virtual Feature2D::Type getType() const
virtual Feature2D::Type getType() const
double gpuKeypointsRatio_
cv::Ptr< CV_FREAK > _freak
virtual Feature2D::Type getType() const
float getMinDepth() const
cv::Ptr< CV_FREAK > _freak
cv::BriefDescriptorExtractor CV_BRIEF
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
float getMaxDepth() const
virtual Feature2D::Type getType() const
virtual Feature2D::Type getType() const
cv::Ptr< CV_FAST_GPU > _gpuFast
virtual Feature2D::Type getType() const
bool orientationNormalized_
cv::Rect RTABMAP_EXP computeRoi(const cv::Mat &image, const std::string &roiRatios)
virtual cv::Mat generateDescriptorsImpl(const cv::Mat &image, std::vector< cv::KeyPoint > &keypoints) const
cv::gpu::SURF_GPU CV_SURF_GPU
cv::Ptr< CV_BRIEF > _brief
cv::Ptr< CV_BRIEF > _brief
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
cv::Ptr< cv::FeatureDetector > _fast
ParametersMap parameters_
cv::Ptr< CV_SURF_GPU > _gpuSurf
virtual Feature2D::Type getType() const