Abstract:In realizing automation production process of certain precision products, there exist the problem of being hard to measure and assemble many kinds of small parts which are necessary for the product high-precision and autamatically. Aiming at the problem, the automatic measurement and assembly system is built based on machine vision technology. Based on Halcon, the image processing software platform, the system pretreats the parts image with median filtering, image enhancement and so on, and uses the Canny algorithm to calculate the pixel-precision edge, then uses elliptic curve fitting method to obtain the subpixel-precision edge. Two kinds of camera lens distortion model are established, using the method of the radial alignment constraint (RAC) and the method of Zhang Zhengyou to calibrate cameras and compared the calibration accuracy. The experimental results show that the assembly alignment accuracy of system can reach 0.05 mm, and the standard deviation of measurement is less than 3.8 μm. It can meet the requirement of industry and solve practical problems.