<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Distance_transform</id>
	<title>Distance transform - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=Distance_transform"/>
	<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Distance_transform&amp;action=history"/>
	<updated>2026-04-21T21:42:16Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.sarg.dev/index.php?title=Distance_transform&amp;diff=352779&amp;oldid=prev</id>
		<title>imported&gt;EvilxFish: remove obviously promotional material</title>
		<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=Distance_transform&amp;diff=352779&amp;oldid=prev"/>
		<updated>2025-03-16T05:05:46Z</updated>

		<summary type="html">&lt;p&gt;remove obviously promotional material&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Derived representation of a digital image}}&lt;br /&gt;
{{more footnotes|date=August 2014}}&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;distance transform&amp;#039;&amp;#039;&amp;#039;, also known as &amp;#039;&amp;#039;&amp;#039;distance map&amp;#039;&amp;#039;&amp;#039; or &amp;#039;&amp;#039;&amp;#039;distance field&amp;#039;&amp;#039;&amp;#039;, is a derived representation of a [[digital image]]. The choice of the term depends on the [[Perspective (cognitive)|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.&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;ref&amp;gt;{{cite conference&lt;br /&gt;
 | last1 = Gibson | first1 = Sarah F. Frisken&lt;br /&gt;
 | last2 = Perry | first2 = Ronald N.&lt;br /&gt;
 | last3 = Rockwood | first3 = Alyn P.&lt;br /&gt;
 | last4 = Jones | first4 = Thouis R.&lt;br /&gt;
 | editor1-last = Brown | editor1-first = Judith R.&lt;br /&gt;
 | editor2-last = Akeley | editor2-first = Kurt&lt;br /&gt;
 | contribution = Adaptively sampled distance fields: a general representation of shape for computer graphics&lt;br /&gt;
 | contribution-url = https://www.merl.com/publications/docs/TR2000-15.pdf&lt;br /&gt;
 | doi = 10.1145/344779.344899&lt;br /&gt;
 | pages = 249–254&lt;br /&gt;
 | publisher = Association for Computing Machinery&lt;br /&gt;
 | title = Proceedings of the 27th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH 2000, New Orleans, LA, USA, July 23-28, 2000&lt;br /&gt;
 | year = 2000| doi-access = free&lt;br /&gt;
 }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The map labels each [[pixel]] of the image with the distance to the nearest &amp;#039;&amp;#039;obstacle pixel&amp;#039;&amp;#039;. A most common type of obstacle pixel is a &amp;#039;&amp;#039;boundary pixel&amp;#039;&amp;#039; in a [[binary image]]. See the image for an example of a [[Chebyshev distance]] transform on a [[binary image]].&lt;br /&gt;
