Main Content

getRegion

Read arbitrary region of blocked point cloud

Since R2022a

Description

example

ptCloud = getRegion(bpc,roi) returns all points in the blocked point cloud bpc in specified region roi.

[ptCloud,pointAttributes] = getRegion(___) returns additional point attribute information pointAttributes, using all input arguments from the previous syntax, if the input is a LAZ or LAS file.

Examples

collapse all

Create a blocked point cloud from a LAZ file.

pcfile = fullfile(toolboxdir("lidar"),"lidardata", ...
  "las","aerialLidarData.laz");
bpc = blockedPointCloud(pcfile,[50 50]);

Specify a region in the point cloud and retrieve the data.

pcRegion = getRegion(bpc,[429745.02 429775.02 ...
                3679830.75 3679860.75 72.79 125.82]);

Plot the point cloud data from the specified region.

pcshow(pcRegion)

Input Arguments

collapse all

Blocked point cloud, specified as a blockedPointCloud object.

ROI limits of the block, specified as a six-element row vector of form [xmin xmax ymin ymax zmin zmax], defining the range of the block.

Output Arguments

collapse all

Point cloud data from specified region, returned as a pointCloud object.

Point attributes, returned as a lidarPointAttributes object.

Version History

Introduced in R2022a