针对传统链码用于边缘跟踪过程中易产生边缘断裂,提出一种改进的Freeman链码用于边缘跟踪及直线提取.该算法在链码跟踪过程中,记录链码起点,优先跟踪位于边缘方向上的点.对当前点,先进行基于Freeman链码八邻域内跟踪,在八邻域内没有边缘点的情况下,再进行八邻域外链码跟踪.然后对跟踪后得到的边缘链码进行分裂提取直线链码.实验结果表明,该算法不仅能有效提取直线,而且能提取曲线边缘,并且保持完好的边缘连续性,避免后续直线合并.
Aiming at the problem of edge broken easily produced in traditional chain code tracking,this paper presents an improved Freeman chain code for edge tracking and straight line extraction.this algorithm records the starting point of chain code and priority tracks points which are located in edge direction.For current point,it firstly tracks inside the eight neighborhoods with Freeman chain code,if there are no edge points in the eight neighborhoods,it will tracks outside the eight neighborhoods.Then it extracts straight line chain codes by edge chain code splitting.The experimental results show that this algorithm not only can effectively extract straight lines,but also can extract curve edges,and it keeps the continuous of edges to avoid lines connecting in after.