Added FREAK detector/descriptor option with OpenCV3

This commit is contained in:
matlabbe
2017-01-30 22:24:51 -05:00
parent f61569622a
commit 0f96bf7709
4 changed files with 199 additions and 13 deletions
+21 -1
View File
@@ -176,8 +176,11 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) :
#endif
#endif
#if CV_MAJOR_VERSION == 3
#if CV_MAJOR_VERSION >= 3
_ui->groupBox_fast_opencv2->setEnabled(false);
#else
_ui->comboBox_detector_strategy->setItemData(9, 0, Qt::UserRole - 1); // No FREAK (detector+descriptor version)
_ui->reextract_type->setItemData(9, 0, Qt::UserRole - 1); // No FREAK (detector+descriptor version)
#endif
_ui->comboBox_cameraImages_odomFormat->setItemData(4, 0, Qt::UserRole - 1);
@@ -2253,6 +2256,23 @@ bool PreferencesDialog::validateForm()
}
#endif
#if CV_MAJOR_VERSION < 3
if (_ui->comboBox_detector_strategy->currentIndex() == Feature2D::kFeatureFreak)
{
QMessageBox::warning(this, tr("Parameter warning"),
tr("Selected feature type (FREAK detector) is not available on OpenCV2. ORB is set instead "
"for the bag-of-words dictionary."));
_ui->comboBox_detector_strategy->setCurrentIndex(Feature2D::kFeatureOrb);
}
if (_ui->reextract_type->currentIndex() == Feature2D::kFeatureFreak)
{
QMessageBox::warning(this, tr("Parameter warning"),
tr("Selected feature type (FREAK detector) is not available on OpenCV2. ORB is set instead "
"for the re-extraction of features on loop closure."));
_ui->reextract_type->setCurrentIndex(Feature2D::kFeatureOrb);
}
#endif
// optimization strategy
if(_ui->graphOptimization_type->currentIndex() == 0 && !Optimizer::isAvailable(Optimizer::kTypeTORO))
{
+84 -11
View File
@@ -63,16 +63,25 @@
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>673</width>
<height>2649</height>
<y>-274</y>
<width>677</width>
<height>2512</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -86,7 +95,7 @@
<enum>QFrame::Raised</enum>
</property>
<property name="currentIndex">
<number>1</number>
<number>19</number>
</property>
<widget class="QWidget" name="page_22">
<layout class="QVBoxLayout" name="verticalLayout_29" stretch="0,1">
@@ -4322,7 +4331,16 @@ when using the file type, logs are saved in LogRtabmap.txt (located in the worki
<string>Directory of images (optional settings)</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_93">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -6467,6 +6485,11 @@ generate the number of words requested.</string>
<string>GFTT+ORB</string>
</property>
</item>
<item>
<property name="text">
<string>FREAK</string>
</property>
</item>
</widget>
</item>
<item row="1" column="1">
@@ -10592,7 +10615,16 @@ If set to false, classic RTAB-Map loop closure detection is done using only imag
</property>
<widget class="QWidget" name="page_54">
<layout class="QVBoxLayout" name="verticalLayout_85">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -10732,7 +10764,16 @@ Lower the ratio -&gt; higher the precision. 0 means disabled, matching the neare
</widget>
<widget class="QWidget" name="page_55">
<layout class="QVBoxLayout" name="verticalLayout_86">
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -10890,7 +10931,16 @@ Lower the ratio -&gt; higher the precision. 0 means disabled, matching the neare
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -10970,7 +11020,16 @@ Lower the ratio -&gt; higher the precision. 0 means disabled, matching the neare
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -11082,7 +11141,16 @@ Lower the ratio -&gt; higher the precision. 0 means disabled, matching the neare
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@@ -11299,6 +11367,11 @@ Lower the ratio -&gt; higher the precision. 0 means disabled, matching the neare
<string>GFTT+ORB</string>
</property>
</item>
<item>
<property name="text">
<string>FREAK</string>
</property>
</item>
</widget>
</item>
<item row="3" column="0">