---
title: 'SEDT: Signed Euclidean Distance Transform'
url: https://www.emergentmind.com/topics/signed-euclidean-distance-transform-sedt
type: topic
---

# SEDT: Signed Euclidean Distance Transform

The Signed Euclidean Distance Transform (SEDT) is a scalar representation of a binary set, image, or sampled domain in which each pixel or voxel stores the Euclidean distance to the nearest boundary, or equivalently to the nearest sample of the opposite phase, together with a sign indicating which side of the interface the point occupies. In the literature it appears both as a discrete signed distance function and, in robotics, as an Euclidean Signed Distance Field (ESDF). The representation is central because it retains region membership through the sign and geometric proximity through the magnitude, which makes it useful for numerical PDEs, topology, morphology, and collision-aware planning [2106.03503; 1812.06740; 1611.03631].

## 1. Definitions and sign conventions

For sets \(A \subset \mathbb{R}^n\), one common convention writes the signed distance as
\[
\phi_A(x)=
\begin{cases}
d_A(x), & x \notin A,\\
-d_{\mathbb{R}^n \setminus A}(x), & x \in A,
\end{cases}
\]
where \(d_A(x)=\inf_{y\in A}\|x-y\|\). In gridded binary data, an equivalent formulation assigns to each sample the Euclidean distance to the nearest point of the opposite class, with zero on the interface [1812.06740].

In image-analysis usage, the SEDT is often defined directly on a foreground set \(B\) by
\[
\mathrm{SEDT}(x)=
\begin{cases}
+\operatorname{dist}(x,\partial B), & x\in B,\\
-\operatorname{dist}(x,\partial B), & x\notin B,
\end{cases}
\]
while the same paper also states that zero corresponds to the object boundary [2509.09140]. Other works reverse the polarity. A convolution-based variational method defines the signed distance to be positive inside a closed region and negative outside [1112.3010]. In robotic mapping, ESDFs are described as positive in free space, zero on a surface, and negative within an object [1611.03631]. In Arctic melt-pond analysis, water pixels are assigned negative values and ice pixels positive values [2212.07961].

The lack of a universal sign convention is therefore not an inconsistency of the underlying geometry but a difference in application semantics. This suggests that the invariant content of the SEDT is the Euclidean magnitude and the zero level set, while the sign polarity is domain-specific.

## 2. Geometric and analytic structure

The SEDT is tied to the Eikonal structure of distance fields. A high-order signed distance transform of sampled signals is defined by three conditions: it satisfies the Eikonal equation, it recovers the original binary image through a Heaviside function, and it has order of accuracy greater than unity away from the medial axis:
\[
|\nabla \phi|=1,\qquad \theta(-\phi)=I,\qquad \|\tilde{\phi}-\phi\|_p \le C h^m,\; m>1.
\]
A continuous ESDF formulation in trajectory optimization likewise states that the field is continuous and differentiable everywhere except at cut-locus, that its gradient is Lipschitz-continuous everywhere except at cut-locus, and that \(\|\nabla \mathrm{ESDF}(x)\|=1\) almost everywhere [2110.13354; 2509.20084].

Near smooth interfaces, the signed-distance function provides a natural orthogonal coordinate system. For a smooth surface \(S\subset \mathbb{R}^3\), points in a tubular neighborhood can be represented as
\[
x=p(s)+\sigma\,n(p(s)),
\]
with \(p(s)\) a surface parametrization, \(n\) the unit normal, and \(\sigma\) the signed distance. In these coordinates,
\[
\nabla \sigma = n,\qquad |J|=(1-\sigma\kappa_1)(1-\sigma\kappa_2),
\]
and vector-calculus operators such as gradient, divergence, curl, and Laplacian admit explicit curvature-dependent formulas. This makes the SEDT not merely a representation of proximity but a coordinate function for boundary-layer asymptotics and interface calculus [2302.02891].

A distinct analytic viewpoint replaces the nonlinear static Hamilton–Jacobi equation by a linear PDE. In the convolution-based method, one solves
\[
-\tau^2 \nabla^2 \phi + \phi = \psi^\tau,
\]
then recovers the approximate distance by
\[
S=-\tau\log \phi.
\]
As \(\tau\to 0\), this construction converges to the Euclidean distance function. The formulation is significant because it embeds a nonlinear Eikonal problem inside a linear variational framework [1112.3010].

## 3. Computational methods

The algorithmic literature distinguishes arbitrary distance transforms from exact Euclidean distance transformations. Exact Euclidean computation on sampled grids admits linear-time algorithms based on separability and the lower envelope of parabolas, whereas several modern SEDT methods instead pursue improved smoothness, fixed-domain PDE formulations, or hardware acceleration [2106.03503; 2110.13354].

