Main Content

deleteSegments

Delete all segments in map

Description

example

sMapOut= deleteSegments(sMapIn)deletes all segments in the mapsMapIn. Removing the segments from the map improves the performance of thefindPoseandupdateMapobject functions.

Examples

collapse all

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

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

删除的部分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 apcmapsegmatchobject.

Output Arguments

collapse all

Updated map of segments and features, returned as apcmapsegmatchobject.

Version History

Introduced in R2021a

See Also

Objects

Functions