图像测量系统中,已有的调焦评价函数当被测工件图像中边缘在高度上不共面时将无法正确调焦定位。研究了一种基于特征边缘跟踪的调焦评价方法,首先确定测量图像中被测边缘,进行跟踪获得边缘点,对每个边缘点在边缘方向上一定范围内进行梯度平方和运算,所有被测边缘点的值求和作为调焦评价值,达到极大值时认为该边缘正焦。采用透射式照明图像测量系统对一种图像中边缘在高度方向上不共面的工件进行了调焦实验,结果表明,该调焦方法能够对图像中各边缘在高度上不共面时对被测边缘对焦。
In image measurement system, accurate focusing is critical for high precision measurement. For image focusing, a focusing evaluation function is introduced to verify whether the image is in focus or not. When the edge of a work does not lie in a plane perpendicular to the vertical direction, it is difficult to focus correctly with conventional focusing evaluation functions. So a focusing evaluation method is proposed based on the edge tracking. Firstly, the edge of interest is extracted with edge tracking. For each edge point, sums of gradient square within a certain area along the edge direction are calculated and the focusing evaluation function is the sum of the sums of gradient square. When the focusing evaluation function reaches its maximum, the edge is in focus. Experimental results show that, when the edge of a work does not lie in a plane perpendicular to the vertical direction, it can be focused correctly with the proposed method.