Main Content

addDescriptor

Add descriptor to the loop closure detector

Description

example

addDescriptor(loopDetector,viewID,descriptor) adds the scan context descriptor descriptor that corresponds to the view identifier viewID to the loop closure detector loopDetector.

Compute descriptors to add to the loop closure detector over the same radial range, with the same number of radial and azimuthal bins. Use the viewID input to associate descriptors with a view in pcviewset.

Examples

collapse all

Create a loop closure detector.

loopDetector = scanContextLoopDetector;

Load point cloud data into the workspace.

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

Extract a scan context descriptor from the point cloud data.

descriptor = scanContextDescriptor(ptCloud);

Add the descriptor to the loop closure detector.

viewId = 1;
addDescriptor(loopDetector,viewId,descriptor);

Input Arguments

collapse all

Loop closure detector, specified as a scanContextLoopDetector object.

View identifier, specified as a positive integer. You can use the same viewID to associate descriptors with a view in a pcviewset.

Scan context descriptor, specified as an M-by-N matrix, where M is the number of radial bins and N is the number of azimuthal bins.

Introduced in R2021b