Electronic component defect detection device and method based on visible light and infrared thermal imaging
Technical Field
The invention belongs to the technical field of electronic component detection, and particularly relates to a device and a method for detecting defects of electronic components by visible light and infrared thermal imaging, which are used for quality detection of surface defects and internal defects of electronic component products.
Background
The existing electronic component surface defect detection industry uses detection equipment for identifying simple defects and a manual auxiliary detection mode, and the method has the advantages of low automation degree, low efficiency and very high production cost, and the existing equipment has limited detection capability and cannot identify complex defects such as dark lines, cracks in background noise, internal injuries and the like.
In the field of electronic component production and processing, an automatic assembly line is basically realized at present. Taking precise winding inductance as an example, an electronic component is generally processed by the following steps: (1) Materials such as magnetic cores and the like are fed into a production line from an equipment inlet, and coil winding is completed on a precise winding machine sequentially through a conveyor belt; (2) Then the enameled wire is conveyed to laser paint removing equipment through a conveyor belt, and the surface coating of the enameled wire is removed; (3) Then the wire ends are sent to an automatic pin welding table through a conveyor belt to finish the welding of the paint removing wire ends and the welding points of the magnetic cores; (4) Then the mixture is sent to a laser screen printer through a conveyor belt to finish the etching of screen printing; (5) Finally, the sample is sent to a quality detection station through a conveyor belt, and a CCD device or a man-made part completes the detection procedure to confirm the integrity.
The precise winding inductor has the advantages that the knowledge in the processing process is subjected to mechanical conveying process of a conveying belt or a clamp for more than 5 times, the mechanical conveying efficiency is high, but the defects are obvious, namely, physical damage can be caused to components, and the indexes, the precision and the performance of products are affected. When the enamelled coil is extruded and pulled by mechanical movement in the production process, deformation and stretching of the coil and loosening of welding spots can be caused, and once the length of each coil is excessively uneven, the quality factor can not meet the product requirement. It can be seen that computing a tiny device defect may result in: (1) the basic parameter index of the product can not meet the requirement. (2) the uniformity of the index of the product is poor. (3) lifetime and power consumption of the product are also potentially problematic. So that the common component processing equipment has a special detection unit.
The current mainstream detection methods include two types according to defect complexity: one is a simple defect, which is automatically identified by the machine after image processing using a CCD imaging detection or infrared imaging unit. The method comprises the steps of carrying out image preprocessing on defects such as obvious defects and obvious cracks, and comparing and judging whether the defects exist or not through a template method, or separating the defect images through angular point feature detection and an SVM classifier. The implementation method is also used for most products on the market at present, and is characterized in that the method can realize complete automatic detection, but can only be effective for a few simple defects.
In addition, aiming at complex defects, such as fine dark veins on the surface of a component, cracks under a rough texture background, cracks on silk screen printing of fine cracks in a stain background and other complex defect characteristics, the current factory practice mainly displays the processed image on a display, and quality detection workers pick out defective products through naked eyes. For the detection of complex defects, the important problems currently exist are:
(1) The manual defect detection has high requirements on workers, a plurality of workers are required to be equipped on a product line every day to ensure the normal operation of the product line, and the payroll cost paid by enterprises is very high;
(2) The manual defect detection has high requirements on the serious degree of workers, and the problems of eye-drop, inattention, neurasthenia and the like can occur after the workers work for a long time every day, so that the probability of false division is greatly improved;
(3) If the complex defects have complex background noise through the existing automatic detection technology, the interference such as amplified porous texture characteristics, silk-screen pseudo defects and the like cannot be removed, and the detection rate of products is seriously affected.
(4) For defects such as dark lines, internal injuries and the like, the existing detection method cannot be effective.
Disclosure of Invention
Aiming at precise electronic components such as inductors and the like to be inspected, the invention provides a device and a method for detecting defects of the electronic components by using visible light and infrared thermal imaging. Defects such as scratches, broken corners, cracks, dark cracks and the like are also key bottlenecks for detecting defects of electronic components at present, are common problems in the industry, and have huge value. The invention adopts the infrared flaw detection technology and the visible light fusion computer vision technology, improves the detection function of defects such as scratches, broken corners, cracks, dark cracks and the like which are difficult to detect, and improves the defect detection rate of electronic components. The precise electronic components detected by the equipment do not need to be detected manually, the requirements of the product yield are met, the production efficiency is improved, and the production cost is reduced. Meanwhile, the selling price of the equipment is reduced through technology localization, and the technology upgrading in the field of defect detection of precise electronic components is further promoted.
The specific technical scheme is as follows:
the device for detecting the defects of the electronic components of the visible light and infrared thermal imaging is characterized in that a laser heater, a visible light camera system and an infrared camera system are sequentially arranged above a workpiece conveyor belt according to the conveying direction; the infrared camera system is slidably arranged on the sliding rail;
the infrared camera system and the visible light camera system are connected with the industrial personal computer;
the visible light camera system is used for collecting visible light pictures and transmitting the visible light pictures to the industrial personal computer; the industrial personal computer controls the infrared camera system to move and take pictures.
The sliding rail is arranged on the supporting structural member, the infrared camera system comprises an infrared camera and an optical lens, the infrared camera is fixed on the linear motor, and the linear motor is slidably arranged on the sliding rail; the linear motor is connected with a driver through a control flat cable, and the driver is connected with an industrial personal computer.
The visible light camera system comprises a visible light camera, a lens and a light supplementing lamp.
The method for detecting the defects of the electronic components by using visible light and infrared thermal imaging comprises the following steps:
the visible light camera system collects visible light pictures; after the picture is acquired, uploading the picture to an industrial personal computer, identifying the industrial personal computer by adopting a target identification neural network, judging whether the workpiece is a specified electronic component type, if the workpiece is the specified electronic component type, further calculating the coordinate position (x, y) of the component, providing the coordinate position to an infrared camera system, moving the infrared camera system to a proper position, shooting a surface image of the component heated by a laser heater, and detecting defects by using the surface image by a target detection unit; if the electronic component type is not specified, judging that other electronic components or foreign matters are provided for the sorting unit for cleaning;
after the target detection unit finishes classification and positioning of the images of the defective electronic components, the position information (x, y), the defect size (w, h) and the defect type c of the defective electronic components are sent to the sorting unit, the sorting unit receives the information and then makes a judgment to determine whether the electronic components at the designated positions are defective or not, and if yes, the electronic components are cleaned.
The target detection unit receives an image of the surface of the component heated by the laser heater 4 shot by the infrared camera system 2, performs image preprocessing on the image, and then sends the image into a defect target detection convolutional neural network, and the convolutional neural network outputs coordinate position information (x, y) of a workpiece, defect size (w, h) and defect type c;
the construction method of the convolutional neural network comprises the following steps:
s1, collecting more than 5000 infrared pictures of a defective workpiece and a normal workpiece respectively;
s2, manually marking the positions and the sizes of defects and defect categories, wherein the defect categories comprise seven categories of scratches, broken angles, cracks, dark cracks, silk screen printing, normal defects, other defects and the like;
s3, increasing the number of various samples to more than 5 ten thousand samples by data enhancement methods such as rotation, scaling, gray level adjustment, noise increase, random clipping and the like;
s4, checking the number of various samples, and guaranteeing the approaching of the number of various images through the enhancement method in the step S3;
s5, sending the preprocessed infrared image as training set and test set data into a target detection network for training, wherein the target detection network is not limited to SSD, YOLO, fasterCNN and other target detection networks;
s6, after training is completed, storing a training model;
s7, loading a training model for defect detection.
The invention adopts the visible light camera to identify and position the workpiece of the component, and can effectively identify and mix the workpiece and product impurities. After the electronic component type identification and the foreign matter identification are completed, the heated electronic component enters an infrared camera shooting area. According to the invention, the laser is adopted to heat the electronic components, so that the volume of the whole machine is reduced, the infrared heating area can be overlapped with the visible light shooting area, and the infrared filter is added to the visible light camera to avoid interference, so that the interference of infrared light to the visible light camera is reduced.
(1) According to the invention, through infrared thermal imaging, not only can the defect characteristics of scratches, angles of collapse, cracks and the like be obtained, but also the dark crack characteristics can be captured, and the target detection is carried out on the image defects through a neural network, so that the detection efficiency is greatly improved.
(2) Compared with a visible light image, the infrared thermal imaging picture adopted by the invention has the advantages that the noise interference is reduced, the surface screen printing texture can be pressed to a certain extent, and the interference of the noise and the screen printing on defect detection is avoided.
(3) The invention can not only distinguish product defects, but also identify defect types directly on the basis of defect detection through a multi-classification neural network, is convenient for subsequent defect root analysis, and can reduce interference of silk screen printing on defect detection accuracy by introducing silk screen defect types.
(4) The invention adopts the visible light camera for identifying and positioning a plurality of components, can inspect other workpieces and foreign matters, sends the infrared image into the neural network to detect the defects, reduces the calculated amount of the industrial personal computer by a high-speed moving shooting mode of the linear motor, and improves the detection efficiency of the workpieces.
The invention is fully automatic in detection, greatly improves the production efficiency, and can save a great amount of labor cost. The invention can detect defects which cannot be observed by eyes and the existing equipment, the classification is more accurate, the false-division rate is reduced, and the product yield is improved. And the defects can be qualitatively and quantitatively analyzed, the problem of the production line can be rapidly positioned and solved, and the productivity of the production line can be improved.
Drawings
FIG. 1 is a schematic view of the apparatus of the present invention;
FIG. 2 is a schematic diagram of an infrared camera system according to the present invention;
FIG. 3 is a schematic diagram of a detection flow of the present invention;
FIG. 4 is a schematic diagram of the detection of the present invention;
FIG. 5 is a second schematic diagram of the detection of the present invention.
Detailed Description
The specific technical scheme for implementing the invention is combined.
As shown in fig. 1, a laser heater 4, a visible light camera system 3 and an infrared camera system 2 are sequentially arranged above a workpiece conveyor belt 5 according to the conveying direction; the infrared camera system 2 is slidably arranged on the sliding rail 1;
the infrared camera system 2 and the visible light camera system 3 are connected with the industrial personal computer;
the visible light camera system 3 is used for collecting visible light pictures and transmitting the visible light pictures to the industrial personal computer; the industrial personal computer controls the infrared camera system 2 to move and take pictures.
As shown in fig. 2, the sliding rail 1 is mounted on the supporting structural member 21, the infrared camera system 2 comprises an infrared camera 26 and an optical lens 27, the infrared camera 26 is fixed on the linear motor 23, and the linear motor 23 is slidably mounted on the sliding rail 1; the linear motor 23 is connected with a driver 25 through a control flat cable 24, and the driver 25 is connected with an industrial personal computer.
The visible light camera system 3 includes a visible light camera, a lens, and a light supplement lamp.
As shown in fig. 3, the method for detecting defects of electronic components by visible light and infrared thermal imaging comprises the following steps:
the visible light camera system 3 collects visible light pictures; after the picture is acquired, uploading the picture to an industrial personal computer, identifying the industrial personal computer by adopting a target identification neural network, judging whether the workpiece is a specified electronic component type, if the workpiece is the specified electronic component type, further calculating the coordinate position (x, y) of the component, providing the coordinate position for an infrared camera system 2, moving the infrared camera system 2 to a proper position, shooting the surface image of the component heated by a laser heater 4, and detecting the defect by using the surface image by a target detection unit; if the electronic component type is not specified, judging that other electronic components or foreign matters are provided for the sorting unit for cleaning;
after the target detection unit finishes classification and positioning of the images of the defective electronic components, the position information (x, y), the defect size (w, h) and the defect type c of the defective electronic components are sent to the sorting unit, the sorting unit receives the information and then makes a judgment to determine whether the electronic components at the designated positions are defective or not, and if yes, the electronic components are cleaned.
The target detection unit receives an image of the surface of the component heated by the laser heater 4 shot by the infrared camera system 2, performs image preprocessing on the image, and then sends the image into a defect target detection convolutional neural network, and the convolutional neural network outputs coordinate position information (x, y) of a workpiece, defect size (w, h) and defect type c;
the construction method of the convolutional neural network comprises the following steps:
s1, collecting more than 5000 infrared pictures of a defective workpiece and a normal workpiece respectively;
s2, manually marking the positions and the sizes of defects and defect categories, wherein the defect categories comprise seven categories of scratches, broken angles, cracks, dark cracks, silk screen printing, normal defects, other defects and the like;
s3, increasing the number of various samples to more than 5 ten thousand samples by data enhancement methods such as rotation, scaling, gray level adjustment, noise increase, random clipping and the like;
s4, checking the number of various samples, and guaranteeing the approaching of the number of various images through the enhancement method in the step S3;
s5, sending the preprocessed infrared image as training set and test set data into a target detection network for training, wherein the target detection network is not limited to SSD, YOLO, fasterCNN and other target detection networks;
s6, after training is completed, storing a training model;
s7, loading a training model for defect detection.
In order to improve the detection efficiency of the system, the visible light image sensor and the linear motor 23 are added. The visible light image sensor is a visible light camera system 3, and is mainly used for detecting and positioning components, and the linear motor 23 is mainly used for driving the infrared image sensor unit, namely the infrared camera system 2 to move.
As shown in fig. 2, the slide rail 1 is fixed on the supporting structural member 21, the linear motor 23 is mounted on the slide rail 1, the infrared camera 26 and the optical lens 27 are mounted at the bottom of the linear motor 23 through the structural member, and the infrared camera 26 and the optical lens 27 are used for moving in a straight line when the linear motor 23 operates.
The power supply, the infrared camera signal wire and the linear motor control wire are connected with a driver 25 arranged on the supporting structural member through a control flat cable 24, the driver 25 is communicated with the industrial personal computer through a USB interface, the industrial personal computer drives the linear motor 23 to pull the infrared camera 26 and the optical lens 27 to a designated position through positioning information, and the imaging is carried out and then the imaging is carried out on the industrial personal computer for defect positioning and identification.
As shown in fig. 1, the visible light camera system 3 is in front of the infrared camera system 2, the center position of the visible light camera system 3 is away from the center position s of the infrared camera system 2, and is used for identifying components and performing optical measurement, positioning the center position (x, y) of the components, after the components are positioned, the conveyor belt moves at a constant speed v, after an interval t=y/v, the coordinate position of the components is (x, 0), the components reach the positions below the infrared camera 26 and the optical lens 27, the infrared camera 26 and the optical lens 27 are driven by the linear motor 23 to move to the (x, 0) position, the pictures of the components are shot, and model reasoning is sent.
The infrared camera system 2 can take a picture of only one component at a time, and can use a defect target recognition network to recognize the picture, so that the processing problem of simultaneous detection of a plurality of components is avoided. By introducing the linear motor 23 machine, the computational complexity is reduced.
As shown in fig. 4 and 5, the electronic component 6 is on the workpiece conveyor 5, the workpiece conveyor 5 rotates from right to left, the surface temperature of the electronic component 6 rises after laser heating by the laser heater 4, the response of the defect to the temperature is different from the defect-free part, and the response of the different defects to the temperature is also different. Therefore, there is a difference in defect feature map seen by the picture obtained by infrared thermal imaging, and defect detection and defect classification can be performed based on the feature.
The electronic component 6 will typically identify the chip type using a laser engraving technique, and laser engraving will form on the surface of the component, similar to the texture of scratch defects, which will reduce the accuracy of defect identification therebetween. In order to reduce the interference of the silk-screen marks on the accuracy, the silk-screen area is used as an independent labeling type, so that the temperature response difference caused by the difference of the silk-screen marks can be prevented, the situation that the silk-screen marks are mistakenly identified as crack curves can be avoided, and the samples identified as the silk-screen marks and the normal samples in actual use belong to the normal samples.