Fixed ./rtabmap-rgbd_mapping fatal error : "[FATAL] (2015-01-30 11:29:02.636) util3d.cpp:632::cloudFromDepthRGB() Condition (!imageDepth.empty() && (imageDepth.type() == CV_16UC1 || imageDepth.type() == CV_32FC1)) not met!"

This commit is contained in:
Mathieu Labbe
2015-01-30 11:41:46 -05:00
parent 2cc34cbe7e
commit 45a5da9f16

View File

@@ -165,14 +165,16 @@ private slots:
else if(iter->first == stats.refImageId() &&
stats.getSignature().id() == iter->first)
{
Signature s = stats.getSignature();
s.uncompressData(); // make sure data is uncompressed
// Add the new cloud
pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud = util3d::cloudFromDepthRGB(
stats.getSignature().getImageRaw(),
stats.getSignature().getDepthRaw(),
stats.getSignature().getDepthCx(),
stats.getSignature().getDepthCy(),
stats.getSignature().getDepthFx(),
stats.getSignature().getDepthFy(),
s.getImageRaw(),
s.getDepthRaw(),
s.getDepthCx(),
s.getDepthCy(),
s.getDepthFx(),
s.getDepthFy(),
8); // decimation
if(cloud->size())