Abstract:
To overcome the disadvantages in existing methods for detecting the size of O-ring seals, a precise measurement method based on active vision was proposed, and the technologies such as automatic quick-focusing, sub-pixel edge detection, and edge fitting were studied. The procedure of automatic quick-focusing was divided into three phases. The rough focusing was implemented through image contrast enhancement in gray scale, mid-value filter, large step and variance function calculation; the fine focusing was realized using small step and Tenengrad function; and the high sensitivity focusing was realized using micro step and Brenner function. In addition, edge points were located with sub-pixel accuracy using the Zernike moment algorithm. The inner and outer diameters of the O-ring seal were measured with the edge fitted by the minimum area error method. The experimental results show that the proposed method can realize an automatic focusing within 15 s in 16 search steps. Compared with the traditional methods, the proposed method, by sub-pixel detection, can reach a accuracy of 1 μm in the outer and inner diameter measurement of O-ring seals, which satisfies the measurement requirements of stability and accuracy for O-ring seals.