| With the rapid development of the electronic industry,automatic mounter is more and more used in the production line of surface mount technology,and the mounter needs to rely on the suction nozzle to complete PCB mount electronic components,so the quality of the suction nozzle is very critical.The suction nozzle will be worn to varying degrees in the long-term working process of the mounter.If the worn suction nozzle continues to use the suction components,it will lead to misplacement of the components or failure to absorb the components,which will affect the normal working efficiency and mounting accuracy of the mounter.At present,defect detection of suction nozzle is mainly completed manually.Considering that the manual detection has strong subjectivity in judging such small hole parts,the detection accuracy is difficult to maintain stability,and the manual detection speed can not keep up with the current production speed,the industrial assembly line urgently needs a set of automatic suction nozzle defect detection system.Aiming at the problems of nozzle blockage and nozzle wall gap,this paper designs image processing algorithms for two types of nozzles to judge whether they are good ones,and uses machine vision technology to complete the nozzle defect detection system.The key research contents of this system are as follows:(1)Build the overall framework of nozzle defect detection system.In terms of hardware construction,according to the defect characteristics,the hardware requirements of the detection system are selected and reasonably installed to form a hardware framework to ensure good image acquisition effect;In the software framework,the joint programming of image processing algorithm and C++ language program designed in Halcon is studied,and the human-computer interaction interface of the system is written in C++ Builder environment to complete the overall detection system.(2)A new extraction method is designed to detect area.According to the characteristics of the area to be inspected from the suction nozzle,the inspection area of the suction nozzle is divided into two parts: the suction nozzle hole area and the suction nozzle pipe wall area.Firstly,the combined filtering and gray transformation are carried out on the sampled image,and then the automatic global threshold segmentation method based on histogram is used to accurately extract the suction nozzle area from the preprocessed image;When segmenting the pipe wall suction nozzle,the local threshold segmentation and morphological opening and closing operations are used to process the image,and finally the global threshold segmentation is used to accurately extract the pipe wall area of the suction nozzle.(3)Studying the defect judgment method of suction nozzle.When judging whether there is blockage in the suction nozzle,an algorithm combining shape template matching to calculate the similarity and light transmission area percentage is proposed;When detecting the gap in the pipe wall area of the suction nozzle,the pipe wall area is morphologically processed,and then the gap area is selected by using image difference and size features;Before recognizing the two-dimensional code of the suction nozzle,the image processing such as image addition operation,image contrast stretching and gray morphological closing operation are used for the two-dimensional code image,and then the decoding operation is carried out.After completing the above research,the system is utilized to do the corresponding actual field test.The analysis and test results show that the average accuracy of the nozzle defect detection system is about 98%,and the image acquisition and processing speed of a single nozzle is about 900 ms,which meets the requirements of on-site actual detection. |