gives the distance transform of image, in which the value of each pixel is replaced by its distance to the nearest background pixel.
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.
- ImageAdjust[result] normalizes the pixel values in the result from DistanceTransform.
- For multichannel images, DistanceTransform operates on the intensity averaged over all channels.
- DistanceTransform[image] is equivalent to DistanceTransform[image, 0].
- The following option can be given:
DistanceFunction EuclideanDistance distance metric function
- The default setting is DistanceFunction->EuclideanDistance. Other typical settings include ManhattanDistance and ChessboardDistance.
- DistanceTransform takes a Padding option. The default setting is Padding->1.
New in 7 | Last modified in 8