diff --git a/guilib/src/MainWindow.cpp b/guilib/src/MainWindow.cpp index d3974d80..03544dd7 100644 --- a/guilib/src/MainWindow.cpp +++ b/guilib/src/MainWindow.cpp @@ -302,7 +302,7 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent, bool sh _ui->posteriorPlot->showLegend(false); _ui->posteriorPlot->setFixedYAxis(0,1); UPlotCurveThreshold * tc; - tc = _ui->posteriorPlot->addThreshold("Loop closure thr", float(_preferencesDialog->getLoopThr())); + tc = _ui->posteriorPlot->addThreshold("1 - Loop Thr", 1.0 - _preferencesDialog->getLoopThr()); connect(this, SIGNAL(loopClosureThrChanged(qreal)), tc, SLOT(setThreshold(qreal))); _likelihoodCurve = new PdfPlotCurve("Likelihood", &_cachedSignatures, this); @@ -2412,7 +2412,7 @@ void MainWindow::processStats(const rtabmap::Statistics & stat) ULOGGER_DEBUG(""); //Adjust thresholds - Q_EMIT(loopClosureThrChanged(_preferencesDialog->getLoopThr())); + Q_EMIT(loopClosureThrChanged(1.0 - _preferencesDialog->getLoopThr())); } if(!stat.likelihood().empty() && _ui->dockWidget_likelihood->isVisible()) { @@ -4976,7 +4976,7 @@ void MainWindow::applyPrefSettings(const rtabmap::ParametersMap & parameters, bo _ui->doubleSpinBox_stats_timeLimit->setValue(_preferencesDialog->getTimeLimit()); _ui->actionSLAM_mode->setChecked(_preferencesDialog->isSLAMMode()); - Q_EMIT(loopClosureThrChanged(_preferencesDialog->getLoopThr())); + Q_EMIT(loopClosureThrChanged(1.0 - _preferencesDialog->getLoopThr())); } void MainWindow::drawKeypoints(const std::multimap & refWords, const std::multimap & loopWords)