This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.

# DistanceTransform

 DistanceTransform[image] gives the distance transform of image, in which the value of each pixel is replaced by its distance to the nearest background pixel. DistanceTransform[image, t]treats values above t as foreground.
• DistanceTransform gives an Image object in which the value of each pixel is the absolute Euclidean distance in pixels to the nearest pixel of background.
• For multichannel images, DistanceTransform operates on the intensity averaged over all channels.
• The following option can be given:
 DistanceFunction EuclideanDistance distance metric function
Create a binary image:
Compute its distance transform and normalize the result:
Distance transform of random disks:
Create a binary image:
 Out[1]=
Compute its distance transform and normalize the result:
 Out[2]=

Distance transform of random disks:
 Out[1]=
 Applications   (1)
Apply a LoG filter to the output of a distance transform:
New in 7