0% found this document useful (0 votes)
14 views

Distance Transform

Distance transform is a representation of a digital image where each pixel is labeled with the distance to the nearest obstacle pixel, such as a boundary pixel in a binary image. Common distance metrics used in distance transforms include Euclidean, Manhattan, and Chebyshev distances. Distance transforms have applications in image processing, robotics, and medical imaging.

Uploaded by

brown222
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Distance Transform

Distance transform is a representation of a digital image where each pixel is labeled with the distance to the nearest obstacle pixel, such as a boundary pixel in a binary image. Common distance metrics used in distance transforms include Euclidean, Manhattan, and Chebyshev distances. Distance transforms have applications in image processing, robotics, and medical imaging.

Uploaded by

brown222
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Distance transform

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.[1]

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 Chebyshev
distance transform on a binary image.

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 A distance transformation
known as City block
distance or Manhattan
distance.
Chebyshev distance

There are several algorithms to compute the distance transform for these different distance metrics, however
the computation of the exact Euclidean distance transform (EEDT) needs special treatment if it is computed
on the image grid.[2] Recently, distance transform computation has also been proposed using a static
Schrodinger's equation.[3] This particular approach has the benefit of obtaining an analytical closed-form
solution to distance transforms, and of computing the average distance transform over a set of distance
transforms, owing to the linearity of the Schrödinger equation. Further, this approach has also been
leveraged to extend distance transforms to line-segments and curves.[3]

Applications are digital image processing (e.g., blurring effects, skeletonizing), motion planning in robotics,
medical-image analysis for prenatal genetic testing, and even pathfinding. [4] Uniformly-sampled signed
distance fields have been used for GPU-accelerated font smoothing, for example by Valve researchers.[5]

Signed distance fields can also be used for (3D) solid modelling. Rendering on typical GPU hardware
requires conversion to polygon meshes, e.g. by the marching cubes algorithm.[6]

See also
Signed distance function
Function representation
Parallel curve
Level sets methods for distance computation.[7]

References
1. Gibson, Sarah F. Frisken; Perry, Ronald N.; Rockwood, Alyn P.; Jones, Thouis R. (2000).
"Adaptively sampled distance fields: a general representation of shape for computer
graphics" (https://www.merl.com/publications/docs/TR2000-15.pdf) (PDF). In Brown, Judith
R.; Akeley, Kurt (eds.). Proceedings of the 27th Annual Conference on Computer Graphics
and Interactive Techniques, SIGGRAPH 2000, New Orleans, LA, USA, July 23-28, 2000.
Association for Computing Machinery. pp. 249–254. doi:10.1145/344779.344899 (https://doi.
org/10.1145%2F344779.344899).
2. Strutz, Tilo: The Distance Transform and its Computation. June, 2021, TECH/2021/06,
arXiv:2106.03503v1, https://arxiv.org/abs/2106.03503
3. M. Sethi, A. Rangarajan and K. Gurumoorthy, "The Schrödinger distance transform (SDT) for
point-sets and curves (https://ieeexplore.ieee.org/document/6247676)," 2012 IEEE
Conference on Computer Vision and Pattern Recognition, Providence, RI, USA, 2012, pp.
198-205, doi:10.1109/CVPR.2012.6247676. (https://doi.org/10.1109%2FCVPR.2012.62476
76.)
4. Felzenszwalb, Pedro F.; Huttenlocher, Daniel P. (2012). "Distance transforms of sampled
functions" (https://doi.org/10.4086%2Ftoc.2012.v008a019). Theory of Computing. 8: 415–
428. doi:10.4086/toc.2012.v008a019 (https://doi.org/10.4086%2Ftoc.2012.v008a019).
MR 2967180 (https://mathscinet.ams.org/mathscinet-getitem?mr=2967180).
5. Chris Green. 2007. Improved alpha-tested magnification for vector textures and special
effects. In ACM SIGGRAPH 2007 courses (SIGGRAPH '07). Association for Computing
Machinery, New York, NY, USA, 9–18. doi:10.1145/1281500.1281665 (https://doi.org/10.114
5%2F1281500.1281665)
6. Archived at Ghostarchive (https://ghostarchive.org/varchive/youtube/20211211/2MzSmdC49
Ns) and the Wayback Machine (https://web.archive.org/web/20140125070028/http://www.yo
utube.com/watch?v=2MzSmdC49Ns): Advanced visual effects with DirectX 11 (https://www.
youtube.com/watch?v=2MzSmdC49Ns). YouTube.
7. Kimmel, R.; Kiryati, N. and Bruckstein, A. M.: Distance maps and weighted distance
transforms (https://www.cs.technion.ac.il/~ron/PAPERS/KimKirBru_JMIV1996.pdf). Journal
of Mathematical Imaging and Vision, Special Issue on Topology and Geometry in Computer
Vision, 6:223-233,1996.

External links
Fast distance transform in C++ (http://www.theoryofcomputing.org/articles/v008a019/v008a0
19.pdf) by Felzenszwalb and Huttenlocher
Distance Transform tutorials in CVonline (http://homepages.inf.ed.ac.uk/rbf/HIPR2/distance.
htm)
Survey of fast exact Euclidean distance transform algorithms (https://distance.sourceforge.ne
t)
Using distance mapping for AI (http://www.javaonthebrain.com/java/dungeon/ai.html)
Distance Transforms (http://demonstrations.wolfram.com/DistanceTransforms/) by Henry
Kwong and Dynamic Step Distance Transforms (http://demonstrations.wolfram.com/Dynami
cStepDistanceTransforms/) by Richard Scott, The Wolfram Demonstrations Project.
Morphological DistanceTransform function in Mathematica (http://reference.wolfram.com/mat
hematica/ref/DistanceTransform.html)
Morphological Inverse Distance Transform function in Mathematica (http://reference.wolfram.
com/mathematica/ref/InverseDistanceTransform.html)
A general algorithm for computing distance transforms in linear time [1] (http://www.cs.rug.nl/
~roe/publications/dt.pdf)

Retrieved from "https://en.wikipedia.org/w/index.php?title=Distance_transform&oldid=1164436687"

You might also like