&lt;br /&gt;
[[Image:Distance Transformation.gif|frame|right|A distance transformation]]&lt;br /&gt;
&lt;br /&gt;
Usually the transform/map is qualified with the chosen [[Metric (mathematics)|metric]]. For example, one may speak of &amp;#039;&amp;#039;&amp;#039;Manhattan distance transform&amp;#039;&amp;#039;&amp;#039;, if the underlying metric is [[Manhattan distance]]. Common metrics are:&lt;br /&gt;
* [[Euclidean distance]]&lt;br /&gt;
* [[Taxicab geometry]], also known as &amp;#039;&amp;#039;City block distance&amp;#039;&amp;#039; or &amp;#039;&amp;#039;Manhattan distance&amp;#039;&amp;#039;.&lt;br /&gt;
* [[Chebyshev distance]]&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;ref&amp;gt;Strutz, Tilo: The Distance Transform and its Computation. June, 2021, TECH/2021/06, arXiv:2106.03503v1, https://arxiv.org/abs/2106.03503&amp;lt;/ref&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Applications are [[digital image processing]] (e.g., blurring effects, [[topological skeletons|skeletonizing]]), [[motion planning]] in [[robotics]], medical-image analysis for prenatal [[genetic testing]], and even [[pathfinding]].&lt;br /&gt;
&amp;lt;ref&amp;gt;{{cite journal&lt;br /&gt;
 | last1 = Felzenszwalb | first1 = Pedro F.&lt;br /&gt;
 | last2 = Huttenlocher | first2 = Daniel P. | author2-link = Daniel P. Huttenlocher&lt;br /&gt;
 | doi = 10.4086/toc.2012.v008a019&lt;br /&gt;
 | journal = Theory of Computing&lt;br /&gt;
 | mr = 2967180&lt;br /&gt;
 | pages = 415–428&lt;br /&gt;
 | title = Distance transforms of sampled functions&lt;br /&gt;
 | volume = 8&lt;br /&gt;
 | year = 2012| doi-access = free&lt;br /&gt;
 }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
Uniformly-sampled signed distance fields have been used for [[GPU]]-accelerated [[font]] smoothing, for example by [[Valve Corporation|Valve]] researchers.&amp;lt;ref&amp;gt;&amp;#039;&amp;#039;Chris Green. 2007. Improved alpha-tested magnification for vector textures and special effects. In ACM SIGGRAPH 2007 courses (SIGGRAPH &amp;#039;07). Association for Computing Machinery, New York, NY, USA, 9–18. {{doi|10.1145/1281500.1281665}}&amp;#039;&amp;#039;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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.&amp;lt;ref&amp;gt;Archived at [https://ghostarchive.org/varchive/youtube/20211211/2MzSmdC49Ns Ghostarchive]{{cbignore}} and the [https://web.archive.org/web/20140125070028/http://www.youtube.com/watch?v=2MzSmdC49Ns Wayback Machine]{{cbignore}}: {{cite AV media| url = https://www.youtube.com/watch?v=2MzSmdC49Ns| title = Advanced visual effects with DirectX 11 | website=[[YouTube]]}}{{cbignore}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
* [[Signed distance function]] &lt;br /&gt;
* [[Function representation]] &lt;br /&gt;
* [[Parallel curve]]&lt;br /&gt;
* Level sets methods for distance computation.&amp;lt;ref&amp;gt;Kimmel, R.; Kiryati, N. and Bruckstein, A. M.: [https://www.cs.technion.ac.il/~ron/PAPERS/KimKirBru_JMIV1996.pdf  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.&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
==External links ==&lt;br /&gt;
*[http://www.theoryofcomputing.org/articles/v008a019/v008a019.pdf Fast distance transform in C++] by Felzenszwalb and Huttenlocher&lt;br /&gt;
*[http://homepages.inf.ed.ac.uk/rbf/HIPR2/distance.htm Distance Transform tutorials in CVonline]&lt;br /&gt;
*[http://distance.sourceforge.net Survey of fast exact Euclidean distance transform algorithms]&lt;br /&gt;
*[http://www.javaonthebrain.com/java/dungeon/ai.html Using distance mapping for AI]&lt;br /&gt;
* [http://demonstrations.wolfram.com/DistanceTransforms/ Distance Transforms] by Henry Kwong and [http://demonstrations.wolfram.com/DynamicStepDistanceTransforms/ Dynamic Step Distance Transforms] by Richard Scott, [[The Wolfram Demonstrations Project]].&lt;br /&gt;
*Morphological DistanceTransform function in [http://reference.wolfram.com/mathematica/ref/DistanceTransform.html Mathematica]&lt;br /&gt;
*Morphological Inverse Distance Transform function in [http://reference.wolfram.com/mathematica/ref/InverseDistanceTransform.html Mathematica]&lt;br /&gt;
*A general algorithm for computing distance transforms in linear time [http://www.cs.rug.nl/~roe/publications/dt.pdf]&lt;br /&gt;
&lt;br /&gt;
[[Category:Image processing]]&lt;br /&gt;
[[Category:Digital geometry]]&lt;/div&gt;</summary>
		<author><name>imported&gt;EvilxFish</name></author>
	</entry>
</feed>