| Method | Core relation | Stated property |
|---|---|---|
| Linear-time exact EDT | Separable squared distance; lower envelope of parabolas | Exact Euclidean transform in \(O(ML)\) [2106.03503] |
| Convolution-based signed transform | \(-\tau^2\nabla^2\phi+\phi=\psi^\tau\), \(S=-\tau\log\phi\) | FFT-based computation; sign from winding number or topological degree [1112.3010] |
| Elliptic fixed-domain construction | \(-a\Delta u_a+u_a=f\) | Geometry encoded in source term; no remeshing [2401.17665] |
| High-order SDT | Exact SDT initialization plus WENO fast sweeping | Large constant, linear time complexity; arbitrary dimensionality sampled signals [2110.13354] |
| Parallel raster scan | Iterative scan passes for Euclidean distance transforms | Efficient CPU/GPU EDT, but no explicit native SEDT claim [2208.00001] |

The exact Euclidean-transform tutorial describes the classical fast route: a vertical pass computes one-dimensional squared distances, then a horizontal pass combines these via parabolic envelopes, yielding total complexity \(O(ML)\) in 2D [2106.03503]. This exactness is important because approximate chamfer- or propagation-based transforms can depart from the true Euclidean metric.

The convolution-based method replaces derivative discretization by closed-form discrete convolutions. In 2D and 3D, the Green’s-function formulation produces a sum of exponentials for small \(\tau\), and the sign is determined separately: by the winding number in 2D and by the topological degree in 3D. The paper emphasizes that these sign computations can also be performed via fast convolutions [1112.3010].

An alternative elliptic method extends Varadhan’s theory by adding a source term that encodes the set of interest:
\[
-a\Delta u_a + u_a = f \quad \text{in } \Omega,\qquad u_a=g \quad \text{on } \partial\Omega.
\]
The distance is then recovered from \(-\sqrt{a}\log u_a\), and a signed version is obtained from a piecewise logarithmic formula involving \(u_a\) and a constant \(C^*\). Because the computational domain remains fixed and only the source term changes, the method is explicitly motivated by structural optimization and moving-interface settings [2401.17665].

High-order SDT methods attack a different limitation: quantization. The proposed algorithm initializes from an exact SDT, then corrects quantization through an upwind solver for the boundary-value Eikonal equation, using WENO stencils and fast sweeping in all \(2^d\) directions. The method is stated to apply in arbitrary dimensions [2110.13354].

## 4. Accuracy, discretization, and comparison metrics

A central numerical issue is that the traditional exact SDT on sampled data inherits the quantization of the sampling grid. The high-order SDT literature therefore defines improvement not by exactness with respect to the discrete grid, but by satisfying the Eikonal equation, preserving the Heaviside recovery condition, and achieving higher than first-order accuracy away from shocks. The reported effect is that meshed surfaces are visually smoother and do not exhibit artifacts of quantization in local mean and Gaussian curvature [2110.13354].

The same work is explicit about limits. The method cannot attain arbitrary order of accuracy, is limited by the initialization method and by non-uniqueness of the problem, and near shocks in the distance function the order necessarily degenerates to first-order. Non-uniqueness arises from possible sub-voxel shifts, and the implementation re-centers the interface during iterations as a stabilizing heuristic [2110.13354].

In the convolution-based approximation, the error is controlled analytically. As \(\tau\to 0\), the computed field converges to the true unsigned Euclidean distance, while for finite \(\tau\) the approximation slightly underestimates the true distance and satisfies
\[
|R(X)-S(X)| \le \tau \log K.
\]
The paper also notes a practical numerical limit: for extremely small \(\tau\), high-precision arithmetic may be needed to avoid underflow or roundoff [1112.3010].

SEDT values also interact nontrivially with comparison metrics. For Hausdorff distance, the key identity involves the unsigned distance functions:
\[
d_H(A,B)=\|d_A-d_B\|_\infty.
\]
By contrast, the difference of signed distance functions does not compute the Hausdorff distance. The stated relation is
\[
\max\!\left(d_H(A,B),\, d_H(\mathbb{R}^n\setminus A,\mathbb{R}^n\setminus B)\right)
\le \|\phi_A-\phi_B\|_\infty
\le d_H(A,B)+d_H(\mathbb{R}^n\setminus A,\mathbb{R}^n\setminus B).
\]
For gridded numerical data, evaluating the unsigned-distance difference only at grid points yields a lower bound, and the discretization gap can be bounded by \(\sqrt{n}h\) in the worst case, with sharper estimates in suitable or randomly rotated grids [1812.06740].

