Euclidean Distance Transform Encodings
- EDT encodings are representations that store Euclidean or squared distances on grids to capture proximity, shape, and clearance.
- They enable reversible, geometry-preserving representations through methods like REDT and skeletal extraction, balancing exactness with efficiency.
- EDT methodologies are applied in interactive segmentation, robotics, and medical imaging, using dense or sparse hierarchical fields to optimize memory and runtime.
Searching arXiv for the cited EDT-related papers to ground the article in current literature. arxiv_search query: "Euclidean Distance Transform encodings interactive segmentation VDB-EDT reverse Euclidean distance transformation chamfer distances registration ultrasound distance kernel embedding" Euclidean Distance Transform (EDT) encodings are representations that store Euclidean distances, or squared Euclidean distances, in order to encode proximity, shape, clearance, or user interaction on discrete grids and finite point sets. In the literature surveyed here, the term covers several related regimes: dense distance fields on binary images and occupancy grids, sparse hierarchical volumes truncated at a maximum distance, reversible skeletal encodings via maximal balls, prompt channels for interactive segmentation, pairwise Euclidean distance matrices, and intrinsic spectral encodings derived from distance kernels (Strutz, 2021, 0705.3343, Zhu et al., 2021, Rokuss et al., 29 Aug 2025, Alfakih, 2016, Maria et al., 2019). Across these regimes, the common principle is that Euclidean distance is treated not merely as an auxiliary measurement but as the primary representational substrate.
1. Formal definitions and representational scope
On a binary image or voxel grid, the classical distance transform assigns to each location the distance to the nearest point in a reference set. With denoting the object set on an orthogonal grid, the Euclidean distance transform is
and in squared form
in $2$D, with the obvious -dimensional generalization (Strutz, 2021). On occupancy grids used for motion planning, the same construct is written as
or, for computational efficiency, with squared distance, and the result is a distance field that gives obstacle clearance at every cell (Zhu et al., 2021). In binary shape analysis, the squared EDT labels every object point by the squared distance to the nearest background point, so that each grid point stores the radius squared of the largest ball centered there that stays inside the object (0705.3343).
What varies across applications is the object being encoded and the container used for the encoding. In image analysis, the encoding is usually a scalar field over the same grid as the source image. In robotics, the field may be sparse, truncated at , and augmented with nearest-obstacle and wavefront state. In interactive medical segmentation, EDTs are computed from foreground and background click sets and concatenated as additional channels to PET and CT inputs. In Euclidean distance matrix theory, the encoding is the symmetric matrix with
which stores pairwise squared distances between generating points (Alfakih, 2016). In intrinsic topological transforms, the basic object is the distance-to-point function , and the encoding becomes spectral through the distance kernel operator
0
on a compact metric measure space (Maria et al., 2019).
A common source of terminological confusion is that “EDT encoding” may refer either to the transform itself, to the storage format of its output, or to a derived representation that compresses or reparameterizes the same distance information. The surveyed papers use all three senses.
2. Exact Euclidean transforms, squared-distance computation, and approximations
A central distinction in the literature is the difference between arbitrary distance transforms and exact Euclidean distance transforms. The tutorial literature makes this distinction explicit: city-block and chessboard transforms are exact for their own metrics, while chamfer transforms and Danielsson-type vector propagations can approximate Euclidean distance but do not in general equal the true Euclidean result (Strutz, 2021). For 1-dimensional coordinates, the Euclidean metric is
2
whereas the city-block and chessboard metrics correspond to 3 and 4 in the Minkowski family (Strutz, 2021).
Exact EDT algorithms typically operate on squared distances because quadratic structure enables separability and eliminates square roots during the core computation. In the binary-image setting, the 5-dimensional squared EDT can be computed in 6 time by one 7D EDT pass followed by 8 mixing passes that compute lower envelopes of parabolas; this is time-optimal because every grid point must be visited (0705.3343). In the tutorial treatment, a vertical pass computes squared vertical distances, and a horizontal pass then takes the lower envelope of parabolas
9
yielding a linear-time exact EDT over all pixels (Strutz, 2021). These constructions formalize a key property of exact EDT encodings: the encoded quantity is Euclidean, but the computational representation is usually quadratic.
Chamfer distances occupy the principal approximation regime. They are defined by weighted local masks 0 and optimized by minimizing the maximum relative error
1
between chamfer distance 2 and the Euclidean norm (Hajdu et al., 2012). Under the B-case condition 3, the optimal worst-case errors reported for small masks are approximately 4 for 5, 6 for 7, and 8 for 9; in the unconstrained C-case the values are approximately $2$0, $2$1, and $2$2, while the dominating D-case gives approximately $2$3, $2$4, and $2$5 (Hajdu et al., 2012). The practical implication is not that chamfer distances are Euclidean, but that their approximation error can be characterized sharply and optimized for a chosen mask radius.
A recurrent misconception is that fast local propagation automatically yields an EDT. The literature instead separates three categories: non-Euclidean transforms that are exact for another metric, Euclidean approximations such as chamfer or Danielsson-type schemes, and exact Euclidean transforms computed by separable or envelope-based algorithms (Strutz, 2021).
3. EDT as a geometry-preserving and reversible shape encoding
In shape analysis, EDT encodings are not only proximity maps but full geometric encodings of the interior of a binary object. The squared EDT at a point is the radius squared of the largest inscribed ball centered there, so the transform implicitly stores a ball field over the object (0705.3343). This interpretation makes it possible to invert the encoding through the reverse Euclidean distance transform (REDT), which reconstructs a shape as the union of balls centered at selected points with associated radii. For a set of centers $2$6 with squared radii $2$7, the reconstructed shape is
$2$8
and the REDT can be computed separably via upper envelopes of parabolas in $2$9 time (0705.3343).
This viewpoint leads directly to skeletal encodings. The Saito–Toriwaki skeleton 0 is obtained by selecting centers whose associated elliptic paraboloids lie on the upper envelope of the squared distance field. In continuous space, maximal disks coincide with maximal elliptic paraboloids, and the union of maximal balls reconstructs the original shape. In discrete space, however, some centers retained by 1 are not maximal discrete balls, so an additional reduction is required. The Reduced Discrete Medial Axis (RDMA) is defined as a subset of the discrete medial axis extracted from the SDT by optimal REDT and a per-line inclusion reduction; the main theorem states that RDMA is a subset of the discrete medial axis, is reversible, and can be extracted in 2 time (0705.3343).
The representational significance of RDMA is that it compresses the EDT from a volumetric field to a sparse set of maximal-ball centers while preserving exact reconstructability. The paper further introduces a nonreversible filtering stage controlled by two geometric attributes attached to RDMA points: thickness,
3
and covering 4, the size of the corresponding power-diagram cell (0705.3343). Low thresholds retain a fine, reversible encoding; higher thresholds yield coarser, approximate encodings with fewer balls. This establishes an explicit continuum from dense EDT field, to reversible sparse skeletal encoding, to controlled-loss multi-scale representation.
An objective correction to a common oversimplification is that the medial axis is not merely “the ridges of the distance map.” In the discrete reversible setting considered here, additional maximality and inclusion tests are necessary to obtain a compact encoding that still reconstructs the original object exactly (0705.3343).
4. Sparse, hierarchical, and incremental EDT fields
In large sparse environments, the dominant issue is not exactness alone but how the distance field is encoded in memory and updated online. VDB-EDT addresses this by storing the EDT in a VDB volume, a volumetric, dynamic B+ tree variant with coordinate-based indexing and average 5 random access (Zhu et al., 2021). Each cell stores a richer tuple than a pure scalar field:
obst, the coordinate of the closest obstacle cell;dist, the distance to the closest obstacle truncated to 6;raise, the transform status for raising waves;state, the queue status (Zhu et al., 2021).
This encoding exploits sparsity through hierarchical tiles. At initialization, the entire field can be represented by a single background tile with obst = ∅, dist = d_max, raise = notRaise, and state = notQueued. Explicit leaf allocation occurs only in regions within the transform radius of obstacles. As a result, large regions of untouched or far-enough space are represented once rather than voxel by voxel (Zhu et al., 2021).
The dynamic update mechanism is incremental and wavefront-based. Obstacle insertion creates a lowering wave; obstacle removal creates a raising wave. A priority queue ordered by transform radius propagates both, and the raise field stores not just a binary wave type but the transform radius of the raising front. The scheduling rule
7
allows lowering waves to preempt raising waves when the new obstacle is already closer, reducing redundant updates near wave boundaries (Zhu et al., 2021). The paper reports 8–9 speedups over classic incremental EDT on synthetic maps and about 0 over naive scheduling on real datasets.
The principal advantage of this encoding is the memory–runtime trade-off. On real sparse maps, memory dropped from 1 Mb to 2 Mb on fr-campus and from 3 Mb to 4 Mb on new-college, corresponding to about 5 and 6 savings, while runtime remained competitive with dense arrays; for example, global transform on fr-078 was 7 ms for the array implementation and 8 ms for VDBEx, whereas on fr-campus it was 9 ms versus 0 ms (Zhu et al., 2021). Against FIESTA, the reported mean runtime per frame was 1 ms for FIESTA, 2 ms for VDB, and 3 ms for VDBEx on cow-and-lady; on the SubT dataset, FIESTA failed to complete the transform, while VDBEx produced a correct map at 4 ms (Zhu et al., 2021).
This literature also corrects another misconception: a sparse EDT encoding in robotics is not just a sparse array of distances. In VDB-EDT, correctness and incremental efficiency depend on storing nearest-obstacle identity and wavefront state as part of the encoding itself (Zhu et al., 2021).
5. EDT channels and distance maps in medical imaging
In medical imaging, EDT encodings are frequently used as task-conditioned feature channels rather than as standalone outputs. In promptable whole-body PET/CT lesion segmentation, foreground and background clicks are converted into two separate EDT maps and concatenated with PET and CT, giving a four-channel input
5
while the underlying ResEncL U-Net architecture, loss, and hyperparameters remain unchanged from the autoPET III nnU-Net pipeline (Rokuss et al., 29 Aug 2025). The authors explicitly report that they experimented with Gaussian kernels of varying standard deviations 6, normalized to unit volume, and with Euclidean Distance Transforms with different scaling factors inspired by nnInteractive, and that the EDT-based representation consistently outperformed Gaussian kernels (Rokuss et al., 29 Aug 2025).
The quantitative comparison is specific. In five-fold cross-validation, the baseline autoPET III model without prompts achieved Dice Last 7, FPvol Last 8, and FNvol Last 9. The best Gaussian variants reached Dice Last 0 or 1, with FNvol around 2–3. EDT Size 2 reached Dice Last 4 and FNvol Last 5; EDT Size 2 with custom points reached Dice Last 6 and FPvol Last 7; and EDT Size 2 with more data and custom points reached Dice Last 8 and FNvol Last 9 (Rokuss et al., 29 Aug 2025). Prompts were simulated online after data augmentation, with zero to ten prompts per patch for foreground and background, sampled with a logarithmic probability that favors fewer points (Rokuss et al., 29 Aug 2025). The paper’s interpretation is that normalized Gaussians produce low-intensity voxel values that are not effectively captured by the network, whereas EDTs provide a dense continuous-valued map over the whole 0 patch.
A different medical-imaging usage appears in neurosurgical ultrasound registration. There, automatically segmented sulci and falx cerebri are transformed into distance images by assigning each foreground voxel its Euclidean distance to the nearest background voxel and assigning background voxels distance 1 (Canalini et al., 2020). These unsigned distance maps are then used in a variational registration framework with normalized gradient field distance and a curvature regularizer, optimized with limited-memory BFGS. On the RESECT dataset of 2 cases, the average landmark registration error between volumes acquired at the beginning and at the end of neurosurgical procedures was reduced from 3 mm to 4 mm, and the full pipeline had a mean runtime of 5 seconds per case (Canalini et al., 2020).
Taken together, these papers show two distinct but related imaging uses of EDT encodings. In promptable segmentation, EDT is an externalized user-interaction signal injected as channels. In ultrasound registration, EDT is a shape-smoothing transform applied to segmented anatomy before optimization. In both cases, the encoded distances are unsigned and application-specific; they are not signed distance functions, and the literature is explicit when only foreground-to-background distance or separate foreground/background prompt channels are used (Rokuss et al., 29 Aug 2025, Canalini et al., 2020).
6. Matrix and spectral generalizations of distance-based encoding
Some recent work broadens the notion of EDT encoding beyond grid fields. Euclidean distance matrix theory treats a finite configuration 6 through the matrix
7
with Euclidean realizability characterized by positive semidefiniteness of the centered Gram matrix
8
(Alfakih, 2016). This is not a grid-based distance transform, but the paper explicitly frames it as the matrix version of EDT encodings and studies their robustness through yielding intervals. For an entry 9, the yielding interval 0 is defined by the condition that 1 remains a Euclidean distance matrix if and only if 2 (Alfakih, 2016). An entry is unyielding if the interval has length 3, and the characterization is given in terms of Gale transforms: 4 is unyielding if and only if 5 is not parallel to 6. Two unyielding entries 7 and 8 are jointly yielding if and only if
9
for nonzero scalars 00 and 01 (Alfakih, 2016). The practical significance is that distance-based encodings can be analyzed for per-entry and coupled perturbation robustness without leaving Euclidean geometry.
A further generalization appears in intrinsic topological transforms via the distance kernel embedding. For a compact metric measure space 02, the distance kernel operator
03
is self-adjoint and compact, so it admits eigenvalues 04 and eigenfunctions 05 (Maria et al., 2019). Defining
06
yields a spectral coordinate system in which each distance-to-point function 07 has an eigenfunction expansion (Maria et al., 2019). Under a strictly positive measure, the infinite embedding 08 is injective; for finite and standard metric measure spaces, sufficiently large 09 gives coarse injectivity; and the embedding is stable with respect to modified Gromov–Prokhorov distance (Maria et al., 2019). The same eigenfunctions are then used to define intrinsic persistence kernel and Euler kernel transforms.
This broader literature suggests a unifying interpretation. Classical EDT fields, VDB distance volumes, prompt channels, reversible medial axes, Euclidean distance matrices, and distance-kernel embeddings differ in storage format and downstream use, but all encode Euclidean or metric distance as the primary carrier of geometric information. The principal disagreements in the literature are therefore not about whether distance is informative, but about which encoding is exact or approximate, dense or sparse, reversible or compressed, extrinsic or intrinsic, and static or incrementally maintainable (Strutz, 2021, Zhu et al., 2021, 0705.3343, Maria et al., 2019).