TOPICS
Search

Chamfer Distance


The chamfer distance is a measure of dissimilarity between two finite nonempty point sets based on nearest-neighbor distances. For point sets A and B in a metric space with metric d, the directed chamfer distance from A to B is commonly defined by

 c(A,B)=1/(|A|)sum_(a in A)min_(b in B)d(a,b),

and a symmetric chamfer distance is

 d_C(A,B)=c(A,B)+c(B,A).

Some conventions divide the symmetric expression by 2, omit the normalizing factors, or replace d(a,b) by its square (Fan et al. 2017). The convention must therefore be specified when chamfer distances are compared.

Unlike the Hausdorff distance, which uses the largest nearest-neighbor distance, the chamfer distance averages nearest-neighbor distances and is consequently less sensitive to isolated outliers. Despite its name, the symmetric chamfer distance is not in general a metric, since it can fail the triangle inequality. For example, for A={0}, B={1,2}, and C={2} in the real line, the definition above gives d_C(A,B)=5/2, d_C(B,C)=1/2, and d_C(A,C)=4.

Chamfer matching was introduced for image matching by Barrow et al. (1977), and efficient implementations commonly use a distance transform (Borgefors 1988).


See also

Hausdorff Distance, Metric, Nearest Neighbor Problem

Explore with Wolfram|Alpha

References

Barrow, H. G.; Tenenbaum, J. M.; Bolles, R. C.; and Wolf, H. C. "Parametric Correspondence and Chamfer Matching: Two New Techniques for Image Matching." In Proceedings of the Fifth International Joint Conference on Artificial Intelligence (Ed. R. Reddy). Los Altos, CA: William Kaufmann, pp. 659-663, 1977. https://www.ijcai.org/Proceedings/77-2/Papers/024.pdf.Borgefors, G. "Hierarchical Chamfer Matching: A Parametric Edge Matching Algorithm." IEEE Trans. Pattern Anal. Mach. Intell. 10, 849-865, 1988. https://doi.org/10.1109/34.9107.Fan, H.; Su, H.; and Guibas, L. J. "A Point Set Generation Network for 3D Object Reconstruction from a Single Image." In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (Ed. J. Rehg, Y. Liu, Y. Wu, and C. Taylor). Piscataway, NJ: IEEE, pp. 2463-2471, 2017. https://doi.org/10.1109/CVPR.2017.264.

Cite this as:

Weisstein, Eric W. "Chamfer Distance." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/ChamferDistance.html

Subject classifications