Abstract:The dimension detection of hole parts is carried out by machine vision technology, which is the on-line detection that is implemented simultaneously with processing and measurement. Therefore, it can shorten the production cycle and improve the production efficiency. The CMOS camera and telecentric lens with high precision are selected by analyzing the process features of parts. For features of parts with chamfering, ring light is used for illumination, while coaxial light is used for illumination in the case of features without chamfering. Using those hardwares can increase flexibility of platform. For the pepper and salt noise and Gaussian noise in the process of image acquisition and transmission, median filtering is firstly used to remove the pepper and salt noise in the collected grayscale image, then the minimum error method is used to select the threshold to complete image segmentation, and then the Canny operator is used to detect edges and remove the Gaussian noise. Finally, the camera is calibrated with the calibration target to obtain the calibration coefficient and the pre-processed images are measured by Open eVision that is an image processing tool. Furthermore, the system test data is compared and analyzed with the gage measurement data. The experimental results show that the accuracy of the system can reach 0.02mm.