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