I have a very simple question:
I have an organized point cloud stored in a pcl::PointCloud<pcl::PointXYZ>
data structure.
If I didn't get it wrong, organized point clouds should be stored in a matrix-like structure.
So, my question is: is there a way to access this structure with row and column index? Instead of accessing it in the usual way, i.e., as a linear array.
To make an example:
//data structure
pcl::PointCloud<pcl::PointXYZ> cloud;
//linearized access
cloud[j + cols*i] = ....
//matrix-like access
cloud.at(i,j) = ...
Thanks.
cloud.at(column, row)
should have worked for you. Did you encounter any issues with it? Are you sure that your cloud is organized (cloud.isOrganized()
)? – Unimproved