bwdist
二值图像的距离变换
说明
示例
输入参数
输出参量
提示
bwdist
使用快速算法来计算真欧几里德距离变换,尤其是在二维情况下。其他方法主要是出于教学原因而提供。然而,对于多维输入图像,尤其是那些具有许多非零元素的图像,替代距离变换有时要快得多。版本 6.4 (R2009b) 中更改了
bwdist
函数。早期版本的 Image Processing Toolbox 使用不同的算法来计算欧几里德距离变换和相关联的标签矩阵。如果您需要实现与之前相同的结果,请使用函数bwdist_old
。
算法
参考
[1] Maurer, Calvin, Rensheng Qi, and Vijay Raghavan, "A Linear Time Algorithm for Computing Exact Euclidean Distance Transforms of Binary Images in Arbitrary Dimensions," IEEE Transactions on Pattern Analysis and Machine Intelligence, Vol. 25, No. 2, February 2003, pp. 265-270.
[2] Rosenfeld, Azriel and John Pfaltz, "Sequential operations in digital picture processing," Journal of the Association for Computing Machinery, Vol. 13, No. 4, 1966, pp. 471-494.
[3] Paglieroni, David, "Distance Transforms: Properties and Machine Vision Applications," Computer Vision, Graphics, and Image Processing: Graphical Models and Image Processing, Vol. 54, No. 1, January 1992, pp. 57-58.