mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-03 10:00:23 +08:00
Added FREAK detector/descriptor option with OpenCV3
This commit is contained in:
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user