From 75ac722996ca13e3c2443a50ef2b00e551d9e22c Mon Sep 17 00:00:00 2001 From: Borong Yuan Date: Sun, 3 Nov 2024 03:51:05 +0800 Subject: [PATCH] draw "1 - Loop Thr" along with posterior (#1373) --- guilib/src/MainWindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guilib/src/MainWindow.cpp b/guilib/src/MainWindow.cpp index d3974d8086..03544dd766 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)