From f9fb6216d8e6e277171eb4042854ccdbba897c09 Mon Sep 17 00:00:00 2001 From: Mathieu Labbe Date: Fri, 23 Jan 2015 15:16:05 -0500 Subject: [PATCH] GUI: Optimized odometry display GUI: moved alpha parameter into ImageView object --- guilib/include/rtabmap/gui/ImageView.h | 4 + guilib/include/rtabmap/gui/MainWindow.h | 2 + .../include/rtabmap/gui/PreferencesDialog.h | 2 - guilib/src/ImageView.cpp | 26 ++++ guilib/src/MainWindow.cpp | 128 +++++++++++------- guilib/src/PreferencesDialog.cpp | 18 +-- guilib/src/ui/preferencesDialog.ui | 55 +------- 7 files changed, 119 insertions(+), 116 deletions(-) diff --git a/guilib/include/rtabmap/gui/ImageView.h b/guilib/include/rtabmap/gui/ImageView.h index 74834759..6c7de4e5 100644 --- a/guilib/include/rtabmap/gui/ImageView.h +++ b/guilib/include/rtabmap/gui/ImageView.h @@ -57,6 +57,7 @@ public: bool isImageDepthShown() const; bool isFeaturesShown() const; bool isLinesShown() const; + int getAlpha() const {return _alpha;} void setFeaturesShown(bool shown); void setImageShown(bool shown); @@ -69,6 +70,7 @@ public: void setImageDepth(const QImage & image); void setFeatureColor(int id, const QColor & color); void setFeaturesColor(const QColor & color); + void setAlpha(int alpha); const QMultiMap & getFeatures() const {return _features;} @@ -92,6 +94,7 @@ private: int _zoom; int _minZoom; QString _savedFileName; + int _alpha; QMenu * _menu; QAction * _showImage; @@ -99,6 +102,7 @@ private: QAction * _showFeatures; QAction * _showLines; QAction * _saveImage; + QAction * _setAlpha; QMultiMap _features; QGraphicsPixmapItem * _image; diff --git a/guilib/include/rtabmap/gui/MainWindow.h b/guilib/include/rtabmap/gui/MainWindow.h index 1d7ac83c..a2830050 100644 --- a/guilib/include/rtabmap/gui/MainWindow.h +++ b/guilib/include/rtabmap/gui/MainWindow.h @@ -264,6 +264,8 @@ private: bool _odometryReceived; QString _openedDatabasePath; bool _emptyNewDatabase; + bool _odomImageShow; + bool _odomImageDepthShow; QMap _cachedSignatures; std::map _currentPosesMap; // diff --git a/guilib/include/rtabmap/gui/PreferencesDialog.h b/guilib/include/rtabmap/gui/PreferencesDialog.h index 705cdc8d..eadd4586 100644 --- a/guilib/include/rtabmap/gui/PreferencesDialog.h +++ b/guilib/include/rtabmap/gui/PreferencesDialog.h @@ -116,11 +116,9 @@ public: int getGeneralLoggerType() const; bool getGeneralLoggerPrintTime() const; bool isVerticalLayoutUsed() const; - bool isImageFlipped() const; bool imageRejectedShown() const; bool imageHighestHypShown() const; bool beepOnPause() const; - int getKeypointsOpacity() const; int getOdomQualityWarnThr() const; bool isPosteriorGraphView() const; diff --git a/guilib/src/ImageView.cpp b/guilib/src/ImageView.cpp index d4519a34..376526f9 100644 --- a/guilib/src/ImageView.cpp +++ b/guilib/src/ImageView.cpp @@ -34,6 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #include "rtabmap/utilite/ULogger.h" #include "rtabmap/gui/KeypointItem.h" @@ -44,6 +45,7 @@ ImageView::ImageView(QWidget * parent) : _zoom(250), _minZoom(250), _savedFileName((QDir::homePath()+ "/") + "picture" + ".png"), + _alpha(100), _image(0), _imageDepth(0) { @@ -64,6 +66,7 @@ ImageView::ImageView(QWidget * parent) : _showLines = _menu->addAction(tr("Show lines")); _showLines->setCheckable(true); _showLines->setChecked(true); + _setAlpha = _menu->addAction(tr("Set alpha...")); _saveImage = _menu->addAction(tr("Save picture...")); } @@ -179,6 +182,16 @@ void ImageView::contextMenuEvent(QContextMenuEvent * e) this->setLinesShown(_showLines->isChecked()); emit configChanged(); } + else if(action == _setAlpha) + { + bool ok = false; + int value = QInputDialog::getInt(this, tr("Set features and lines alpha"), tr("alpha (0-255)"), _alpha, 0, 255, 10, &ok); + if(ok) + { + this->setAlpha(value); + emit configChanged(); + } + } if(action == _showImage || action ==_showImageDepth) { @@ -364,6 +377,19 @@ void ImageView::setFeaturesColor(const QColor & color) } } +void ImageView::setAlpha(int alpha) +{ + UASSERT(alpha >=0 && alpha <= 255); + _alpha = alpha; + for(QMultiMap::iterator iter=_features.begin(); iter!=_features.end(); ++iter) + { + QColor c = iter.value()->pen().color(); + c.setAlpha(_alpha); + iter.value()->setPen(QPen(c)); + iter.value()->setBrush(QBrush(c)); + } +} + void ImageView::clearLines() { if(this->scene()) diff --git a/guilib/src/MainWindow.cpp b/guilib/src/MainWindow.cpp index c985c40a..3c599c32 100644 --- a/guilib/src/MainWindow.cpp +++ b/guilib/src/MainWindow.cpp @@ -120,6 +120,8 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) : _odometryReceived(false), _openedDatabasePath(""), _emptyNewDatabase(true), + _odomImageShow(true), + _odomImageDepthShow(false), _odometryCorrection(Transform::getIdentity()), _lastOdometryProcessed(true), _oneSecondTimer(0), @@ -206,6 +208,7 @@ MainWindow::MainWindow(PreferencesDialog * prefDialog, QWidget * parent) : _ui->imageView_source->setBackgroundBrush(QBrush(Qt::black)); _ui->imageView_loopClosure->setBackgroundBrush(QBrush(Qt::black)); _ui->imageView_odometry->setBackgroundBrush(QBrush(Qt::black)); + _ui->imageView_odometry->setAlpha(200); _preferencesDialog->loadWidgetState(_ui->imageView_source); _preferencesDialog->loadWidgetState(_ui->imageView_loopClosure); _preferencesDialog->loadWidgetState(_ui->imageView_odometry); @@ -635,10 +638,12 @@ void MainWindow::processOdometry(const rtabmap::SensorData & data, const rtabmap UTimer time; Transform pose = data.pose(); bool lost = false; + bool lostStateChanged = false; _ui->imageView_odometry->resetTransform(); if(pose.isNull()) { UDEBUG("odom lost"); // use last pose + lostStateChanged = _ui->widget_cloudViewer->getBackgroundColor() != Qt::darkRed; _ui->widget_cloudViewer->setBackgroundColor(Qt::darkRed); _ui->imageView_odometry->setBackgroundBrush(QBrush(Qt::darkRed)); @@ -650,12 +655,14 @@ void MainWindow::processOdometry(const rtabmap::SensorData & data, const rtabmap info.inliers < _preferencesDialog->getOdomQualityWarnThr()) { UDEBUG("odom warn, quality(inliers)=%d thr=%d", info.inliers, _preferencesDialog->getOdomQualityWarnThr()); + lostStateChanged = _ui->widget_cloudViewer->getBackgroundColor() == Qt::darkRed; _ui->widget_cloudViewer->setBackgroundColor(Qt::darkYellow); _ui->imageView_odometry->setBackgroundBrush(QBrush(Qt::darkYellow)); } else { UDEBUG("odom ok"); + lostStateChanged = _ui->widget_cloudViewer->getBackgroundColor() == Qt::darkRed; _ui->widget_cloudViewer->setBackgroundColor(Qt::black); _ui->imageView_odometry->setBackgroundBrush(QBrush(Qt::black)); } @@ -762,54 +769,86 @@ void MainWindow::processOdometry(const rtabmap::SensorData & data, const rtabmap if(_ui->dockWidget_odometry->isVisible() && !data.image().empty()) { - int alpha = _preferencesDialog->getKeypointsOpacity()*255/100; - if(info.type == 0) + if(_ui->imageView_odometry->isFeaturesShown()) { - _ui->imageView_odometry->setFeatures(info.words, QColor(255,255,0, alpha)); - } - else if(info.type == 1) - { - _ui->imageView_odometry->setFeatures(info.refCorners, QColor(255,0,0, alpha)); + int alpha = _ui->imageView_odometry->getAlpha(); + if(info.type == 0) + { + _ui->imageView_odometry->setFeatures(info.words, QColor(255,255,0, alpha)); + } + else if(info.type == 1) + { + _ui->imageView_odometry->setFeatures(info.refCorners, QColor(255,0,0, alpha)); + } } _ui->imageView_odometry->clearLines(); if(lost) { + if(lostStateChanged) + { + // save state + _odomImageShow = _ui->imageView_odometry->isImageShown(); + _odomImageDepthShow = _ui->imageView_odometry->isImageDepthShown(); + } _ui->imageView_odometry->setImageDepth(uCvMat2QImage(data.image())); _ui->imageView_odometry->setImageShown(true); _ui->imageView_odometry->setImageDepthShown(true); } else { + if(lostStateChanged) + { + // restore state + _ui->imageView_odometry->setImageShown(_odomImageShow); + _ui->imageView_odometry->setImageDepthShown(_odomImageDepthShow); + } + _ui->imageView_odometry->setImage(uCvMat2QImage(data.image())); - _ui->imageView_odometry->setImageShown(true); - _ui->imageView_odometry->setImageDepthShown(false); + if(_ui->imageView_odometry->isImageDepthShown()) + { + _ui->imageView_odometry->setImageDepth(uCvMat2QImage(data.depthOrRightImage())); + } if(info.type == 0) { - for(unsigned int i=0; iimageView_odometry->isFeaturesShown()) { - _ui->imageView_odometry->setFeatureColor(info.wordMatches[i], QColor(255,0,0, alpha)); // outliers - } - for(unsigned int i=0; iimageView_odometry->setFeatureColor(info.wordInliers[i], QColor(0,255,0, alpha)); // inliers + int alpha = _ui->imageView_odometry->getAlpha(); + for(unsigned int i=0; iimageView_odometry->setFeatureColor(info.wordMatches[i], QColor(255,0,0, alpha)); // outliers + } + for(unsigned int i=0; iimageView_odometry->setFeatureColor(info.wordInliers[i], QColor(0,255,0, alpha)); // inliers + } } } else if(info.type == 1) { - //draw lines - UASSERT(info.refCorners.size() == info.newCorners.size()); - for(unsigned int i=0; iimageView_odometry->isFeaturesShown() || _ui->imageView_odometry->isLinesShown()) { - _ui->imageView_odometry->setFeatureColor(info.cornerInliers[i], QColor(0,255,0, alpha)); // inliers - QGraphicsLineItem * item = _ui->imageView_odometry->scene()->addLine( - info.refCorners[info.cornerInliers[i]].pt.x, - info.refCorners[info.cornerInliers[i]].pt.y, - info.newCorners[info.cornerInliers[i]].pt.x, - info.newCorners[info.cornerInliers[i]].pt.y, - QPen(QColor(0, 0, 255, alpha))); - item->setVisible(_ui->imageView_odometry->isLinesShown()); - item->setZValue(1); + //draw lines + int alpha = _ui->imageView_odometry->getAlpha(); + UASSERT(info.refCorners.size() == info.newCorners.size()); + for(unsigned int i=0; iimageView_odometry->isFeaturesShown()) + { + _ui->imageView_odometry->setFeatureColor(info.cornerInliers[i], QColor(0,255,0, alpha)); // inliers + } + if(_ui->imageView_odometry->isLinesShown()) + { + QGraphicsLineItem * item = _ui->imageView_odometry->scene()->addLine( + info.refCorners[info.cornerInliers[i]].pt.x, + info.refCorners[info.cornerInliers[i]].pt.y, + info.newCorners[info.cornerInliers[i]].pt.x, + info.newCorners[info.cornerInliers[i]].pt.y, + QPen(QColor(0, 0, 255, alpha))); + item->setVisible(_ui->imageView_odometry->isLinesShown()); + item->setZValue(1); + } + } } } } @@ -817,10 +856,6 @@ void MainWindow::processOdometry(const rtabmap::SensorData & data, const rtabmap _ui->imageView_odometry->resetZoom(); _ui->imageView_odometry->setSceneRect(_ui->imageView_odometry->scene()->itemsBoundingRect()); _ui->imageView_odometry->fitInView(_ui->imageView_odometry->sceneRect(), Qt::KeepAspectRatio); - if(_preferencesDialog->isImageFlipped()) - { - _ui->imageView_odometry->scale(-1.0, 1.0); - } } _lastOdometryProcessed = true; @@ -1009,12 +1044,6 @@ void MainWindow::processStats(const rtabmap::Statistics & stat) // do it after scaling this->drawKeypoints(signature.getWords(), loopSignature.getWords()); - if(_preferencesDialog->isImageFlipped()) - { - _ui->imageView_source->scale(-1.0, 1.0); - _ui->imageView_loopClosure->scale(-1.0, 1.0); - } - UDEBUG("time= %d ms", time.restart()); _ui->statsToolBox->updateStat("Keypoint/Keypoints count in the last signature/", stat.refImageId(), signature.getWords().size()); @@ -1929,7 +1958,7 @@ void MainWindow::drawKeypoints(const std::multimap & refWords timer.start(); KeypointItem * item = 0; - int alpha = _preferencesDialog->getKeypointsOpacity()*255/100; + int alphaA = _ui->imageView_source->getAlpha(); ULOGGER_DEBUG("refWords.size() = %d", refWords.size()); QMap addedKeypoints; for(std::multimap::const_iterator i = refWords.begin(); i != refWords.end(); ++i ) @@ -1948,27 +1977,27 @@ void MainWindow::drawKeypoints(const std::multimap & refWords if(uContains(loopWords, id)) { // PINK = FOUND IN LOOP SIGNATURE - item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(255, 0, 255, alpha)); + item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(255, 0, 255, alphaA)); } else if(_lastIds.contains(id)) { // BLUE = FOUND IN LAST SIGNATURE - item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(0, 0, 255, alpha)); + item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(0, 0, 255, alphaA)); } else if(id<=_lastId) { // RED = ALREADY EXISTS - item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(255, 0, 0, alpha)); + item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(255, 0, 0, alphaA)); } else if(refWords.count(id) > 1) { // YELLOW = NEW and multiple times - item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(255, 255, 0, alpha)); + item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(255, 255, 0, alphaA)); } else { // GREEN = NEW - item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(0, 255, 0, alpha)); + item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(0, 255, 0, alphaA)); } item->setVisible(this->_ui->imageView_source->isFeaturesShown()); this->_ui->imageView_source->scene()->addItem(item); @@ -1979,6 +2008,7 @@ void MainWindow::drawKeypoints(const std::multimap & refWords timer.start(); item = 0; + int alphaB = _ui->imageView_loopClosure->getAlpha(); ULOGGER_DEBUG("loopWords.size() = %d", loopWords.size()); QList > uniqueCorrespondences; for(std::multimap::const_iterator i = loopWords.begin(); i != loopWords.end(); ++i ) @@ -1997,7 +2027,7 @@ void MainWindow::drawKeypoints(const std::multimap & refWords if(uContains(refWords, id)) { // PINK = FOUND IN LOOP SIGNATURE - item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(255, 0, 255, alpha)); + item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(255, 0, 255, alphaB)); //To draw lines... get only unique correspondences if(uValues(refWords, id).size() == 1 && uValues(loopWords, id).size() == 1) { @@ -2007,17 +2037,17 @@ void MainWindow::drawKeypoints(const std::multimap & refWords else if(id<=_lastId) { // RED = ALREADY EXISTS - item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(255, 0, 0, alpha)); + item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(255, 0, 0, alphaB)); } else if(refWords.count(id) > 1) { // YELLOW = NEW and multiple times - item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(255, 255, 0, alpha)); + item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(255, 255, 0, alphaB)); } else { // GREEN = NEW - item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(0, 255, 0, alpha)); + item = new KeypointItem(r.pt.x-radius, r.pt.y-radius, radius*2, info, QColor(0, 255, 0, alphaB)); } item->setVisible(this->_ui->imageView_loopClosure->isFeaturesShown()); this->_ui->imageView_loopClosure->scene()->addItem(item); @@ -2055,7 +2085,7 @@ void MainWindow::drawKeypoints(const std::multimap & refWords iter->first->rect().y()+iter->first->rect().height()/2, iter->second->rect().x()+iter->second->rect().width()/2+deltaX, iter->second->rect().y()+iter->second->rect().height()/2+deltaY, - QPen(QColor(0, 255, 255, alpha))); + QPen(QColor(0, 255, 255, alphaA))); item->setVisible(_ui->imageView_source->isLinesShown()); item->setZValue(1); @@ -2064,7 +2094,7 @@ void MainWindow::drawKeypoints(const std::multimap & refWords iter->first->rect().y()+iter->first->rect().height()/2-deltaY, iter->second->rect().x()+iter->second->rect().width()/2, iter->second->rect().y()+iter->second->rect().height()/2, - QPen(QColor(0, 255, 255, alpha))); + QPen(QColor(0, 255, 255, alphaB))); item->setVisible(_ui->imageView_loopClosure->isLinesShown()); item->setZValue(1); } diff --git a/guilib/src/PreferencesDialog.cpp b/guilib/src/PreferencesDialog.cpp index 666bfd46..92f466d7 100644 --- a/guilib/src/PreferencesDialog.cpp +++ b/guilib/src/PreferencesDialog.cpp @@ -152,11 +152,9 @@ PreferencesDialog::PreferencesDialog(QWidget * parent) : // General panel connect(_ui->general_checkBox_imagesKept, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->checkBox_verticalLayoutUsed, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); - connect(_ui->checkBox_imageFlipped, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->checkBox_imageRejectedShown, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->checkBox_imageHighestHypShown, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->checkBox_beep, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); - connect(_ui->horizontalSlider_keypointsOpacity, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->spinBox_odomQualityWarnThr, SIGNAL(valueChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); connect(_ui->checkBox_posteriorGraphView, SIGNAL(stateChanged(int)), this, SLOT(makeObsoleteGeneralPanel())); @@ -817,10 +815,8 @@ void PreferencesDialog::resetSettings(QGroupBox * groupBox) _ui->general_checkBox_imagesKept->setChecked(true); _ui->checkBox_beep->setChecked(false); _ui->checkBox_verticalLayoutUsed->setChecked(true); - _ui->checkBox_imageFlipped->setChecked(false); _ui->checkBox_imageRejectedShown->setChecked(true); _ui->checkBox_imageHighestHypShown->setChecked(false); - _ui->horizontalSlider_keypointsOpacity->setSliderPosition(20); _ui->spinBox_odomQualityWarnThr->setValue(50); _ui->checkBox_posteriorGraphView->setChecked(true); } @@ -1061,11 +1057,9 @@ void PreferencesDialog::readGuiSettings(const QString & filePath) _ui->comboBox_loggerType->setCurrentIndex(settings.value("loggerType", _ui->comboBox_loggerType->currentIndex()).toInt()); _ui->checkBox_logger_printTime->setChecked(settings.value("loggerPrintTime", _ui->checkBox_logger_printTime->isChecked()).toBool()); _ui->checkBox_verticalLayoutUsed->setChecked(settings.value("verticalLayoutUsed", _ui->checkBox_verticalLayoutUsed->isChecked()).toBool()); - _ui->checkBox_imageFlipped->setChecked(settings.value("imageFlipped", _ui->checkBox_imageFlipped->isChecked()).toBool()); _ui->checkBox_imageRejectedShown->setChecked(settings.value("imageRejectedShown", _ui->checkBox_imageRejectedShown->isChecked()).toBool()); _ui->checkBox_imageHighestHypShown->setChecked(settings.value("imageHighestHypShown", _ui->checkBox_imageHighestHypShown->isChecked()).toBool()); _ui->checkBox_beep->setChecked(settings.value("beep", _ui->checkBox_beep->isChecked()).toBool()); - _ui->horizontalSlider_keypointsOpacity->setValue(settings.value("keypointsOpacity", _ui->horizontalSlider_keypointsOpacity->value()).toInt()); _ui->spinBox_odomQualityWarnThr->setValue(settings.value("odomQualityThr", _ui->spinBox_odomQualityWarnThr->value()).toInt()); _ui->checkBox_posteriorGraphView->setChecked(settings.value("posteriorGraphView", _ui->checkBox_posteriorGraphView->isChecked()).toBool()); @@ -1312,11 +1306,9 @@ void PreferencesDialog::writeGuiSettings(const QString & filePath) settings.setValue("loggerType", _ui->comboBox_loggerType->currentIndex()); settings.setValue("loggerPrintTime", _ui->checkBox_logger_printTime->isChecked()); settings.setValue("verticalLayoutUsed", _ui->checkBox_verticalLayoutUsed->isChecked()); - settings.setValue("imageFlipped", _ui->checkBox_imageFlipped->isChecked()); settings.setValue("imageRejectedShown", _ui->checkBox_imageRejectedShown->isChecked()); settings.setValue("imageHighestHypShown", _ui->checkBox_imageHighestHypShown->isChecked()); settings.setValue("beep", _ui->checkBox_beep->isChecked()); - settings.setValue("keypointsOpacity", _ui->horizontalSlider_keypointsOpacity->value()); settings.setValue("odomQualityThr", _ui->spinBox_odomQualityWarnThr->value()); settings.setValue("posteriorGraphView", _ui->checkBox_posteriorGraphView->isChecked()); @@ -1762,6 +1754,7 @@ void PreferencesDialog::saveWidgetState(const QWidget * widget) settings.setValue("depth_shown", imageView->isImageDepthShown()); settings.setValue("features_shown", imageView->isFeaturesShown()); settings.setValue("lines_shown", imageView->isLinesShown()); + settings.setValue("alpha", imageView->getAlpha()); } else if(exportCloudsDialog) { @@ -1845,6 +1838,7 @@ void PreferencesDialog::loadWidgetState(QWidget * widget) imageView->setImageDepthShown(settings.value("depth_shown", imageView->isImageDepthShown()).toBool()); imageView->setFeaturesShown(settings.value("features_shown", imageView->isFeaturesShown()).toBool()); imageView->setLinesShown(settings.value("lines_shown", imageView->isLinesShown()).toBool()); + imageView->setAlpha(settings.value("alpha", imageView->getAlpha()).toInt()); } else if(exportCloudsDialog) { @@ -2864,10 +2858,6 @@ bool PreferencesDialog::isVerticalLayoutUsed() const { return _ui->checkBox_verticalLayoutUsed->isChecked(); } -bool PreferencesDialog::isImageFlipped() const -{ - return _ui->checkBox_imageFlipped->isChecked(); -} bool PreferencesDialog::imageRejectedShown() const { return _ui->checkBox_imageRejectedShown->isChecked(); @@ -2880,10 +2870,6 @@ bool PreferencesDialog::beepOnPause() const { return _ui->checkBox_beep->isChecked(); } -int PreferencesDialog::getKeypointsOpacity() const -{ - return _ui->horizontalSlider_keypointsOpacity->value(); -} int PreferencesDialog::getOdomQualityWarnThr() const { return _ui->spinBox_odomQualityWarnThr->value(); diff --git a/guilib/src/ui/preferencesDialog.ui b/guilib/src/ui/preferencesDialog.ui index 1fa38e6f..8e07c3da 100644 --- a/guilib/src/ui/preferencesDialog.ui +++ b/guilib/src/ui/preferencesDialog.ui @@ -86,7 +86,7 @@ QFrame::Raised - 8 + 0 @@ -143,7 +143,7 @@ Loop closure detection view - + @@ -153,7 +153,7 @@ - + Show the image of the highest hypothesis. @@ -163,7 +163,7 @@ - + @@ -174,32 +174,6 @@ - - - Flip image (like a mirror). - - - false - - - - - - - 0 - - - 100 - - - 16 - - - Qt::Horizontal - - - - Show image when an hypothesis is rejected. @@ -229,24 +203,7 @@ - - - - - - - - - - - Keypoints opacity. - - - true - - - - + Show loop closure hypotheses on the graph view. Nodes are colorized from blue to red depending on the highest hypothesis (which is red). Posterior hypotheses should be published. @@ -256,7 +213,7 @@ - +