Ask Your Question

Revision history [back]

As shown here, the computeFeature call is a protected member of the BoundaryEstimation class, so you are not able to call this method from your code. You can see in the source for compute that computeFeature is called by the publicly-accessible compute method. So, it should be sufficient to just call compute.

Try just removing these lines:

pcl::PointCloud<pcl::Boundary>::Ptr boundary_cloud (new pcl::PointCloud<pcl::Boundary> ()); 
est.computeFeature(*boundary_cloud); /// Error Here
click to hide/show revision 2
add boundary XYZ details

As shown here, the computeFeature call is a protected member of the BoundaryEstimation class, so you are not able to call this method from your code. You can see in the source for compute that computeFeature is called by the publicly-accessible compute method. So, it should be sufficient to just call compute.

Try just removing these lines:

pcl::PointCloud<pcl::Boundary>::Ptr boundary_cloud (new pcl::PointCloud<pcl::Boundary> ()); 
est.computeFeature(*boundary_cloud); /// Error Here

Edit:
I believe that pcl::BoundaryEstimation only returns a boolean flag for whether or not a given point is on the boundary. You'll need to access the original point cloud to get the XYZ coordinates of matching points:

for (int i=0; i<cloud.size(); i++)
  if (boundaries.points[i].boundary_point == 1)
    cout << cloud.points[i];

If you are seeing garbage values when printing out boundary_point values, it may be because BoundaryEstimation can't find the nearest-neighbors in your point cloud. In this case, it sets boundary_point to NaN (which may look like "garbage" when printed.