From 2c47df47e2e4edcb752e12a0f96abf9de8424a02 Mon Sep 17 00:00:00 2001 From: HaoLi-China Date: Sat, 10 Jan 2015 02:32:46 +0800 Subject: [PATCH] fixed some bugs. --- .../Point Cloud/Algorithm/ObjPreSegment/scene_seg.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Currently-Using-Quality-Driven-Poisson-Guided-Autoscanning/Point Cloud/Algorithm/ObjPreSegment/scene_seg.cpp b/Currently-Using-Quality-Driven-Poisson-Guided-Autoscanning/Point Cloud/Algorithm/ObjPreSegment/scene_seg.cpp index 25b0aed..1f5ae41 100644 --- a/Currently-Using-Quality-Driven-Poisson-Guided-Autoscanning/Point Cloud/Algorithm/ObjPreSegment/scene_seg.cpp +++ b/Currently-Using-Quality-Driven-Poisson-Guided-Autoscanning/Point Cloud/Algorithm/ObjPreSegment/scene_seg.cpp @@ -971,9 +971,12 @@ void detect_table(PointCloudPtr_RGB_NORMAL sourceCloud, pcl::ModelCoefficients& if(std::abs(normal.dot(Eigen::Vector3d(0,0,1)))>0.7){ break; } + else{ + appendCloud_RGB_NORMAL(planeCloud, remainingCloud); + } } - pcl::copyPointCloud(*cloud_tem, *remainingCloud); + appendCloud_RGB_NORMAL(cloud_tem, remainingCloud); } //get transform matrix between plane and x_y plane @@ -1019,7 +1022,8 @@ void getCloudOnTable(PointCloudPtr_RGB_NORMAL cloud, PointCloudPtr rect_cloud, E p.normal_y = cloud_tem->at(k).normal_y; p.normal_z = cloud_tem->at(k).normal_z; - if(cloud_tem->at(k).z < rect_cloud_tem->at(0).z){ + //=========modify the height of tabletop things + if(cloud_tem->at(k).z < rect_cloud_tem->at(0).z + 0.015){ continue; }