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
//////////////////////////
+19 -4
View File
@@ -63,9 +63,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>759</width>
<height>966</height>
<y>-566</y>
<width>755</width>
<height>1764</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
@@ -86,7 +86,7 @@
<enum>QFrame::Raised</enum>
</property>
<property name="currentIndex">
<number>3</number>
<number>23</number>
</property>
<widget class="QWidget" name="page_22">
<layout class="QVBoxLayout" name="verticalLayout_29">
@@ -4749,6 +4749,11 @@ see Sqlite3 doc 'PRAGMA temp_store'.</string>
<string>BRISK</string>
</property>
</item>
<item>
<property name="text">
<string>GFTT+ORB</string>
</property>
</item>
</widget>
</item>
<item row="0" column="1">
@@ -7927,6 +7932,11 @@ Lower the ratio -&gt; higher the precision. 0 means disabled, matching the neare
<string>BRISK</string>
</property>
</item>
<item>
<property name="text">
<string>GFTT+ORB</string>
</property>
</item>
</widget>
</item>
<item row="1" column="1">
@@ -9290,6 +9300,11 @@ Lower the ratio -&gt; higher the precision. 0 means disabled, matching the neare
<string>BRISK</string>
</property>
</item>
<item>
<property name="text">
<string>GFTT+ORB</string>
</property>
</item>
</widget>
</item>
</layout>