摘要: 针对传统D-P算法速度较慢、编程不方便的问题,提出一种改进算法。以一定步长对轮廓进行遍历,根据轮廓上点到所选轮廓段首末点连线最大距离与距离阈值的大小关系,按轮廓遍历顺序获取曲线轮廓的特征点,并在相邻的特征点之间采用贝塞尔曲线进行平滑。实验结果表明,改进算法的速度比传统算法提高10%以上。
关键词:
轮廓平,
特征点,
D-P算法,
轮廓遍历,
阈值,
贝塞尔曲线
Abstract: A modified Douglas-Peucker algorithm is proposed aiming at the disadvantages of traditional Douglas-Peucker algorithm such as low running speed and difficulty in program design. In the algorithm, the edge is traversed at a certain step length and the feature points on the edge are gained in order of traversal sequence according to the relation between max distance of points on the edge to line between the start and end point of the selected edge section and the distance threshold. At the same time smoothing effect is good when edges are smoothed between the adjacent two feature points. Experimental results show the improved algorithm can increases speed by ten percent than the traditional algorithm.
Key words:
edge smoothing,
feature point,
Douglas-Peucker algorithm,
edge traverse,
threshold,
Bezier curve
中图分类号:
程立, 王江晴, 田微, 朱宗晓, 魏红昀, 刘赛, 徐科. 改进D-P算法在图像轮廓平滑中的应用[J]. 计算机工程, 2012, 38(17): 232-234.
CHENG Li, WANG Jiang-Qing, TIAN Wei, SHU Zong-Xiao, WEI Gong-Yun, LIU Sai, XU Ke. Application of Improved D-P Algorithm in Image Edge Smoothing[J]. Computer Engineering, 2012, 38(17): 232-234.