![](https://csdnimg.cn/release/download_crawler_static/89054098/bg1.jpg)
第 33 卷 第 4 期 电 子 科 技 大 学 学 报 Vol.33 No.4
2004 年 8 月 Journal of UEST of China Aug. 2004
CCD图像的轮廓特征点提取算法
侯学智 ,杨 平,赵云松
(电子科技大学机械电子工程学院 成都 610054)
【摘要】采用最大方差法将图像二值化,用图像形态学的梯度﹑细化和修剪算法来提取边缘轮廓,利用十一
点曲率法得到轮廓的角点和切点的大致位置。提出了一种基于最小二乘拟合的改进算法,来进一步确定角点和切
点,并对轮廓分段识别。该算法应用在基于图像处理的刀具测量系统中,实际结果表明具有良好的抗噪声性能,
能准确提取出图像的特征点。
关 键 词 刀具测量; 细化; 曲率; 最小二乘拟合; 角点
中图分类号 TP391 文献标识码 A
Contour Feature Point Detection Algorithm of CCD Image
Hou Xuezhi,Yang Ping,Zhao Yunsong
(School of Mechatronic Engineering, UEST of China Chengdu 610054)
Abstract The image is segmented to Bi-value image with max variance algorithm, and then the
edge is detected by a series of image morphology algorithm including grads, thinning and cutting. The
eleven point curvature-computing method is used to locate the area of corner and point of tangency. An
improved algorithm based on least square fitting is given to search corner and point of tangency. This
algorithm is applied to the cutting tools measurement system based on image processing and the actual
result proves it has a good noise-resisted performance and can detect feature points accurately.
Key words cutting tools measurement; thinning; curvature; least square fitting; corner
目前数控加工精度已达到微米级,对刀精度要求愈来愈高。传统的刀具测量方式采用人眼瞄准,容易
带来主观误差,使对刀精度降低。在基于图像处理的刀具测量系统中,CCD数码相机将对刀状态的图像摄
入,通过USB接口输入计算机。首先提取出刀具轮廓的特征点,再对轮廓曲线进行分段,从而测量刀具的
长度﹑半径﹑角度等参数。通常利用曲率信息来提取轮廓特征点,三点曲率法对噪声较敏感,十一点曲率
法能较好地估算出轮廓的曲率,并能简单提取出轮廓的角点与切点区域
[1, 2]
。本文提出利用最小二乘法拟合
角点和切点区域的曲线,根据计算的斜率和曲率的特点能有效确定角点和切点。
1 图像预处理
被测刀具的图像如图1所示。CCD相机采集到刀具的彩色图像,将其转化为256色的灰度图像,如图1a
所示,采用最大方差阈值法将图像二值化。由于刀具表面存在油污,光线散射等原因,图像二值化后,在
刀具部分有颗粒状噪声,而刀具以外有细小孔洞存在,所以在提取轮廓前,采用形态学算子滤波。在图像
形态学中,最基本的运算是腐蚀和膨胀运算,通过腐蚀和膨胀可以构成开运算与闭运算。开闭运算都能够
平滑边缘,其中开运算能够消除细小物体,闭运算能够填充物体孔洞。本文采用方形结构元素,对图像先
闭运算后开运算,有效地滤除了图像的细小孔洞和噪声,而刀具的结构和面积基本保持不变。图1b所示为
收稿日期:2003 − 07 − 24
作者简介:侯学智(1980 − ),男,硕士生,主要从事工业测控技术方面的研究.