Computer Engineering and Applications ›› 2017, Vol. 53 ›› Issue (5): 207-211.DOI: 10.3778/j.issn.1002-8331.1508-0007

Previous Articles     Next Articles

Fast algorithm of dilation and erosion for binary image

DENG Shichao, HUANG Yin   

  1. School of Mechanical and Electrical Engineering, Guilin University of Electronic Technology, Guilin, Guangxi 541004, China
  • Online:2017-03-01 Published:2017-03-03


邓仕超,黄  寅   

  1. 桂林电子科技大学 机电工程学院,广西 桂林 541004

Abstract: Traditional binary dilation and erosion with large structure element are hard to apply in practical application since the redundant operations and low efficiency. A fast algorithm for dilation and erosion is present. First, it makes a direction-position offset table for structure element, and then extracts the borders of targets, describes each border with a starting point and a chain of direction. To dilate the border, it looks up the offset pixels in the direction-position offset table according to the direction of the chain, and then fills the pixels. It takes the union of border dilation and original image as the result of dilation for original image. The rapid erosion algorithm also can be realized according to the duality of dilation and erosion. Experimental results show that, compared with the traditional algorithm and other optimization algorithm, this algorithm is faster and more practical.

Key words: dilation, erosion, fast algorithm, mathematical morphology

摘要: 传统二值图像膨胀腐蚀算法存在大量冗余操作,运算效率低,制约了大结构元素在实际工程上的应用。提出了一种快速膨胀腐蚀算法。首先针对结构元素建立方向-位置偏移表,然后提取图像的边界,对每一条边界用一个起始点和一条方向链表示。对边界进行膨胀处理,根据方向链查询方向-位置偏移表,对表中记录的像素进行填充。将边界的膨胀结果与原图像的并集作为对原图膨胀的结果。快速腐蚀运算可根据膨胀与腐蚀的对偶性在此基础上实现。实验结果表明,相对于传统算法及其他优化算法,该算法速度更快,实用性更强。

关键词: 膨胀, 腐蚀, 快速算法, 数学形态学