From 45a5da9f166557bbb1a872bebea07bb457607295 Mon Sep 17 00:00:00 2001 From: Mathieu Labbe Date: Fri, 30 Jan 2015 11:41:46 -0500 Subject: [PATCH] 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!" --- examples/RGBDMapping/MapBuilder.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/examples/RGBDMapping/MapBuilder.h b/examples/RGBDMapping/MapBuilder.h index 38f9c9da..282cabc3 100644 --- a/examples/RGBDMapping/MapBuilder.h +++ b/examples/RGBDMapping/MapBuilder.h @@ -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::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())