updateMap
Description
Examples
Apply Translation and Rotation To Entire Map
Load a map of segments and features from a MAT file into the workspace.
data = load("segmatchMapFullParkingLot.mat");
sMap = data.segmatchMapFullParkingLot;
Visualize the map.
figure show(sMap)
Change the viewing angle to top-view.
view(2)
title("Initial Map")
Define the transformation.
eulerAngles = [0 0 45]; % degrees
trans = [100 200 0];
tform = rigidtform3d(eulerAngles,trans);
numViews = numel(sMap.ViewIds);
tforms = repmat(tform,numViews,1);
Update the segments and features of each view with the defined transformation.
sMap = updateMap(sMap,tforms);
Visualize the transformed map.
figure show(sMap)
Change the viewing angle to top-view.
view(2)
title("Transformed Map")
Input Arguments
sMapIn
— Original map of segments and features
pcmapsegmatch
object
Original map of segments and features, specified as a pcmapsegmatch
object.
tforms
— Transformations
M-element vector of rigidtform3d
objects
Transformations, specified as an M-element vector of rigidtform3d
objects. M is the number of views in the map.
Output Arguments
sMapOut
— Updated map of segments and features
pcmapsegmatch
object
Updated map of segments and features, returned as a pcmapsegmatch
object. After the function updates the locations, it removes possible duplicates in the
map based on the CentroidDistance
property of the map.
The function resets the selected submap, specified by the
SelectedSubmap
property of the pcmapsegmatch
object, to the extent of the map based on the centroid locations.
Tips
To improve performance, remove all segments from the map using the
deleteSegments
function.
Version History
Introduced in R2021aR2022b: Supports rigidtform3d
objects
You can now specify tform
as a rigidtform3d
object, which uses the premultiply convention. Although you can still specify
tform
as a rigid3d
object,
this object is not recommended because it uses the postmultiply convention. For more
information, see Migrate Geometric Transformations to Premultiply Convention.
Commande MATLAB
Vous avez cliqué sur un lien qui correspond à cette commande MATLAB :
Pour exécuter la commande, saisissez-la dans la fenêtre de commande de MATLAB. Les navigateurs web ne supportent pas les commandes MATLAB.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)