Distance transform of binary image
bwdist
uses fast algorithms to compute the true Euclidean distance transform, especially in the 2-D case. The other methods are provided primarily for pedagogical reasons. However, the alternative distance transforms are sometimes significantly faster for multidimensional input images, particularly those that have many nonzero elements.
The functionbwdist
更改为6.4版(R2009b)。图像处理工具箱的先前版本使用不同的算法来计算欧几里得距离变换和相关的标签矩阵。如果您需要上一个实现产生相同的结果,请使用该功能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.