Distance transformation is an image processing technique used for many different applications. Related to a binary image, the general idea is to determine the distance of all background points to the nearest object point (or vice versa). In this tutorial, different approaches are explained in detail and compared using examples. Corresponding source code is provided to facilitate own investigations. A particular objective of this tutorial is to clarify the difference between arbitrary distance transforms and exact Euclidean distance transformations.
翻译:距离变换是一种图像处理技术,广泛应用于多种不同场景。对于二值图像而言,其基本思想是确定所有背景点到最近目标点(或反之)的距离。本教程详细阐述了多种实现方法,并通过示例进行了比较。同时提供对应源代码以方便读者自行研究。本教程的一个核心目标是阐明任意距离变换与精确欧几里得距离变换之间的区别。