Distance transform
|
A distance transform, also known as distance map or distance field, is a 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.
The map supplies each pixel of the image with the distance to the nearest obstacle pixel. A most common type obstacle pixel is a boundary pixel in a binary image. See the image for an example of an chessboard distance transform on a binary image.
Distance_Transformation.gif
Usually the transform/map is qualified with the chosen metric. For example, one may speak of Manhattan distance transform, if the underlying metric is Manhattan distance. Common metrics are:
- Euclidean distance
- Taxicab geometry, also known as City block distance or Manhattan distance.
- Chessboard distance
Among applications are digital image processing (e.g., blurring effects, skeletonizing), motion planning in robotics, and even pathfinding.
External links
- Distance transform (http://www.cee.hw.ac.uk/hipr/html/distance.html)
- Euclidean distance map (http://www.reindeergraphics.com/tutorial/chap6/binary03.html)
- Using distance mapping for AI (http://www.javaonthebrain.com/java/dungeon/ai.html)