signedDistanceMap
Description
Use the signedDistanceMap object to represent distances to surfaces or
contours in space using signed distance functions. Query points return positive values if they
lie outside an occupied region of space and negative if they lie inside a space. This map
object also provides gradient information and the location to nearest occupied cell in the
scene.
Creation
Syntax
Description
Dimensions
creates an empty
2-D signed distance map object occupying 10-by-10 meters of space with a resolution of 1
cell per meter.map = signedDistanceMap
Other Maps
creates a map of the same size and value as the matrix
map = signedDistanceMap(mapmatrix)mapmatrix.
creates a map from the values in the matrix or matrix array
map = signedDistanceMap(mapmatrix,resolution)mapmatrix with a resolution resolution. The
Resolution property is set to
resolution.
creates an object using values from another map object. Note that converting from a
probabilistic map representation such as an occupancy map to a binary map representation
such as a signed distance map may cause some loss of information due to differences in
how occupancy values are encoded.map = signedDistanceMap(sourcemap)
creates a new object using the occupancy data copied from another map object but
resamples the matrix to have the specified resolution map = signedDistanceMap(sourcemap,resolution)resolution.
The Resolution property is set to
resolution.
Additional Options
specifies property values using name-value arguments. map = signedDistanceMap(___,Name=Value)
For example, signedDistanceMap(__,LocalOriginInWorld=[15 20])
sets the local origin to a specific world location.
Input Arguments
Properties
Object Functions
copy | Create copy of 2-D signed distance map |
closestBoundary | Get nearest boundary to location |
distance | Get distance at locations |
getMapData | Retrieve data from map layer |
gradient | Get gradient at locations |
grid2world | Convert grid indices to world coordinates |
grid2local | Convert grid indices to local coordinates |
local2grid | Convert local coordinates to grid indices |
local2world | Convert local coordinates to world coordinates |
move | Move map in world frame |
setMapData | Assign data to map layer |
show | Display signed distance map |
syncWith | Sync map with overlapping map |
world2grid | Convert world coordinates to grid indices |
world2local | Convert world coordinates to local coordinates |
![Figure contains an axes object. The axes object with xlabel X [meters], ylabel Y [meters] contains an object of type image.](../../examples/nav/win64/CreateSignedDistanceMapExample_01.png)
![Figure contains an axes object. The axes object with xlabel X [meters], ylabel Y [meters] contains an object of type image.](../../examples/nav/win64/CreateSignedDistanceMapExample_02.png)
![Figure contains an axes object. The axes object with xlabel X [meters], ylabel Y [meters] contains 2 objects of type image, line.](../../examples/nav/win64/CreateSignedDistanceMapExample_03.png)