M-File Help: distancexform View code for distancexform

distancexform

Distance transform of occupancy grid

d = distancexform(world, goal) is the distance transform of the occupancy grid world with respect to the specified goal point goal = [X,Y]. The elements of the grid are 0 from free space and 1 for occupied.

d = distancexform(world, goal, metric) as above but specifies the distance metric as either 'cityblock' or 'Euclidean'

d = distancexform(world, goal, metric, show) as above but shows an animation of the distance transform being formed, with a delay of show seconds between frames.

Notes

See also

imorph, DXform


 

© 1990-2012 Peter Corke.