Main Content

downsampleLessPlanar

Downsample less planar surface points

Description

example

pointsOut = downsampleLessPlanar(pointsIn,gridStep) downsamples the less planar surface points pointsIn using a box grid filter with 3-D boxes of the specified size gridStep. The function merges input points within the same box to a single point in the output.

To speed up LOAM registration, downsample the less planar surface points using the downsampleLessPlanar function, then register the LOAM points using the pcregisterloam function.

Examples

collapse all

Load an organized lidar point cloud into the MATLAB® workspace from a MAT file.

ld = load("drivingLidarPoints.mat");
ptCloud = ld.ptCloud;

Detect LOAM feature points in the point cloud.

points = detectLOAMFeatures(ptCloud);

Downsample the less planar surface points.

gridStep = 0.5;
pointsOut = downsampleLessPlanar(points,gridStep);

Visualize the downsampled LOAM points.

figure
show(pointsOut)

Input Arguments

collapse all

Input points, specified as a LOAMPoints object.

Size of the 3-D box for downsampling less planar surface points, specified as a positive scalar.

Output Arguments

collapse all

Downsampled points, returned as a LOAMPoints object.

Version History

Introduced in R2022a