diff --git a/corelib/include/rtabmap/core/Parameters.h b/corelib/include/rtabmap/core/Parameters.h index c6a44301..9fdcc5cb 100644 --- a/corelib/include/rtabmap/core/Parameters.h +++ b/corelib/include/rtabmap/core/Parameters.h @@ -254,7 +254,7 @@ class RTABMAP_EXP Parameters RTABMAP_PARAM(FAST, GridRows, int, 4, "Grid rows (0 to disable). Adapts the detector to partition the source image into a grid and detect points in each cell."); RTABMAP_PARAM(FAST, GridCols, int, 4, "Grid cols (0 to disable). Adapts the detector to partition the source image into a grid and detect points in each cell."); - RTABMAP_PARAM(GFTT, QualityLevel, double, 0.01, ""); + RTABMAP_PARAM(GFTT, QualityLevel, double, 0.002, ""); RTABMAP_PARAM(GFTT, MinDistance, double, 10, ""); RTABMAP_PARAM(GFTT, BlockSize, int, 3, ""); RTABMAP_PARAM(GFTT, UseHarrisDetector, bool, false, ""); diff --git a/guilib/src/DatabaseViewer.cpp b/guilib/src/DatabaseViewer.cpp index 92700ce3..093d0d7e 100644 --- a/guilib/src/DatabaseViewer.cpp +++ b/guilib/src/DatabaseViewer.cpp @@ -258,6 +258,7 @@ DatabaseViewer::DatabaseViewer(QWidget * parent) : connect(ui_->spinBox_stereo_gfttBlockSize, SIGNAL(valueChanged(int)), this, SLOT(updateStereo())); connect(ui_->doubleSpinBox_stereo_flowEps, SIGNAL(valueChanged(double)), this, SLOT(updateStereo())); connect(ui_->doubleSpinBox_stereo_gfttMinDistance, SIGNAL(valueChanged(double)), this, SLOT(updateStereo())); + connect(ui_->spinBox_stereo_gfttMaxFeatures, SIGNAL(valueChanged(int)), this, SLOT(updateStereo())); connect(ui_->doubleSpinBox_stereo_gfttQuality, SIGNAL(valueChanged(double)), this, SLOT(updateStereo())); connect(ui_->doubleSpinBox_stereo_maxSlope, SIGNAL(valueChanged(double)), this, SLOT(updateStereo())); connect(ui_->checkBox_stereo_subpix, SIGNAL(stateChanged(int)), this, SLOT(updateStereo())); @@ -329,6 +330,7 @@ DatabaseViewer::DatabaseViewer(QWidget * parent) : connect(ui_->spinBox_stereo_gfttBlockSize, SIGNAL(valueChanged(int)), this, SLOT(configModified())); connect(ui_->doubleSpinBox_stereo_flowEps, SIGNAL(valueChanged(double)), this, SLOT(configModified())); connect(ui_->doubleSpinBox_stereo_gfttMinDistance, SIGNAL(valueChanged(double)), this, SLOT(configModified())); + connect(ui_->spinBox_stereo_gfttMaxFeatures, SIGNAL(valueChanged(int)), this, SLOT(configModified())); connect(ui_->doubleSpinBox_stereo_gfttQuality, SIGNAL(valueChanged(double)), this, SLOT(configModified())); connect(ui_->doubleSpinBox_stereo_maxSlope, SIGNAL(valueChanged(double)), this, SLOT(configModified())); connect(ui_->checkBox_stereo_subpix, SIGNAL(stateChanged(int)), this, SLOT(configModified())); @@ -476,6 +478,7 @@ void DatabaseViewer::readSettings() ui_->spinBox_stereo_gfttBlockSize->setValue(settings.value("gfttBlockSize", ui_->spinBox_stereo_gfttBlockSize->value()).toInt()); ui_->doubleSpinBox_stereo_flowEps->setValue(settings.value("flowEps", ui_->doubleSpinBox_stereo_flowEps->value()).toDouble()); ui_->doubleSpinBox_stereo_gfttMinDistance->setValue(settings.value("gfttMinDistance", ui_->doubleSpinBox_stereo_gfttMinDistance->value()).toDouble()); + ui_->spinBox_stereo_gfttMaxFeatures->setValue(settings.value("gfttMaxFeatures", ui_->spinBox_stereo_gfttMaxFeatures->value()).toInt()); ui_->doubleSpinBox_stereo_gfttQuality->setValue(settings.value("gfttQuality", ui_->doubleSpinBox_stereo_gfttQuality->value()).toDouble()); ui_->doubleSpinBox_stereo_maxSlope->setValue(settings.value("maxSlope", ui_->doubleSpinBox_stereo_maxSlope->value()).toDouble()); ui_->checkBox_stereo_subpix->setChecked(settings.value("subpix", ui_->checkBox_stereo_subpix->isChecked()).toBool()); @@ -581,6 +584,7 @@ void DatabaseViewer::writeSettings() settings.setValue("gfttBlockSize", ui_->spinBox_stereo_gfttBlockSize->value()); settings.setValue("flowEps", ui_->doubleSpinBox_stereo_flowEps->value()); settings.setValue("gfttMinDistance", ui_->doubleSpinBox_stereo_gfttMinDistance->value()); + settings.setValue("gfttMaxFeatures", ui_->spinBox_stereo_gfttMaxFeatures->value()); settings.setValue("gfttQuality", ui_->doubleSpinBox_stereo_gfttQuality->value()); settings.setValue("maxSlope", ui_->doubleSpinBox_stereo_maxSlope->value()); settings.setValue("subpix", ui_->checkBox_stereo_subpix->isChecked()); @@ -2452,7 +2456,7 @@ void DatabaseViewer::updateStereo(const SensorData * data) std::vector kpts; cv::Rect roi = Feature2D::computeRoi(leftMono, "0.03 0.03 0.04 0.04"); ParametersMap parameters; - parameters.insert(ParametersPair(Parameters::kKpWordsPerImage(), "0")); + parameters.insert(ParametersPair(Parameters::kKpWordsPerImage(), uNumber2Str(ui_->spinBox_stereo_gfttMaxFeatures->value()))); parameters.insert(ParametersPair(Parameters::kGFTTMinDistance(), uNumber2Str(ui_->doubleSpinBox_stereo_gfttMinDistance->value()))); parameters.insert(ParametersPair(Parameters::kGFTTQualityLevel(), uNumber2Str(ui_->doubleSpinBox_stereo_gfttQuality->value()))); parameters.insert(ParametersPair(Parameters::kGFTTBlockSize(), uNumber2Str(ui_->spinBox_stereo_gfttBlockSize->value()))); diff --git a/guilib/src/MainWindow.cpp b/guilib/src/MainWindow.cpp index 754b0ce4..cc69fa87 100644 --- a/guilib/src/MainWindow.cpp +++ b/guilib/src/MainWindow.cpp @@ -5981,11 +5981,11 @@ void MainWindow::changeState(MainWindow::State newState) _ui->actionExport_cameras_in_Bundle_format_out->setEnabled(!_cachedSignatures.empty() && !_currentPosesMap.empty()); _ui->actionDownload_all_clouds->setEnabled(false); _ui->actionDownload_graph->setEnabled(false); - _ui->menuSelect_source->setEnabled(false); + _ui->menuSelect_source->setEnabled(true); _ui->actionLabel_current_location->setEnabled(false); _ui->actionSend_goal->setEnabled(false); _ui->actionCancel_goal->setEnabled(false); - _ui->toolBar->findChild("toolbar_source")->setEnabled(false); + _ui->toolBar->findChild("toolbar_source")->setEnabled(true); _ui->actionTrigger_a_new_map->setEnabled(false); _ui->doubleSpinBox_stats_imgRate->setEnabled(true); _ui->statusbar->clearMessage(); diff --git a/guilib/src/PreferencesDialog.cpp b/guilib/src/PreferencesDialog.cpp index e9cfa932..cd4f81a7 100644 --- a/guilib/src/PreferencesDialog.cpp +++ b/guilib/src/PreferencesDialog.cpp @@ -3788,11 +3788,12 @@ Camera * PreferencesDialog::createCamera(bool useRawImages) QString name = QFileInfo(_ui->lineEdit_calibrationFile->text() .remove("_left.yaml") .remove("_right.yaml") - .remove("_pose.yaml")).baseName(); + .remove("_pose.yaml") + .remove(".yaml")).baseName(); if(!_ui->lineEdit_calibrationFile->text().isEmpty()) { QDir d = QFileInfo(_ui->lineEdit_calibrationFile->text()).dir(); - if(!d.path().isEmpty()) + if(!_ui->lineEdit_calibrationFile->text().remove(QFileInfo(_ui->lineEdit_calibrationFile->text()).baseName()).isEmpty()) { dir = d.absolutePath(); } diff --git a/guilib/src/ui/DatabaseViewer.ui b/guilib/src/ui/DatabaseViewer.ui index 4949db03..4d2c5f48 100644 --- a/guilib/src/ui/DatabaseViewer.ui +++ b/guilib/src/ui/DatabaseViewer.ui @@ -50,7 +50,7 @@ 0 0 - 181 + 196 184 @@ -236,7 +236,7 @@ 0 0 - 181 + 195 184 @@ -869,7 +869,7 @@ - 0 + 5 @@ -2061,9 +2061,9 @@ 0 - 0 + -57 283 - 322 + 356 @@ -2086,10 +2086,10 @@ - 3 + 4 - 0.001000000000000 + 0.000100000000000 1.000000000000000 @@ -2102,7 +2102,7 @@ - + Optical Flow eps @@ -2116,7 +2116,7 @@ - + pixels @@ -2129,14 +2129,14 @@ - + Optical Flow win size - + 1 @@ -2153,7 +2153,7 @@ - + 4 @@ -2169,14 +2169,14 @@ - + Optical Flow max level - + Optical Flow iterations @@ -2190,7 +2190,7 @@ - + 1 @@ -2203,7 +2203,7 @@ - + 2 @@ -2232,21 +2232,21 @@ - + Sub pixel - + Matches max slope - + Qt::Vertical @@ -2259,13 +2259,39 @@ - + + + + + GFTT max features + + + + + + + + + + 0 + + + 99999 + + + 100 + + + 0 + + +