||This article includes a list of references, but its sources remain unclear because it has insufficient inline citations. (August 2014) (Learn how and when to remove this template message)|
A distance transform, also known as distance map or distance field, is a derived representation of a digital image. The choice of the term depends on the point of view on the object in question: whether the initial image is transformed into another representation, or it is simply endowed with an additional map or field.
Distance fields can also be signed, in the case where it is important to distinguish whether the point is inside or outside of the shape.
The map labels each pixel of the image with the distance to the nearest obstacle pixel. A most common type of obstacle pixel is a boundary pixel in a binary image. See the image for an example of a chessboard distance transform on a binary image.
- Euclidean distance
- Taxicab geometry, also known as City block distance or Manhattan distance.
- Chessboard distance
The distance transform can also be used for font rendering using vectors instead of sampling from texture, as in the opensource project GLyphy.
- Green, Chris (2007). "Improved alpha-tested magnification for vector textures and special effects". ACM SIGGRAPH 2007 courses on - SIGGRAPH '07. doi:10.1145/1281500.1281665.
- R. Kimmel, N. Kiryati, and A. M. Bruckstein. Distance maps and weighted distance transforms. Journal of Mathematical Imaging and Vision, Special Issue on Topology and Geometry in Computer Vision, 6:223-233,1996.
- Fast distance transform in C++ by Felzenszwalb and Huttenlocher
- Distance Transform tutorials in CVonline
- Survey of fast exact Euclidean distance transform algorithms
- Using distance mapping for AI
- Distance Transforms by Henry Kwong and Dynamic Step Distance Transforms by Richard Scott, The Wolfram Demonstrations Project.
- Morphological DistanceTransform function in Mathematica
- Morphological InverseDistanceTransform function in Mathematica
- A general algorithm for computing distance transforms in linear time