CloudViewer: added backface culling option on right-click menu. MainWindow: removed error msg on wrong decimation (util3d already handle this case)

This commit is contained in:
matlabbe
2016-11-27 20:10:05 -05:00
parent 1910cef3d1
commit 3363772ce5
5 changed files with 37 additions and 66 deletions

View File

@@ -866,6 +866,10 @@ Transform RegistrationVis::computeTransformationImpl(
UWARN("saved projected.bmp");*/
}
else
{
UWARN("All projected points are outside the camera. Guess (%s) is wrong or images are not overlapping.", guess.prettyPrint().c_str());
}
UDEBUG("");
}
else
@@ -1318,8 +1322,8 @@ Transform RegistrationVis::computeTransformationImpl(
}
else if(toSignature.sensorData().isValid())
{
UWARN("Missing correspondences for registration. toWords = %d toImageEmpty=%d",
(int)toSignature.getWords().size(), toSignature.sensorData().imageRaw().empty()?1:0);
UWARN("Missing correspondences for registration (%d->%d). toWords = %d toImageEmpty=%d",
fromSignature.id(), toSignature.id(), (int)toSignature.getWords().size(), toSignature.sensorData().imageRaw().empty()?1:0);
}
info.inliers = inliersCount;

View File

@@ -993,16 +993,6 @@ pcl::PointCloud<pcl::PointXYZRGB>::Ptr RTABMAP_EXP cloudRGBFromSensorData(
int subRGBWidth = sensorData.imageRaw().cols/sensorData.cameraModels().size();
int subDepthWidth = sensorData.depthRaw().cols/sensorData.cameraModels().size();
if(subRGBWidth % decimation != 0 || subDepthWidth % decimation != 0)
{
UWARN("Image size (rgb=%d,%d depth=%d,%d) modulus decimation (%d) is not null "
"for the cloud creation! Setting decimation to 1...",
subRGBWidth, sensorData.imageRaw().rows,
subDepthWidth, sensorData.depthRaw().rows,
decimation);
decimation = 1;
}
for(unsigned int i=0; i<sensorData.cameraModels().size(); ++i)
{
if(sensorData.cameraModels()[i].isValidForProjection())