| In recent years, the manufacturing developed rapidly, and drives machine vision measurement developed. They are widely used which are non-contact, and easy to operate. Domestic companies develop the machine vision measurement by embedding AF system to products to achieve the automation.This paper based on the research topics of Opto-Mechatronics Laboratory of Harbin Institute of Technology Shenzhen Graduate School measures and develops the visual system and its AF system. Then this system is used to measure the size of tiny parts and compare them.AF system get the Image by industrial camera, and translate the information of gray into PC. PC calculates function of image's sharpness, and get the criterion of focusing. Camera is fixed on the platform, which controlled by motion controller. According to 1D search algorithm, the camera get the position of focusing.When measuring the image, image is processed by median filter, extracted edge points then fit of them. Extracting edge points uses a window, choose the points which have the maximum derivative as edge points. Adding weight factor into least square method can reducing the interference in fitting feature. The big feature cannot got by once capture, use the image stitching by gray matching. Calibrate the system by two gauge blocks, compare the results with universal tool microscope. |