mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
MainWindow: fixed bg color not shown on loop closures when only scans are used.
This commit is contained in:
@@ -1931,12 +1931,17 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
||||
}
|
||||
|
||||
// For intermediate empty nodes, keep latest image shown
|
||||
if(signature.getWeight() >= 0 &&
|
||||
(!signature.sensorData().imageRaw().empty() || signature.getWords().size()))
|
||||
if(signature.getWeight() >= 0)
|
||||
{
|
||||
_ui->imageView_source->clear();
|
||||
_ui->imageView_loopClosure->clear();
|
||||
|
||||
if(signature.sensorData().imageRaw().empty() && signature.getWords().empty())
|
||||
{
|
||||
// To see colors
|
||||
_ui->imageView_source->setSceneRect(QRect(0,0,640,480));
|
||||
}
|
||||
|
||||
_ui->imageView_source->setBackgroundColor(_ui->imageView_source->getDefaultBackgroundColor());
|
||||
_ui->imageView_loopClosure->setBackgroundColor(_ui->imageView_loopClosure->getDefaultBackgroundColor());
|
||||
|
||||
@@ -2091,6 +2096,7 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
||||
}
|
||||
|
||||
//update image views
|
||||
if(!signature.sensorData().imageRaw().empty() || signature.getWords().size())
|
||||
{
|
||||
cv::Mat refImage = signature.sensorData().imageRaw();
|
||||
cv::Mat loopImage = loopSignature.sensorData().imageRaw();
|
||||
@@ -2162,6 +2168,11 @@ void MainWindow::processStats(const rtabmap::Statistics & stat)
|
||||
_ui->imageView_loopClosure->setSceneRect(_ui->imageView_source->sceneRect());
|
||||
}
|
||||
}
|
||||
else if(_ui->imageView_loopClosure->sceneRect().isNull() &&
|
||||
!_ui->imageView_source->sceneRect().isNull())
|
||||
{
|
||||
_ui->imageView_loopClosure->setSceneRect(_ui->imageView_source->sceneRect());
|
||||
}
|
||||
|
||||
UDEBUG("time= %d ms", time.restart());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user