## 5. Persistent homology, percolation, and multiscale morphology

SEDT is a natural input to persistent homology because it turns a binary mask into a scalar field whose threshold sets encode geometry at multiple scales. In one 2D pipeline, the procedure is: start from a binarized image, compute the SEDT, build a sublevel-set filtration on the SEDT scalar field, compute persistent homology on cubical complexes, and then extract discrete Betti numbers by windowing features according to birth time and persistence. The paper states that prominent \(\beta_1\) features correspond to geometric holes and that spurious specks or thin bridges contribute minimal persistence and can be filtered out by persistence thresholding [2509.09140].

That same study treats SEDT-based persistent homology as a widely adopted strategy for noise-robust topological analysis, but it also reports a limitation under strong corruption. On clean data, the PH pipeline based on cubical complexes and SEDT can closely match, and sometimes outperform, neural prediction. Under noisier conditions, however, PH error increases sharply, especially at higher noise levels, and the method requires explicit parameter calibration by grid search over birth and persistence windows [2509.09140].

A more elaborate scientific application uses SEDT for Arctic melt ponds. There the scalar field induces the filtration
\[
X(\alpha)=\{x \mid \operatorname{SEDT}(x)\le \alpha\},
\]
from which persistence diagrams are interpreted geometrically. The paper assigns different quadrants of the diagram to pond components, nodal subponds, pond loops, and concave ice islands, and uses the resulting multiscale statistics to characterize network morphology and to distinguish dynamical models of melt-pond evolution [2212.07961].

The same framework extracts a percolation threshold \(r_{\text{perc}}\), defined as the radius of the largest ball that can traverse the pond phase from one side of the image to the other without being obstructed by ice. The quantity is obtained through boundary-augmented persistent-homology computations and is used to identify the onset of system-spanning connectivity. The significance of the SEDT in this setting is that it provides a topological encoding of heterogeneous shape that is orientation-invariant and simultaneously captures convexity, proximity, integrity, and feature size [2212.07961].

## 6. Volumetric mapping, planning, compression, and learned fields

In robotics, the SEDT is commonly referred to as an ESDF. The map stores the true Euclidean distance to the nearest surface, with sign indicating whether a voxel lies in free space, on a surface, or within an object. Such fields are described as crucial for planning because optimization-based planners require obstacle distances and often their gradients; collision checking can then be reduced to distance queries rather than repeated occupancy lookups [1611.03631].

Incremental construction has been a major systems theme. One approach incrementally builds ESDFs from Truncated Signed Distance Fields (TSDFs), exploiting the fact that TSDFs are easy to integrate from sensors and are suitable for surface meshing, while ESDFs are the representation needed for planning. The reported system runs in real time on a single CPU core, validates on-board on a micro aerial vehicle, and argues that building ESDFs from TSDFs is more accurate than building them from occupancy maps [1611.03631]. A later GPU system accelerates the same general pipeline, using a sparse block-hashed voxel grid and true Euclidean propagation, and reports up to a \(31\times\) improvement in distance field computation and up to a \(177\times\) speed-up in surface reconstruction [2311.00626].

Map scaling has motivated compression. One study represents 3D maps as TSDF blocks and compares PCA-derived low-dimensional bases, autoencoders, and mixed architectures for high-ratio compression. The compressed distance fields are then used both as compact descriptors and as cost functions for map-aided ego-motion estimation, with the reported result that lossily compressed fields can outperform uncompressed counterparts in challenging scenarios [1609.02462].

Recent work pushes beyond discretized voxel interpolation toward continuous learned fields. One trajectory-optimization framework represents an online neural ESDF with a SIREN and directly optimizes fifth-order polynomial trajectories on that continuous field, using automatic differentiation to obtain ESDF gradients along the trajectory [2509.20084]. A hybrid reconstruction method combines gradient-augmented octree interpolation with a neural residual to achieve non-truncated Euclidean SDF reconstruction, with the stated aim of matching volumetric efficiency while retaining differentiability and large-scale online operation [2510.18999].

Across these strands, the SEDT functions both as a numerical object and as an interface representation. It can be computed exactly on grids, approximated by convolutional or elliptic PDE methods, refined to reduce quantization artifacts, converted into topological filtrations, and embedded into large-scale robotic mapping systems. The breadth of these uses reflects the same underlying property: a single scalar field encodes both boundary geometry and sidedness in a form that is simultaneously local, global, and algorithmically exploitable.

Source: https://www.emergentmind.com/topics/signed-euclidean-distance-transform-sedt