Thursday, February 27, 2014

accessing points in Point clouds with iteration over locations

source: taken from PCL answers

It is very similar to what you would do for an image or a matrix, and it 
is explained all over the tutorials.

Say you have a cloud pcl::Cloud m_cloud; that has been 
populated.
then you can access your points through m_cloud[i] where i is the linera 
index m_cloud.width * row + col or m_cloud (row, col).

So basically pcl::PointXYZ p = cloud[0] works and p = cloud (0,0) works 
as well.

Please read the tutorials or the API documentation, we put many efforts 
on them.
--
Nizar

No comments:

Post a Comment