针对目前直线提取算法的局限性,提出了一种简单高效的提取图像中目标物体直线边界的算法。本算法基于链码思想和数字直线特征,首先对图像进行边缘检测,对边缘检测后的图像按照优先级进行链码跟踪,获取初始链码;然后通过距离约束提高链码的直线性,剔除噪声和细节;最后进行直线合并,完成直线提取。实验表明,本文提出的算法能高效、准确地检测出图像中物体边界的直线,特别对较大的影像计算量小,抗噪能力强,适用于实时处理。
Aiming to overcome the limitations of a straight line extraction algorithm, a simple and effi- cient algorithm to detect line edge of objects in images is proposed. Based on the Freeman criteria and the characteristics of digital line, the priority method is first applied to track the image after an edge is detected. Secondly, using a distance constraint improves the chain code linearity and eliminates is noise and details. Finally merging the lines completes the line extraction. Experimental results show that this algorithm is efficient, precise, robust for noise and suitable for real-time processing when extracting line features, especially for large-size images.