Search code examples
matlabkinectmatlab-cvstpoint-clouds

Ploting point clouds using Matlab


I am using below code to plot the Kinect point clouds in Matlab:

showPointCloud(pcloud, 'VerticalAxis', 'y', 'VerticalAxisDir', 'Down');
xlabel('X (m)');
ylabel('Y (m)');
zlabel('Z (m)');

Which give me this plot : enter image description here

But I wish to plot it up to 1 m in Z value! How can I set it to display point clouds up to 1 m?


Solution

  • As @LuisMendo responded in comments:

    when i use zlim the plot has changed as below :

    enter image description here

    This is the edited code :

    showPointCloud(pcloud, 'VerticalAxis', 'y', 'VerticalAxisDir', 'Down');
    xlabel('X (m)');
    ylabel('Y (m)');
    zlabel('Z (m)');
    
    zlim ([0,1])