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 a new object using the occupancy data copied from another
map
= signedDistanceMap(sourcemap
)signedDistanceMap
object.
creates a new object using the occupancy data copied from another
map
= signedDistanceMap(sourcemap
,resolution
)signedDistanceMap
object but resamples the matrix to have the
specified 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 |
Examples
Version History
Introduced in R2023a