Current Issue Cover
二值图象曲线轮廓提取的新算法

余学军1, 彭立中1(北京大学数学科学学院,北京 100871)

摘 要
从二值图象中得到曲线轮廓(简称曲线化),在计算机辅助设计和制造(CAD/CAM)中有重要的作用,为了更有效地从二值图象中提取更高质量的曲线轮廓,提出了一种新的二值图象曲线化的算法,该算法的核心是对待拟合折线进行自动分段和对分段曲线进行三次Bezier曲线拟合,与传统的二值图象曲线化方法相比,由于它能够获得更高质量的图象边界轮廓,因而从根本上解决了点阵图象轮廓无法在线性设备(绘图仪,刻字机,数控机床等)中直接输出的问题,并避免了出现形变(锯齿效应和折线效应)的难题,经商品化刻绘软件(“文泰刻绘”)广泛使用证明,该算法具有很强的实用性,其效果和速度已接近国外同类软件的水平。
关键词
An Algorithm for Getting the Curve Border from a Black-White Image

()

Abstract
Getting the curve border from a black white image is very important in CAS/CAD/CAM. A new algorithm for it is presented. The main idea of this algorithm is auto segment of edge points and quick Bezier fitting to those points. In this algorithm, edge points of a black white image are detected firstly. At second step, these edge points are segmented according to left and right direction of every point. Then, these segments are classified into two kinds: curve segment and line segment. Those points on the curve segments will be fitted into Bezier curves using a certain simple and quick method. In this way, a set of border from a black white image, which consists of lines and Bezier curves, is presented. Comparing to the vector method, this algorithm can get accurate and smooth border of a black white image which is not distorted even if it is enlarged many times, so it is easy to output the border of a black white image to devices such as sign maker, plotter, CNC machine, etc. This algorithm is efficient, and widely used in serial software "Wentai Kehui", the speed and result of which are as good as the same kind of software made in developed countries.
Keywords

订阅号|日报