mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
fixed build with OpenCV 2.4
This commit is contained in:
@@ -2122,29 +2122,21 @@ void GFTT_DAISY::parseParameters(const ParametersMap & parameters)
|
|||||||
Parameters::parse(parameters, Parameters::kFREAKPatternScale(), patternScale_);
|
Parameters::parse(parameters, Parameters::kFREAKPatternScale(), patternScale_);
|
||||||
Parameters::parse(parameters, Parameters::kFREAKNOctaves(), nOctaves_);
|
Parameters::parse(parameters, Parameters::kFREAKNOctaves(), nOctaves_);
|
||||||
|
|
||||||
#if CV_MAJOR_VERSION < 3
|
|
||||||
_daisy = cv::Ptr<CV_DAISY>(new CV_DAISY());
|
|
||||||
#else
|
|
||||||
#ifdef HAVE_OPENCV_XFEATURES2D
|
#ifdef HAVE_OPENCV_XFEATURES2D
|
||||||
_daisy = CV_DAISY::create();
|
_daisy = CV_DAISY::create();
|
||||||
#else
|
#else
|
||||||
UWARN("RTAB-Map is not built with OpenCV xfeatures2d module so DAISY cannot be used!");
|
UWARN("RTAB-Map is not built with OpenCV xfeatures2d module so DAISY cannot be used!");
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cv::Mat GFTT_DAISY::generateDescriptorsImpl(const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints) const
|
cv::Mat GFTT_DAISY::generateDescriptorsImpl(const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints) const
|
||||||
{
|
{
|
||||||
UASSERT(!image.empty() && image.channels() == 1 && image.depth() == CV_8U);
|
UASSERT(!image.empty() && image.channels() == 1 && image.depth() == CV_8U);
|
||||||
cv::Mat descriptors;
|
cv::Mat descriptors;
|
||||||
#if CV_MAJOR_VERSION < 3
|
|
||||||
_daisy->compute(image, keypoints, descriptors);
|
|
||||||
#else
|
|
||||||
#ifdef HAVE_OPENCV_XFEATURES2D
|
#ifdef HAVE_OPENCV_XFEATURES2D
|
||||||
_daisy->compute(image, keypoints, descriptors);
|
_daisy->compute(image, keypoints, descriptors);
|
||||||
#else
|
#else
|
||||||
UWARN("RTAB-Map is not built with OpenCV xfeatures2d module so DAISY cannot be used!");
|
UWARN("RTAB-Map is not built with OpenCV xfeatures2d module so DAISY cannot be used!");
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
return descriptors;
|
return descriptors;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user