mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-02 09:30:25 +08:00
DbViewer: fixed depth of features not shown
This commit is contained in:
@@ -4127,7 +4127,6 @@ void DatabaseViewer::update(int value,
|
||||
labelCalib->clear();
|
||||
labelScan ->clear();
|
||||
labelGravity->clear();
|
||||
labelGps->clear();
|
||||
labelGps->clear();
|
||||
labelSensors->clear();
|
||||
if(value >= 0 && value < ids_.size())
|
||||
@@ -4161,6 +4160,35 @@ void DatabaseViewer::update(int value,
|
||||
}
|
||||
}
|
||||
imgDepth = depth;
|
||||
}
|
||||
|
||||
QRectF rect;
|
||||
if(!img.isNull())
|
||||
{
|
||||
view->setImage(img);
|
||||
rect = img.rect();
|
||||
}
|
||||
else
|
||||
{
|
||||
ULOGGER_DEBUG("Image is empty");
|
||||
}
|
||||
|
||||
if(!imgDepth.empty())
|
||||
{
|
||||
view->setImageDepth(imgDepth);
|
||||
if(img.isNull())
|
||||
{
|
||||
rect.setWidth(imgDepth.cols);
|
||||
rect.setHeight(imgDepth.rows);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ULOGGER_DEBUG("Image depth is empty");
|
||||
}
|
||||
if(rect.isValid())
|
||||
{
|
||||
view->setSceneRect(rect);
|
||||
}
|
||||
|
||||
std::list<int> ids;
|
||||
@@ -4761,30 +4789,6 @@ void DatabaseViewer::update(int value,
|
||||
delete signatures.front();
|
||||
signatures.clear();
|
||||
}
|
||||
}
|
||||
|
||||
if(!img.isNull())
|
||||
{
|
||||
view->setImage(img);
|
||||
rect = img.rect();
|
||||
}
|
||||
else
|
||||
{
|
||||
ULOGGER_DEBUG("Image is empty");
|
||||
}
|
||||
|
||||
if(!imgDepth.empty())
|
||||
{
|
||||
view->setImageDepth(imgDepth);
|
||||
if(img.isNull())
|
||||
{
|
||||
rect.setWidth(imgDepth.cols);
|
||||
rect.setHeight(imgDepth.rows);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ULOGGER_DEBUG("Image depth is empty");
|
||||
}
|
||||
|
||||
// loops
|
||||
@@ -4920,11 +4924,6 @@ void DatabaseViewer::update(int value,
|
||||
}
|
||||
constraintsViewer_->update();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(rect.isValid())
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user