mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 01:20:25 +08:00
GUI: Optimized odometry display
GUI: moved alpha parameter into ImageView object
This commit is contained in:
@@ -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<int, rtabmap::KeypointItem *> & 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<int, rtabmap::KeypointItem *> _features;
|
||||
QGraphicsPixmapItem * _image;
|
||||
|
||||
@@ -264,6 +264,8 @@ private:
|
||||
bool _odometryReceived;
|
||||
QString _openedDatabasePath;
|
||||
bool _emptyNewDatabase;
|
||||
bool _odomImageShow;
|
||||
bool _odomImageDepthShow;
|
||||
|
||||
QMap<int, Signature> _cachedSignatures;
|
||||
std::map<int, Transform> _currentPosesMap; // <nodeId, pose>
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include <QtCore/QDir>
|
||||
#include <QtGui/QAction>
|
||||
#include <QtGui/QGraphicsEffect>
|
||||
#include <QtGui/QInputDialog>
|
||||
#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<int, KeypointItem*>::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())
|
||||
|
||||
@@ -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; i<info.wordMatches.size(); ++i)
|
||||
if(_ui->imageView_odometry->isFeaturesShown())
|
||||
{
|
||||
_ui->imageView_odometry->setFeatureColor(info.wordMatches[i], QColor(255,0,0, alpha)); // outliers
|
||||
}
|
||||
for(unsigned int i=0; i<info.wordInliers.size(); ++i)
|
||||
{
|
||||
_ui->imageView_odometry->setFeatureColor(info.wordInliers[i], QColor(0,255,0, alpha)); // inliers
|
||||
int alpha = _ui->imageView_odometry->getAlpha();
|
||||
for(unsigned int i=0; i<info.wordMatches.size(); ++i)
|
||||
{
|
||||
_ui->imageView_odometry->setFeatureColor(info.wordMatches[i], QColor(255,0,0, alpha)); // outliers
|
||||
}
|
||||
for(unsigned int i=0; i<info.wordInliers.size(); ++i)
|
||||
{
|
||||
_ui->imageView_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; i<info.cornerInliers.size(); ++i)
|
||||
if(_ui->imageView_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; i<info.cornerInliers.size(); ++i)
|
||||
{
|
||||
if(_ui->imageView_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<int, cv::KeyPoint> & 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<int, KeypointItem*> addedKeypoints;
|
||||
for(std::multimap<int, cv::KeyPoint>::const_iterator i = refWords.begin(); i != refWords.end(); ++i )
|
||||
@@ -1948,27 +1977,27 @@ void MainWindow::drawKeypoints(const std::multimap<int, cv::KeyPoint> & 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<int, cv::KeyPoint> & refWords
|
||||
|
||||
timer.start();
|
||||
item = 0;
|
||||
int alphaB = _ui->imageView_loopClosure->getAlpha();
|
||||
ULOGGER_DEBUG("loopWords.size() = %d", loopWords.size());
|
||||
QList<QPair<KeypointItem*, KeypointItem*> > uniqueCorrespondences;
|
||||
for(std::multimap<int, cv::KeyPoint>::const_iterator i = loopWords.begin(); i != loopWords.end(); ++i )
|
||||
@@ -1997,7 +2027,7 @@ void MainWindow::drawKeypoints(const std::multimap<int, cv::KeyPoint> & 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<int, cv::KeyPoint> & 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<int, cv::KeyPoint> & 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<int, cv::KeyPoint> & 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);
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>8</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="page_22">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_29">
|
||||
@@ -143,7 +143,7 @@
|
||||
<string>Loop closure detection view</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_31" columnstretch="0,1">
|
||||
<item row="2" column="0">
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_imageRejectedShown">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -153,7 +153,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_105">
|
||||
<property name="text">
|
||||
<string>Show the image of the highest hypothesis.</string>
|
||||
@@ -163,7 +163,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_imageHighestHypShown">
|
||||
<property name="text">
|
||||
<string/>
|
||||
@@ -174,32 +174,6 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QLabel" name="label_80">
|
||||
<property name="text">
|
||||
<string>Flip image (like a mirror).</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QSlider" name="horizontalSlider_keypointsOpacity">
|
||||
<property name="minimum">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100</number>
|
||||
</property>
|
||||
<property name="sliderPosition">
|
||||
<number>16</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QLabel" name="label_73">
|
||||
<property name="text">
|
||||
<string>Show image when an hypothesis is rejected.</string>
|
||||
@@ -229,24 +203,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_imageFlipped">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QLabel" name="label_102">
|
||||
<property name="text">
|
||||
<string>Keypoints opacity.</string>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<item row="3" column="1">
|
||||
<widget class="QLabel" name="label_222">
|
||||
<property name="text">
|
||||
<string>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. </string>
|
||||
@@ -256,7 +213,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="checkBox_posteriorGraphView">
|
||||
<property name="text">
|
||||
<string/>
|
||||
|
||||
Reference in New Issue
Block a user