为了提高三维距离变换在实际应用中的计算效率,提出一种三维快速距离变换算法.首先将三维图像降维为多张二维图像,为每张二维图像设置2个标记数组,并根据标记数组运用围线扫描方法依次计算出每一像素在二维图像上的距离变换;然后依据二维结果计算出所有像素在三维图像中的距离变换.实验结果表明,文中算法实现简单,比已有的边界剥离算法及基于Voronoi图的算法在时间和空间消耗上均有较大的提高,有更好的实用性.
In order to improve the computing efficiency in practice, a fast distance transform algorithm for 3D image is proposed. Firstly, a 3D image is transformed into several slices of 2D images, for each 2D image two marked arrays are defined. Then, the distance transformation of each pixel in the 2D images is calculated according to the marked arrays, using the contour scanning method. Finally, the distance transformation of each pixel in the 3D image is calculated based on the results of the 2D distance transformations. The proposed algorithm is easy to implement and the experimental results show it demonstrates a significant improvement in reducing time and space complexity, comparing with the existing boundary striping and Voronoi-based algorithms, and thus it has stronger practicability.