Main Content

deleteSegments

Delete all segments in map

Since R2021a

Description

example

sMapOut = deleteSegments(sMapIn) deletes all segments in the map sMapIn. Removing the segments from the map improves the performance of the findPose and updateMap object functions.

Examples

collapse all

Load a map of segments and features from a MAT file.

data = load('segmatchMapFullParkingLot.mat');
sMap = data.segmatchMapFullParkingLot;

Remove the segments from the map, leaving only the corresponding features in the map.

sMapNoSegments = deleteSegments(sMap);

Verify the number of segments in the map before and after removal.

numBefore = numel(sMap.Segments);
numAfter = numel(sMapNoSegments.Segments);
disp("Number of Segments Before Deleting Segments: " + num2str(numBefore))
Number of Segments Before Deleting Segments: 464
disp("Number of Segments After Deleting Segments: " + num2str(numAfter))
Number of Segments After Deleting Segments: 0

Input Arguments

collapse all

Original map of segments and features, specified as a pcmapsegmatch object.

Output Arguments

collapse all

Updated map of segments and features, returned as a pcmapsegmatch object.

Version History

Introduced in R2021a

See Also

Objects

Functions