Added GFTT+ORB detector type

This commit is contained in:
matlabbe
2015-11-11 12:08:20 -05:00
parent 0dedc62ce8
commit d1eec16222
4 changed files with 66 additions and 7 deletions
+19 -1
View File
@@ -98,7 +98,8 @@ public:
kFeatureFastBrief=4,
kFeatureGfttFreak=5,
kFeatureGfttBrief=6,
kFeatureBrisk=7};
kFeatureBrisk=7,
kFeatureGfttOrb=8}; //new 0.10.11
static Feature2D * create(Feature2D::Type & type, const ParametersMap & parameters);
@@ -360,6 +361,23 @@ private:
cv::Ptr<CV_FREAK> _freak;
};
//GFTT_ORB
class RTABMAP_EXP GFTT_ORB : public GFTT
{
public:
GFTT_ORB(const ParametersMap & parameters = ParametersMap());
virtual ~GFTT_ORB();
virtual void parseParameters(const ParametersMap & parameters);
virtual Feature2D::Type getType() const {return kFeatureGfttOrb;}
private:
virtual cv::Mat generateDescriptorsImpl(const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints) const;
private:
ORB _orb;
};
//BRISK
class RTABMAP_EXP BRISK : public Feature2D
{
+1 -1
View File
@@ -250,7 +250,7 @@ class RTABMAP_EXP Parameters
RTABMAP_PARAM(FAST, Gpu, bool, false, "GPU-FAST: Use GPU version of FAST. This option is enabled only if OpenCV is built with CUDA and GPUs are detected.");
RTABMAP_PARAM(FAST, GpuKeypointsRatio, double, 0.05, "Used with FAST GPU.");
RTABMAP_PARAM(GFTT, QualityLevel, double, 0.001, "");
RTABMAP_PARAM(GFTT, QualityLevel, double, 0.0001, "");
RTABMAP_PARAM(GFTT, MinDistance, double, 5, "");
RTABMAP_PARAM(GFTT, BlockSize, int, 3, "");
RTABMAP_PARAM(GFTT, UseHarrisDetector, bool, false, "");
+27 -1
View File
@@ -1071,7 +1071,7 @@ cv::Mat GFTT_BRIEF::generateDescriptorsImpl(const cv::Mat & image, std::vector<c
}
//////////////////////////
//FAST-FREAK
//GFTT-FREAK
//////////////////////////
GFTT_FREAK::GFTT_FREAK(const ParametersMap & parameters) :
GFTT(parameters),
@@ -1123,6 +1123,32 @@ cv::Mat GFTT_FREAK::generateDescriptorsImpl(const cv::Mat & image, std::vector<c
return descriptors;
}
//////////////////////////
//GFTT-ORB
//////////////////////////
GFTT_ORB::GFTT_ORB(const ParametersMap & parameters) :
GFTT(parameters),
_orb(parameters)
{
parseParameters(parameters);
}
GFTT_ORB::~GFTT_ORB()
{
}
void GFTT_ORB::parseParameters(const ParametersMap & parameters)
{
GFTT::parseParameters(parameters);
_orb.parseParameters(parameters);
}
cv::Mat GFTT_ORB::generateDescriptorsImpl(const cv::Mat & image, std::vector<cv::KeyPoint> & keypoints) const
{
UASSERT(!image.empty() && image.channels() == 1 && image.depth() == CV_8U);
return _orb.generateDescriptors(image, keypoints);
}
//////////////////////////
//BRISK
//////////////////////////