2

After segmenting out subset of a pointcloud that fitted using pcl::SACMODEL_LINE RANSAC line segmentation module. In the next step center point of extracted point cloud is computed using

pcl::compute3DCentroid(point_cloud, centroid);

Which gives accurate center point until the camera and the extracted line model object are parallel to each other. In the last step the corner points of the extracted point cloud i.e a fitted line are calculated by the addition of known distance on the centerpoint to calculate the corner points. This technique will be valid until the camera and the extracted line model object are parallel to each other as soon as camera makes an angle with it, the corner point calculation technique fails. Any suggestions what should I do to calculate the corner points using an existing reliable method in PCL library to compute the corner points of the extracted point cloud data (pcl::SACMODEL_LINE).

Thanks in advance.

Plot 1

Plot2

2017_John
  • 99
  • 2
  • 9

1 Answers1

2

If you have your subset cloud accurately extracted using RANSAC, you should be able to use getMinMax3d() to find two corner points. http://docs.pointclouds.org/1.7.0/group__common.html#ga3166f09aafd659f69dc75e63f5e10f81

While these are not actual points of the subset cloud, they can be used to determine the boundary and the points that lie on it.

brad
  • 930
  • 9
  • 22
  • Thankyou. Could you please explain a bit more the following point mentioned in your post. "While these are not actual points of the subset cloud, they can be used to determine the boundary and the points that lie on it." – 2017_John Jul 04 '17 at 20:51
  • 1
    Imagine you have a point cloud with only two points (-5, 10, -2) and (5, -10, 2). The result of getMinMax3d() would be (-5, -10, -2) and (5, 10, 2). These "points" do not actually exist in the cloud, but they do give all the information about maximum and minimum values for each dimension. For example, you could then use the x minimum of -5 to find the point (-5, 10, -2) – brad Jul 05 '17 at 13:33
  • Thanks it really helped to understand. – 2017_John Jul 10 '17 at 10:59
  • If you see the newly attached pictures where I plotted these points. As I understand the green points will be the result of getMinMax3d() right ? and after introducing the dimension lets say as you mentioned mapping x from the getMinMax3d() onto the original point right ? – 2017_John Jul 10 '17 at 11:25