mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-06 18:17:47 +08:00
DbViewer: fixed depth of features not shown
This commit is contained in:
@@ -4127,7 +4127,6 @@ void DatabaseViewer::update(int value,
|
||||
labelGravity->clear();
|
||||
labelGps->clear();
|
||||
labelSensors->clear();
|
||||
QRectF rect;
|
||||
if(value >= 0 && value < ids_.size())
|
||||
{
|
||||
view->clear();
|
||||
@@ -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;
|
||||
ids.push_back(id);
|
||||
std::list<Signature*> signatures;
|
||||
@@ -4761,30 +4789,6 @@ void DatabaseViewer::update(int value,
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
std::multimap<int, rtabmap::Link> links;
|
||||
dbDriver_->loadLinks(id, links);
|
||||
@@ -4920,11 +4924,6 @@ void DatabaseViewer::update(int value,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if(rect.isValid())
|
||||
{
|
||||
view->setSceneRect(rect);
|
||||
}
|
||||
}
|
||||
|
||||
void DatabaseViewer::updateLoggerLevel()
|
||||
|
||||
Reference in New Issue
Block a user