Pregunta

I'm very new to PCL. I try to detect the floor under an object for checking if the object topples or is it positioned horizontally.

I've checked API and found the method: pcl::PointCloud< T >::at.

Seems like I could detect Z-value of a point using at. Is it correct?

If yes, I'm confused, how it should work. Mathematically a point is infinite small. On my scans I see the point-density the smaller the more distinct they are in Z-direction. Will at always return a point? Is the value the mean of nearest physical points?

¿Fue útil?

Solución

As referenced in the documentation, pcl::PointCloud< T >::at returns the information of a single point (the coordinates plus other data depending on the point format) given column and row information (roughly the X,Y in the depth image). For this reason, this method just works on organized clouds.

Unfortunately, not every point is a valid point. Unless you filter the point cloud, you could find invalid measurements (points which have NaN components). This is pretty normal, just discard those points using a filter. Your intuition is right, the point density is smaller the further away you go from the sensor.

As for what you're trying to achieve, you should take a look at the planar segmentation tutorial on the PCL website and at the Table Object Detector software by Nicolas Burrus. The latter extracts a plane, and the clusters of objects on top of it.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top