摘要
针对直线类边缘图像测量中的对焦问题,文章提出了一种利用被测边缘梯度信息的对焦算法。在包含被测边缘的区域内,该算法计算各行或列中被测边缘点的梯度值,求出这些梯度值的平均值;根据聚焦时边缘梯度相对达到最大的成像特点,将所求得的边缘梯度平均值作为聚焦程度的评价准则。该算法与两种常用对焦算法——灰度差分法和灰度方差法的对比试验表明,在保持平滑性不变的情况下,该算法的单峰幅值比灰度方差法大10倍;它克服了灰度差分法依赖阈值的缺点,而且平滑性明显优于后者,其局部波动平均幅值仅为灰度差分法的1/10。
In view of the focusing-problems in the measurement of images with linear edge, a focusing algorithm based on the gradient information of image edge to be measured is presented. In the evaluating area including the edge to be measured, the algorithm calculates the gray-level gradient of edges for every row or column. According to the property that edge-gradient is maximal in focus, the algorithm takes the average of the gotten gradients as the evaluating criteria of focusing degree. Two COlnmon-used focusing algorithms, gray-difference algorithm and gray-variance algorithm, are compared with this algorithm. The test result shows that in the case of same smoothness, the peak value increases by a factor of ten compared with gray-difference algorithm, which overcomes the shortcoming of gray-difference algorithm depending on threshold and makes the smoothness of focusing curve better. The average of local fluctuating range is about tenth of that of gray-difference algorithm.
出处
《光电工程》
EI
CAS
CSCD
北大核心
2005年第12期63-65,70,共4页
Opto-Electronic Engineering
关键词
数字图像处理
图像测量
自动对焦
灰度梯度
Digital image processing
linage measurement
Automatic focus
Gray gradient