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.

Details and OptionsDetails and Options

Introduced in 2008
(7.0)
| Updated in 2014
(10.0)