MATLAB: Histograms from point cloud

density of datahistogrampoint cloudxyzpoints

Hello,
Basically, I have 3D coordinates points (xyzPoints) and I want to display 3 histograms of x, y and z coordinates values in order to visualize the density of data cloud.
xyzPoints = reconstructScene(disparityMap, stereoParamsTEST);
xyzPoints = xyzPoints./1000;
ptCloud = pointCloud(xyzPoints);
figure(4);
pcshow(ptCloud);
title('Point cloud');
How do I create variables for x, y and z coordinates values to do this :
subplot(2,2,1);
hist(x);
subplot(2,2,2);
hist(y);
subplot(2,2,3);
hist(z);
Thanks

Best Answer

It looks like you can use the columns from xyzPoints, because they seem to store the coordinates. Otherwise you could also use the location property of your point cloud object.
Related Question