| Printed circuit board(PCB)is an indispensable part of the electronic industry today.There are various types of irregular components commonly found in printed circuit boards,and the assembly of these components currently relies mainly on manual labor.In order to save labor costs,improve production efficiency,and increase assembly reliability,this article has developed a machine vision based plug-in system for irregular components.The main research content of the paper is summarized as follows:(1)Introduced the overall implementation plan of this system.In terms of system hardware,the model specifications of the industrial camera,lens,light source and other hardware of this system have been determined,and corresponding lighting schemes have been designed.Two sets of image acquisition systems for component detection and PCB positioning have been built in this system;In terms of system software,the control computer software of this system was developed using the C # Winform framework in Visual Studio,and the signal interaction between the industrial control computer and various modules was completed.(2)Studied image preprocessing algorithms.After analyzing different image enhancement algorithms,a method of segmented linear transformation of grayscale values and image morphology operation was adopted to enhance the image;After comparing three image denoising algorithms,Bilateral filter algorithm is used to suppress noise interference in the image;After analyzing different image segmentation algorithms,the maximum inter class variance method was used to extract the target area in the image,providing a foundation for subsequent detection and localization algorithms.(3)Designed component pin detection and PCB Mark point detection and positioning algorithms.For pin detection,a shape based template matching coarse positioning and Hotelling transformation method are used to solve the region center,and pin displacement and missing defects are detected by establishing a pin coordinate system;For PCB Mark point positioning,Devernay correction interpolation method based on Canny operator is used to extract sub-pixel edge points of the Mark point area,and a monotonicity neighborhood elimination circle fitting algorithm is proposed.On the basis of the traditional least square method,abnormal edge points are eliminated through the neighborhood monotonicity of the sub-pixel edge point set,and then the center coordinates of the Mark point area are obtained by fast circle fitting using the principle of three-point circle drawing.(4)Designed calibration schemes for two sets of image acquisition systems in this system.Using the method of solving the proportion coefficient between pixel distance and actual distance to complete the image world coordinate system conversion;Using the nine point calibration method to complete the image robot coordinate system conversion;The method of establishing a tool coordinate system is used to calibrate the robot’s rotation center.After completing the system design,relevant experiments were designed to carry out the corresponding Functional verification of the system.The experimental results show that the accuracy of electronic component pin detection and positioning is within 0.2mm,the accuracy of component defect detection is about 96.33%,the success rate of system plug-in is about95.67%,and the speed of single component plug-in is within 0.8s,which meets the actual production needs. |