Main Content


Convert 3-D point cloud into organized point cloud



ptCloudOut = pcorganize(ptCloudIn,params) converts a 3-D point cloud, ptCloudIn, into an organized point cloud, ptCloutOut, using the sensor parameters, params.


collapse all

Load point cloud data into the workspace.

fileName = fullfile(toolboxdir("lidar"),"lidardata","lcc","HDL64", ...
ptCloudUnorg = pcread(fileName);

Specify the horizontal resolution of the lidar sensor.

horizontalResolution = 1024;

Create a lidarParameters object that represents an HDL64E sensor with the specified horizontalResolution.

params = lidarParameters('HDL64E',horizontalResolution);

Convert the unorganized point cloud into an organized point cloud.

ptCloudOrg = pcorganize(ptCloudUnorg,params);

Display the dimensions of the input point cloud.

ans = 1×2

       37879           3

Display the size of the converted point cloud. pointCloud objects store organized point clouds as M-by-N-by-3 arrays, whereas they store unorganized point clouds as M-by-3 matrices

ans = 1×3

          64        1024           3

Input Arguments

collapse all

Input point cloud data, specified as a pointCloud object.

Lidar sensor parameters, specified as a lidarParameters object. For more information about lidar sensor parameters, see Lidar Sensor Parameters.

Output Arguments

collapse all

Organized point cloud data, returned as a pointCloud object.

Introduced in R2021b