mirror of
https://github.com/introlab/rtabmap_ros.git
synced 2026-10-08 02:37:45 +08:00
Fixed cloudFromDepth() method when depth image is not the same size as the calibration file. That fixes projection map created from Tango databases (where depth size != rgb size)
This commit is contained in:
@@ -2328,7 +2328,10 @@ void DatabaseViewer::update(int value,
|
||||
{
|
||||
depth = util2d::fillDepthHoles(depth, ui_->spinBox_mesh_fillDepthHoles->value(), float(ui_->spinBox_mesh_depthError->value())/100.0f);
|
||||
}
|
||||
cloud = util3d::cloudFromDepthRGB(data.imageRaw(), depth, data.cameraModels()[0].cx(), data.cameraModels()[0].cy(), data.cameraModels()[0].fx(), data.cameraModels()[0].fy());
|
||||
cloud = util3d::cloudFromDepthRGB(
|
||||
data.imageRaw(),
|
||||
depth,
|
||||
data.cameraModels()[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2388,15 +2391,6 @@ void DatabaseViewer::update(int value,
|
||||
}
|
||||
}
|
||||
|
||||
if(!imgDepth.isNull())
|
||||
{
|
||||
view->setImageDepth(imgDepth);
|
||||
rect = imgDepth.rect();
|
||||
}
|
||||
else
|
||||
{
|
||||
ULOGGER_DEBUG("Image depth is empty");
|
||||
}
|
||||
if(!img.isNull())
|
||||
{
|
||||
view->setImage(img);
|
||||
@@ -2407,6 +2401,19 @@ void DatabaseViewer::update(int value,
|
||||
ULOGGER_DEBUG("Image is empty");
|
||||
}
|
||||
|
||||
if(!imgDepth.isNull())
|
||||
{
|
||||
view->setImageDepth(imgDepth);
|
||||
if(!img.isNull())
|
||||
{
|
||||
rect = imgDepth.rect();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ULOGGER_DEBUG("Image depth is empty");
|
||||
}
|
||||
|
||||
// loops
|
||||
std::map<int, rtabmap::Link> links;
|
||||
dbDriver_->loadLinks(id, links);
|
||||
|
||||
Reference in New Issue
Block a user