Using the Distance Transform

​
foreground range
0.7
view
result only
thumbnail of original image
side-by-side comparison
The distance transform gives the distance-map representation of an image. It replaces each pixel with the Euclidean distance between the pixel and the nearest background pixel. It is used in various applications, such as blurring, pathfinding, motion planning in robotics, and so on. It can also be used to classify certain objects in an image as foreground or background by defining a threshold. The "foreground range" control in this Demonstration is an example of such a threshold where all the pixels above this threshold are treated as foreground.

External Links

Distance Transform (Wolfram Documentation Center)

Permanent Citation

Srivani Pinneli, Yu-Sung Chang
​
​"Using the Distance Transform"​
​http://demonstrations.wolfram.com/UsingTheDistanceTransform/​
​Wolfram Demonstrations Project​
​Published: March 7, 2011