Method of extracting frames and taking pictures with stroboscopic lighting
Through the stroboscopic lighting frame extraction method, white light and infrared light are used alternately to establish a light intensity defect detection map, which solves the problem of limited detection capabilities in the existing technology and achieves more accurate PCB board detection.
Patent Information
- Application Number
- CN202410952263.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-16
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2044-07-16
AI Technical Summary
The existing line scan imaging system uses a combination of white light and infrared light that is easy to expose, resulting in limited detection capabilities and unable to meet the needs for accurate and all-round detection of PCB boards.
Using the stroboscopic illumination frame extraction method, by using white light and infrared light alternately, setting the light source lighting method, the number of alternating stroboscopic combinations and the lighting time of the light source, detecting the camera to collect images and performing logical detection, establishing the white light and infrared light The light intensity defect detection map sets the intensity threshold to distinguish normal and abnormal areas.
It improves the accuracy of PCB board detection, can more accurately distinguish between normal and abnormal areas, and improves detection capabilities.
Smart Images

Figure CN118501160B
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of machine vision detection, and in particular to a stroboscopic illumination frame extraction method. Background Art
[0002] Line scanning imaging system detection technology is widely used in PCB (Printed Circuit Board) detection, glass panel detection, cloth detection, printed product detection, semiconductor detection, new energy detection and other fields.
[0003] Currently in the field of machine vision inspection, white light illumination can accurately detect most defects in solder mask layers on metal surfaces such as pads, and infrared light can effectively detect metal foreign bodies and defects in circuit areas under the solder mask. Therefore, using a certain proportion of white light and infrared mixed light can improve visual inspection capabilities. However, since the combined brightness of white light and infrared light cannot be exposed, there are limits on the brightness of both, and the proportion of infrared light is prone to being too high, the detection capability using mixed light is limited to a certain extent and cannot meet the needs of accurate and all-round inspection of PCB boards.
[0004] Therefore, it is necessary to provide a stroboscopic lighting frame extraction method to solve the above technical problems. Summary of the invention
[0005] The present invention provides a stroboscopic illumination frame extraction method to solve the problems in the prior art that the line scanning imaging system uses a combination of white light and infrared light for easy exposure, has limited detection capability using mixed light, and cannot accurately and omnidirectionally detect.
[0006] In order to solve the above technical problems, the technical solution of the present invention is: a method for extracting frames and taking images by stroboscopic lighting, which comprises:
[0007] S11: Setting the light source lighting mode, the number of alternating strobe combinations, and the light source lighting time;
[0008] The light source illumination mode includes white light illumination mode and infrared light illumination mode, and the number of alternating strobe combinations is at least 2 groups;
[0009] S12: Under the lighting mode of S11, the detection camera collects an image of a normal PCB board to obtain a light intensity defect detection image;
[0010] The detection camera collects an image of a normal PCB board under white light illumination to obtain a white light intensity defect detection map, wherein the white light intensity defect detection map includes an upper threshold value of white light intensity and a lower threshold value of white light intensity;
[0011] An image of a normal PCB board under infrared light illumination is collected by a detection camera to obtain an infrared light intensity defect detection map, wherein the infrared light intensity defect detection map includes an infrared light intensity upper threshold and an infrared light intensity lower threshold;
[0012] S13: Under the lighting mode of S11, the detection camera collects an image of the PCB board to be detected to obtain a detection image;
[0013] S14: The logic detection device is used to extract frames and divide the detection image obtained by the detection camera, and perform logic detection; it includes:
[0014] S141: when the logic detection device extracts a frame to obtain a detection image under the alternating stroboscopic white light illumination mode and the infrared light illumination mode, it obtains a white light PCB board image under the white light illumination mode and an infrared light PCB board image under the infrared light illumination mode, and the number of the white light PCB board image and the infrared light PCB board image is greater than 1;
[0015] S142: performing defect recognition on the white light PCB board image through the white light intensity defect detection map, and performing defect recognition on the infrared light PCB board image through the infrared light intensity defect detection map to obtain a recognition result.
[0016] Compared with the prior art, the present invention has the following beneficial effects: the stroboscopic illumination frame extraction method of the present invention uses white light illumination and infrared light illumination alternately, and the stroboscopic illumination method allows the light source to be switched alternately in a very short time, and the detection camera can continuously collect images during this process. This method can capture the reflection or transmission characteristics of different materials and components on the PCB board under white light and infrared light; by establishing light intensity defect detection images under white light and infrared light respectively according to the image characteristics of the normal PCB board under the two light sources, that is, setting the upper and lower intensity thresholds, it can more accurately distinguish between normal areas and abnormal areas, thereby improving the accuracy of PCB board detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments. The drawings described below are only drawings corresponding to some embodiments of the present invention.
[0018] Figure 1 The flowchart of the preferred embodiment of the stroboscopic lighting frame extraction method of the present invention.
[0019] Figure 2 Schematic diagram of the overall structure of an imaging system according to a preferred embodiment of the present invention.
[0020] Figure 3 It is a schematic diagram of the internal structure of the top detection light box of the preferred embodiment of the present invention.
[0021] Figure 4 It is a schematic diagram of the internal structure of the backlight detection light box according to a preferred embodiment of the present invention.
[0022] Figure 5 Schematic diagram of the arc-shaped adjustment groove structure of a preferred embodiment of the present invention.
[0023] Figure 6 This is a color channel intensity comparison diagram of a preferred embodiment of the present invention.
[0024] Figure 7 This is a defect map of the red channel in the white light PCB board image of the preferred embodiment of the present invention.
[0025] Figure 8 This is a defect map of the red channel in the infrared light PCB board image of the preferred embodiment of the present invention.
[0026] Fig. 9 This is a color channel intensity comparison diagram of the second embodiment of the present invention.
[0027] Reference numerals: 11, top detection light box; 111, first box body; 1111, first light outlet; 1112, detection outlet; 112, left light source assembly; 113, right light source assembly; 114, top light source assembly; 115, spectroscope; 116, left diffuser; 117, right diffuser; 118, top diffuser; 12, backlight detection light box; 121, second box body; 1211, second light outlet; 1212, connecting hole; 1213, arc adjustment slot; 122, backlight assembly; 123, back diffuser; 13, detection camera; 14 , scanning platform; 141, light transmission port; 15, PCB board; 161, upper intensity threshold; 162, lower intensity threshold; 163, intensity value of the red channel of the white light PCB board image; 261, first threshold interval; 2611, first upper intensity threshold; 2612, first lower intensity threshold; 2613, intensity value of the red channel of the PCB board detection image at the first angle; 262, second threshold interval; 2621, second upper intensity threshold; 2622, second lower intensity threshold; 2623, intensity value of the red channel of the PCB board detection image at the second angle. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0029] In the figures, structurally similar elements are denoted by the same reference numerals.
[0030] The terms "first", "second", etc. in the present invention are used for descriptive purposes only and should not be understood as indicating or implying relative importance, and should not be used as a limitation on the order of precedence.
[0031] Please refer to Figure 1 , Figure 2 and Figure 3 ,in Figure 1 The flowchart of the preferred embodiment of the stroboscopic lighting frame extraction method of the present invention. Figure 2 It is a schematic diagram of the overall structure of the imaging system of the present invention. Figure 3 It is a schematic diagram of the internal structure of the top detection light box of the preferred embodiment of the present invention.
[0032] The following is a preferred embodiment of a stroboscopic lighting frame extraction method provided by the present invention that can solve the above technical problems.
[0033] The preferred embodiment of the stroboscopic lighting frame extraction method provided by the present invention is: a stroboscopic lighting frame extraction method, which is applied in a corresponding imaging system, the imaging system includes a controller, a scanning platform 14, a top detection light box 11, a backlight detection light box 12 and a detection camera 13, the imaging system is used to take pictures and detect a PCB board, the PCB board includes a soldering pad and green oil, wherein scratches on the surface of the soldering pad and the green oil are easy to detect using white light, but difficult to detect using infrared light; the defects of the concave surfaces of the soldering pad and the green oil can be easily filtered out and detected under the irradiation of infrared light, but the defects cannot be completely filtered out under the irradiation of white light.
[0034] A method for extracting frames and taking images under stroboscopic lighting, the specific steps are as follows:
[0035] S11: Set the light source lighting mode, the number of alternating strobe combinations, and the light source lighting time.
[0036] The top detection light box 11 is located above the scanning platform 14 and includes a left light source assembly 112, a right light source assembly 113 and a middle top light source assembly 114, each of which can control the output of white light and infrared light respectively. The top detection light box 11 is used to emit light to illuminate the surface of the PCB board 15.
[0037] The backlight detection light box 12 is located below the scanning platform 14, and the backlight detection light box 12 can control the output of white light and red light. The backlight detection light box 12 is used to emit light to illuminate the hole wall of the through hole of the PCB board 15.
[0038] The lighting methods are as follows:
[0039] S111: Set single white light illumination, the left light source assembly 112, the right light source assembly 113 and the middle top light source assembly 114 of the top detection light box 11 all emit white light. The backlight detection light box 12 also emits white light.
[0040] It is suitable for detecting surface defects of PCB boards under white light. The top detection light box 11 emits top light for detecting the surface of the PCB board, and the backlight detection light box 12 emits back light for detecting the through-hole wall of the PCB board.
[0041] S112: Set infrared red light illumination, and the left light source assembly 112, the right light source assembly 113 and the middle top light source assembly 114 of the top detection light box 11 all emit infrared light. The backlight detection light box 12 emits red light. Infrared light is used to detect defects under the ink of the PCB board. When the top detection light box 11 uses infrared light to detect defects of the PCB board, the backlight detection light box 12 uses red light to better feedback the hole wall defects of the through hole of the PCB board (relative to the white light background, it can more clearly feedback the defects of the hole wall inside the through hole). Therefore, the combination of infrared + red light is used to facilitate direct observation by the user's naked eyes.
[0042] S113: Mixed white light and infrared light illumination. Some components in the top detection light box 11 emit white light, while other components emit infrared light. The backlight detection light box 12 can also independently select white light or red light. This illumination method can utilize the advantages of white light and infrared light at the same time as needed, and the detection of PCB boards is more comprehensive.
[0043] S1131: Top detection light box 11 assembly.
[0044] S11311: Left white, right red: The left light source assembly 112 emits white light, the right light source assembly 113 emits infrared light, and the middle top light source assembly 114 can select white light or infrared light as needed. The left white light is mainly used to detect scratches, stains and other defects on the surface of the pad and green oil that are obvious under visible light. The infrared light on the right can detect the concave defects of the green oil. The light (white light or infrared light) emitted by the middle top light source assembly 114 can be selected according to the detection needs, and is used for auxiliary detection or enhanced detection of specific areas (such as solder joints, through holes, etc.).
[0045] S11312: Left red and right white: Contrary to the lighting method in S11311 above, the left light source assembly 112 emits infrared light, and the right light source assembly 113 emits white light. The infrared light on the left is mainly used to detect the concave defects of the green oil, while the white light on the right is used to detect scratches, stains, etc. on the surface of the pad and green oil. The middle top light source assembly 114 can also select the light source type as needed for auxiliary detection or enhanced detection of specific areas.
[0046] S11313: middle white and two sides red: the middle top light source assembly 114 emits white light, and the left light source assembly 112 and the right light source assembly 113 emit infrared light. The white light at the middle top can be used to comprehensively detect scratches on the pad and green oil surface, while the infrared light on both sides enhances the internal detection capability of green oil depression defects or specific areas (such as solder joints, through holes, etc.).
[0047] S11314: middle red and white on both sides: the middle top light source component 114 emits infrared light, and the left light source component 112 and the right light source component 113 emit white light. The infrared light in the middle top is mainly used to detect the concave defects of the green oil, while the white light on both sides is used to comprehensively detect the scratches on the pad and the green oil surface. This lighting structure takes into account the detection of two types of defects at the same time, and is suitable for scenes with requirements for overall detection efficiency.
[0048] S1132: Backlight detection light box 12 assembly.
[0049] S11321: The backlight detection light box 12 emits white light. White light illumination is suitable for backlight detection of most conventional PCB board through holes, such as scratches, stains, etc.
[0050] S11322: The backlight detection light box 12 emits red light. Red light is not easily affected by ambient light or visible light, and is easy to identify certain specific defects, such as internal defects of holes, poor welding, etc. Such defects will form different thermal images or shadows under red light.
[0051] S1133: The top detection light box 11 and the backlight detection light box 12 are combined.
[0052] S11331: Top mixed, back white light: The top detection light box 11 uses mixed white light and infrared light, and the backlight detection light box 12 uses white light. The defects on the surface of the PCB board (such as scratches and dents on the surface of the pad and green oil) are detected by the top mixed light source (white light and infrared light), and the back full white light is used to enhance the contrast of the through-hole wall, ensuring that the through-hole wall forms a clear outline under the backlight, which is convenient for detecting the hole wall defects of the PCB board 15.
[0053] S11332: Top mixed light, back red light: The top detection light box 11 uses mixed white light and infrared light for illumination, and the backlight detection light box 12 uses red light for illumination. The top mixed light source (white light and infrared light) detects defects on the surface of the PCB board (such as scratches and dents on the pad and green oil surface). The back red light detects defects on the wall of the through hole.
[0054] S11333: Top white light, back mixed: The top inspection light box 11 is fully white light, and the backlight inspection light box 12 is illuminated by mixed white and red light. The top full white light ensures clear detection of PCB surface defects, while the back mixed light source is used to enhance the detection capability of through-hole walls and multi-layer structures.
[0055] S11334: Top infrared, back mixed light: The top inspection light box 11 is fully illuminated by infrared light, and the backlight inspection light box 12 is illuminated by mixed white light and red light. The top infrared light uses its penetrating ability to detect internal defects in multi-layer structures or coatings, while the back mixed light source detects defects in through holes under red light.
[0056] S11335: Mixed light on both top and back: The top detection light box 11 adopts mixed white light and infrared light illumination, and the backlight detection light box 12 adopts mixed white light and red light illumination; this lighting method combines the detection capabilities of all the above combinations, and can detect all surface defects of PCB boards and defects in through-hole walls, ensuring comprehensive inspection of PCB boards.
[0057] The number of alternating strobe combinations and the light emission time of the light source are set as follows:
[0058] For the time-sharing stroboscopic combination of the above light sources, the machine's movement speed = half (camera line frequency × detection accuracy). The different lighting methods proposed in steps 11-15 are staggered, such as 10m for infrared lighting, 10m for white light lighting, etc. (such a cycle is 20m). The machine's movement speed is the movement speed of the PCB to be photographed, in order to ensure that within one cycle, the camera can take multiple photos of the same area of the PCB under different lighting methods.
[0059] The number of combinations of light alternating flash in this embodiment is set to at least 2 groups, and at least 2 groups include a combination of white light illumination and infrared illumination. In this embodiment, the white light illumination is preferably a combination of single white light illumination, that is, the infrared illumination is preferably an infrared red light illumination. The wavelength of light provided by the top detection light box 11 and the backlight detection light box 12 includes 10nm-1mm, and monochromatic light, polychromatic light, or a combination of multiple wavelengths can be used.
[0060] Here, different colors can refer to different lighting methods. Light of the same color at different angles can also refer to different lighting methods. Ultimately, we need to stitch images with the same lighting method together so that we can use the same light intensity defect detection map to perform defect judgment on the same image.
[0061] The parameters such as the light source lighting mode, the number of alternating strobe combinations, and the light emission time of the light source can be adjusted according to different detection requirements to meet the detection needs of PCB boards of different specifications and types.
[0062] Combination Figure 2 The following is an explanation of the light illumination structure that can realize different illumination modes and different angles of the same color in step S11. The light illumination structure includes a top detection light box 11 and a backlight detection light box 12.
[0063] like Figure 2 and Figure 3 As shown, the top detection light box 11 is provided with a first light outlet 1111 facing the PCB board 15, and a detection port 1112 arranged opposite to the first light outlet 1111. The top detection light box 11 comprises a first box body 111, a left light source assembly 112, a right light source assembly 113, and a top light source assembly 114. The first light outlet 1111 and the detection port 1112 are both arranged on the first box body 111; the left light source assembly 112 is arranged on one side inside the first box body 111 and faces the first light outlet 1111, and the left light source assembly 112 is used to irradiate the PCB board 15 from the left side through the first light outlet 1111; the right light source assembly 113 is arranged on the other side inside the first box body 111 and faces the first light outlet 1111, and the right light source assembly 113 is used to irradiate the PCB board 15 from the right side through the first light outlet 1111.
[0064] The beam splitter 115 is tiltedly arranged between the first light outlet 1111 and the detection port 1112. The beam splitter 115 is arranged away from the first light outlet 1111 relative to the left light source assembly 112 and the right light source assembly 113. The beam splitter 115 is located in the first housing 111 on the side close to the detection port 1112. The top light source assembly 114 is arranged in the first housing 111. The top light source assembly 114 is located in the first housing 111 on the side close to the detection port 1112. The top light source assembly 114 faces the beam splitter 115. The light emitted by the top light source assembly 114 is directed toward the beam splitter 115, and is reflected by the beam splitter 115 and irradiated onto the PCB board 15.
[0065] The left light source assembly 112, the right light source assembly 113 and the middle top light source assembly 114 of the top detection light box 11 emit light at different angles. In this embodiment, the left light source assembly 112 emits light at a higher angle, while the right light source assembly 113 emits light at a lower angle, and the middle top light source assembly 114 adjusts the light output angle through the beam splitter 115.
[0066] In this embodiment, the angle between the plane where the beam splitter 115 is located and the plane where the first light outlet 1111 is located is between 30° and 50°. In this embodiment, the angle between the plane where the beam splitter 115 is located and the plane where the second light outlet 1211 is located is preferably set to 45°.
[0067] The angle formed by the projection of the ray from the center of the first light outlet 1111 to the center of the detection port 1112 and the plane where the scanning platform 14 is located is 80°.
[0068] The detection camera 13 is disposed on a ray from the center of the first light outlet 1111 to the center of the detection outlet 1112 , and the detection camera 13 is disposed in a direction from the detection outlet 1112 to the first light outlet 1111 .
[0069] The left light source assembly 112 and the right light source assembly 113 are respectively located on both sides of the first light outlet 1111, and are used to illuminate the PCB board 15 from the side through the first light outlet 1111. The beam splitter 115 is tilted between the first light outlet 1111 and the detection port 1112, and the beam splitter 115 is far away from the first light outlet 1111 relative to the left light source assembly 112 and the right light source assembly 113. Depending on the type of PCB board to be detected, the structures of the left light source assembly 112 and the right light source assembly 113 can be the same or different.
[0070] Combination Figure 2 and Figure 4 The structure of the backlight detection light box 12 in this embodiment is as follows:
[0071] The scanning platform 14 is provided with a light-transmitting opening 141 at a position corresponding to the PCB board, so that the backlight detection light box 12 can illuminate the through-hole wall of the PCB board.
[0072] The backlight detection light box 12 is located below the light-transmitting port 141 and is provided with a second light outlet 1211 facing the PCB board 15. The backlight detection light box 12 is used to emit light toward the PCB board 15. There is an angle between the light emitted by the backlight detection light box 12 and the straight line where the extension direction of the through hole of the PCB board is located.
[0073] The light from the backlight source assembly 122 is obliquely irradiated onto the non-test surface of the PCB board 15 through the second light outlet 1211. When the through hole wall of the PCB board 15 has a metal-plated layer, the light is mirror-reflected on the hole wall, and the reflected light passes through the spectroscope 115 and the detection port 1112 in turn, and is imaged at the detection camera 13, thereby realizing scanning and detection of the through hole wall of the PCB board 15; when the hole wall of the PCB board 15 is a substrate, the light is diffusely reflected on the hole wall, and the light hardly passes through the spectroscope 115 and the detection port 1112 to enter the detection camera 13 for imaging.
[0074] A connecting hole 1212 and an arc-shaped adjustment groove 1213 are provided on the second box body 121 of the backlight detection light box 12. The arc-shaped adjustment groove 1213 opens toward the connecting hole 1212. The backlight source assembly 122 is connected to the connecting hole 1212 by screws. The backlight source assembly 122 is adjustably connected to the arc-shaped adjustment groove 1213 by screws, so that the backlight source assembly 122 can be rotated and adjusted around the connecting hole 1212.
[0075] A back light diffuser 123 is provided between the backlight source assembly 122 and the light transmission port 141. The back light diffuser 123 converts the light emitted by the backlight source assembly 122 into a line light source with relatively uniform light intensity at each position, so as to facilitate the detection of the through-hole wall of the PCB board 15, avoid misjudgment caused by different light intensity at each position, and improve the practicality of the backlight detection light box 12 structure. The angle between the back light diffuser 123 and the plane where the second light outlet 1211 is located is between 5° and 45°. Preferably, in this embodiment, the angle between the back light diffuser 123 and the plane where the second light outlet 1211 is located is 10°.
[0076] S12: Under the lighting mode of S11, the detection camera 13 collects an image of a normal PCB board to obtain a light intensity defect detection image.
[0077] The detection camera 13 collects an image of a normal PCB board under white light illumination to obtain a white light intensity defect detection map, which includes an upper threshold value of white light intensity and a lower threshold value of white light intensity;
[0078] The image of a normal PCB board under infrared light illumination is collected by the detection camera 13 to obtain an infrared light intensity defect detection map, which includes an infrared light intensity upper threshold and an infrared light intensity lower threshold.
[0079] S12 specific steps include:
[0080] S121: Under the lighting mode selected in step S11, an image of a normal PCB board is collected.
[0081] Ensure that the captured images are of high quality and can accurately reflect the normal light intensity and color distribution of the PCB board.
[0082] S122: Separate color channels.
[0083] The acquired normal PCB board image is separated into different color channels, such as red, green, blue, etc. For each color channel, subsequent processing is performed separately.
[0084] S123: Setting an upper intensity threshold and a lower intensity threshold.
[0085] S1231: Set the intensity upper threshold: For each color channel, find the maximum intensity value of the color channel in the normal PCB board image. Set a percentage slightly higher than the maximum intensity value (such as 10%) as the intensity upper threshold.
[0086] The upper intensity threshold is used to detect areas that are too bright, indicating that the PCB board has a first defect.
[0087] S1232: Set the intensity lower threshold: For each color channel, according to the lowest intensity value of the color channel in the normal PCB board image, set a percentage (such as 10%) slightly lower than the lowest intensity value as the intensity lower threshold. The intensity lower threshold is used to detect too dark areas, indicating that the PCB board has a second defect.
[0088] S124: Integrate into a light intensity defect detection map, that is, integrate the intensity upper threshold and the intensity lower threshold of each color channel into a light intensity defect detection map. Figure 5 As shown, the light intensity defect detection map will contain multiple sets of intensity thresholds of different colors for subsequent defect detection (such as voids, cracks, etc. under infrared light).
[0089] Of course, multiple threshold intervals can be set according to customer needs, so that there is more than one lower intensity threshold and upper intensity threshold, and customers have more room for choice.
[0090] S13: Under the lighting mode of S11, the detection camera 13 collects an image of the PCB board to be detected to obtain a detection image.
[0091] S131: The scanning platform 14 transports the PCB board to be inspected according to the movement speed set in step S11;
[0092] S132: Transmit signals between the controller and the line scan camera acquisition card in the detection camera 13 through the trigger output line, and the transmission direction is that the signal is transmitted from the controller to the acquisition card of the line scan camera; the controller is also connected to the top detection light box 11 and the backlight detection light box 12 to control the strobe of the light source.
[0093] S133: According to the lighting mode set in step S11, the detection camera 13 is used in conjunction with the top detection light box 11 and the backlight detection light box 12 to obtain an image under the alternating strobe of white light lighting mode and infrared light lighting mode.
[0094] S1331: Aim the inspection camera 13 at the PCB to be inspected, and the top inspection light box 11 and the backlight inspection light box 12 can illuminate the PCB. The inspection camera 13 captures a static image each time the top inspection light box 11 and the backlight inspection light box 12 flash. If multiple images need to be taken continuously to capture different motion stages or positions, the above steps can be repeated.
[0095] S1332: The top detection light box 11 emits light toward the PCB board to detect the surface of the PCB board. Figure 2 and Figure 3 , the specific steps are as follows:
[0096] S13321: The light emitted by the left light source assembly 112 passes through the left diffuser 116 to form a line light source with relatively uniform light intensity at each position, and then passes through the first light outlet 1111 to irradiate the PCB board 15. After being reflected by the PCB board 15, it passes through the first light outlet 1111, the beam splitter 115, and the detection port 1112 in sequence and enters the detection camera 13, completing the imaging process.
[0097] S13322: The light emitted by the right light source assembly 113 passes through the right diffuser 117 to form a line light source with relatively uniform light intensity at each position, and then passes through the first light outlet 1111 to irradiate the PCB board 15. After being reflected by the PCB board 15, it passes through the first light outlet 1111, the beam splitter 115, and the detection port 1112 in sequence and enters the detection camera 13, completing the imaging process.
[0098] S13323: The top light source assembly 114 faces the beam splitter 115. The light emitted by the top light source assembly 114 passes through the top diffuser plate 118 and enters the beam splitter 115. The light is then reflected by the beam splitter 115 and irradiates the PCB board 15.
[0099] The light emitted by the left light source assembly 112, the right light source assembly 113 and the top light source assembly 114 is irradiated onto the PCB board 15 through the first light outlet 1111. After being mirror-reflected by the PCB board 15, the light passes through the first light outlet 1111, the spectroscope 115 and the detection port 1112 in sequence, and is imaged at the detection camera 13, thereby realizing scanning detection of the surface of the PCB board 15.
[0100] S1333: The backlight detection light box 12 emits light toward the PCB board.
[0101] S13331: The white light emitted by the backlight source assembly 122 passes through the back diffuser plate 123 to form a line light source with relatively uniform light intensity at each position, and then passes through the second light outlet 1211 to irradiate the PCB board 15. After being reflected by the wall of the through hole on the PCB board 15, it passes through the first light outlet 1111, the beam splitter 115, and the detection port 1112 in sequence and enters the detection camera 13, completing the imaging process.
[0102] S13332: The red light emitted by the backlight assembly 122 passes through the back diffuser plate 123 and irradiates the PCB board 15 from the lower right side. The backlight assembly 122 uses red light to effectively detect defects in the hole wall of the PCB board.
[0103] S133321: When the through hole on the PCB board 15 is a substrate hole, light is diffusely reflected in the substrate hole, and only a small amount of light can enter the camera array through the first light outlet 1111, the beam splitter 115, and the detection port 1112. The scanning imaging appears as a dark hole wall.
[0104] S133322: When the through hole on the PCB board 15 is a plated hole, the light is specularly reflected in the plated hole, and a large amount of light can enter the camera array through the first light outlet 1111, the beam splitter 115, and the detection port 1112, and the scanning imaging is manifested as light inside the hole.
[0105] By scanning the light and dark changes of the through-hole wall in the image, it is possible to detect whether there are defects in the through-hole wall.
[0106] When there are no defects on the through-hole wall of the PCB board 15, the through-hole will be uniformly illuminated; when there are defects on the through-hole wall of the PCB board 15, such as ink deposited on the metal surface of the hole wall, or metal impurities deposited on the non-metal hole wall, black spots will appear on the uniform reflective surface or reflective spots will appear on the non-reflective surface.
[0107] S14: The logic detection device is used to extract frames and divide the detection image obtained by the detection camera 13, and perform logic detection.
[0108] S141: When the logic detection device extracts frames to take images under the alternating strobe of white light illumination and infrared light illumination, it takes white light PCB board images under white light illumination and infrared light PCB board images under infrared light illumination, and the number of white light PCB board images and infrared light PCB board images are both greater than 1.
[0109] S142: performing defect recognition on the white light PCB board image using the white light intensity defect detection map and on the infrared light PCB board image using the infrared light intensity defect detection map to obtain recognition results.
[0110] S1421: Separate the color channels of the white light PCB board image and the infrared light PCB board image.
[0111] The white light PCB board image is separated into different color channels, and the intensity of each color channel in the white light PCB board image is confirmed separately.
[0112] Separate the infrared PCB image into different color channels, and confirm the intensity of each color channel in the infrared PCB image separately.
[0113] S1422: Compare the white light PCB board image with the corresponding white light intensity defect detection image. If the intensity value of each color channel in the white light PCB board image is between the upper intensity threshold and the lower intensity threshold of the color channel, the PCB board captured by the white light PCB board image is deemed qualified.
[0114] like Figure 6 As shown, taking the red channel of the white light PCB board image as an example, if the intensity value 163 of the red channel of the white light PCB board image is between the upper intensity threshold 161 and the lower intensity threshold 162 of the red channel, the PCB board captured by the white light PCB board image is deemed qualified.
[0115] Otherwise, it is determined that the PCB board captured by the white light PCB board image has defects, and the user is prompted to confirm. Figure 6 In the example, the intensity value 163 of the red channel of the white light PCB board image is less than the lower intensity threshold 162, indicating that the PCB board is defective. Figure 7 As shown, when the white light PCB board image is separated into the red channel, the defects of scratches and stains on the surface of the PCB board are obvious.
[0116] S1423: Compare the infrared light PCB board image with the corresponding infrared light intensity defect detection map. If the intensity value of each color channel in the infrared light PCB board image is between the upper intensity threshold and the lower intensity threshold of the color channel, the PCB board captured by the infrared light PCB board image is deemed qualified.
[0117] Otherwise, it is determined that the PCB board captured by the infrared light PCB board image has defects, and the user is prompted to confirm, for example, there is a dent on the surface of the PCB board. Figure 8 As shown, when the infrared light PCB board image is separated into the red channel, the concave defects on the surface of the PCB board are obvious.
[0118] like Fig. 9 As shown, a second embodiment of this embodiment is provided below, a method for extracting frames through stroboscopic lighting, and the specific steps are as follows:
[0119] S21: Set the light source lighting mode, the number of alternating strobe combinations, and the light source lighting time.
[0120] The top detection light box 11 is located above the scanning platform 14 and includes a left light source assembly 112, a right light source assembly 113 and a middle top light source assembly 114, each of which can control the output of white light and infrared light respectively. The top detection light box 11 is used to emit light to illuminate the surface of the PCB board 15.
[0121] The backlight detection light box 12 is located below the scanning platform 14, and the backlight detection light box 12 can control the output of white light and red light. The backlight detection light box 12 is used to emit light to illuminate the hole wall of the through hole of the PCB board 15.
[0122] The lighting methods are as follows:
[0123] S211: Set single white light illumination, the left light source assembly 112, the right light source assembly 113 and the middle top light source assembly 114 of the top detection light box 11 all emit white light. The backlight detection light box 12 also emits white light.
[0124] Suitable for detecting surface defects of PCB boards under white light.
[0125] S212: Set infrared red light illumination, the left light source assembly 112, the right light source assembly 113 and the middle top light source assembly 114 of the top detection light box 11 all emit infrared light. The backlight detection light box 12 emits red light.
[0126] S213: Mixed white light and infrared light illumination mode. Some components in the top detection light box 11 emit white light, while other components emit infrared light. The backlight detection light box 12 can independently select white light or red light.
[0127] This lighting method can take advantage of both white light and infrared light as needed, providing a more comprehensive inspection of PCB boards.
[0128] S2131: Top detection light box 11 assembly.
[0129] S21311: Left white, right red: The left light source assembly 112 emits white light, the right light source assembly 113 emits infrared light, and the middle top light source assembly 114 can select white light or infrared light as needed. The left white light is mainly used to detect scratches, stains and other defects on the surface of the pad and green oil that are obvious under visible light. The infrared light on the right can detect the concave defects of the green oil. The light (white light or infrared light) emitted by the middle top light source assembly 114 can be selected according to the detection needs, and is used for auxiliary detection or enhanced detection of specific areas (such as solder joints, through holes, etc.).
[0130] S21312: Left red and right white: Contrary to the above lighting method, the left light source assembly 112 emits infrared light and the right light source assembly 113 emits white light. The infrared light on the left is mainly used to detect the concave defects of the green oil, while the white light on the right is used to detect scratches and stains on the surface of the pad and green oil. The middle top light source assembly 114 can also select the light source type as needed for auxiliary detection or enhanced detection of specific areas.
[0131] S21313: middle white and two sides red: the middle top light source assembly 114 emits white light, and the left light source assembly 112 and the right light source assembly 113 emit infrared light. The white light at the middle top can be used to comprehensively detect scratches on the pad and green oil surface, while the infrared light on both sides enhances the internal detection capability of green oil depression defects or specific areas (such as solder joints, through holes, etc.).
[0132] S21314: middle red and white on both sides: the middle top light source component 114 emits infrared light, and the left light source component 112 and the right light source component 113 on both sides emit white light. The infrared light at the middle top is mainly used to detect the concave defects of the green oil, while the white light on both sides is used to comprehensively detect the scratches on the pad and the green oil surface. This lighting structure takes into account the detection of two types of defects at the same time, and is suitable for scenes with requirements for overall detection efficiency.
[0133] S2132: Backlight detection light box 12 assembly.
[0134] S21321: The backlight detection light box 12 emits white light. White light illumination is suitable for backlight detection of most conventional PCB board through holes, such as scratches, stains, etc.
[0135] S21322: The backlight detection light box 12 emits red light. Red light is not easily affected by ambient light or visible light, and is easy to identify certain specific defects. For example, a hole wall defect of a through hole of a PCB board will form a different thermal image or shadow under red light.
[0136] S2133: The top detection light box 11 and the backlight detection light box 12 are combined.
[0137] S21331: Top mixed, back white light: The top detection light box 11 uses mixed white light and infrared light for illumination, and the backlight detection light box 12 uses white light for illumination. The defects on the surface of the PCB board (such as scratches and dents on the surface of the pad and green oil) are detected by the top mixed light source (white light and infrared light), and the back of the backlight detection light box 12 is used to enhance the contrast of the through-hole wall, ensuring that the through-hole wall forms a clear outline under the backlight, which is convenient for detecting the hole wall defects of the PCB board 15.
[0138] S21332: Top mixed light, back red light: The top detection light box 11 uses mixed white light and infrared light for illumination, and the backlight detection light box 12 uses infrared light for illumination. The top mixed light source (white light and infrared light) detects defects on the surface of the PCB board (such as scratches and dents on the pads and green oil surfaces). The back red light detects defects on the through-hole wall, such as ink, scratches, etc.
[0139] S21333: Top white light and back mixed: The top inspection light box 11 is illuminated with full white light, and the backlight inspection light box 12 is illuminated with mixed white light and red light. The top full white light ensures clear detection of PCB surface defects, while the back mixed light source is used to enhance the detection capability of through-hole walls and multi-layer structures.
[0140] S21334: Top infrared, back mixed light: The top inspection light box 11 is fully illuminated by infrared light, and the backlight inspection light box 12 is illuminated by mixed white light and red light. The top infrared light uses its penetrating ability to detect internal defects in multi-layer structures or coatings, while the back mixed light detects defects in through holes under red light.
[0141] S21335: Mixed light on both top and back: The top detection light box 11 adopts mixed white light and infrared light illumination, and the backlight detection light box 12 adopts mixed white light and red light illumination; this lighting method combines the detection capabilities of all the above combinations, and can detect all surface defects of PCB boards and defects in through-hole walls, ensuring comprehensive inspection of PCB boards.
[0142] The number of alternating strobe combinations and the light emission time of the light source are set as follows:
[0143] For the time-sharing stroboscopic combination of the above light sources, the machine's movement speed = half (camera line frequency × detection accuracy). The different lighting methods proposed in steps 11-15 are staggered, such as 10m for infrared lighting, 10m for white light lighting, etc. (such a cycle is 20m). The machine's movement speed is the movement speed of the PCB to be photographed, in order to ensure that within one cycle, the camera can take multiple photos of the same area of the PCB under different lighting methods.
[0144] In this embodiment, the number of combinations of light alternating flashing is set to at least 2 groups, and at least 2 groups include a combination of white light illumination and infrared red light illumination. The wavelength of light provided by the top detection light box 11 and the backlight detection light box 12 includes 10nm-1mm, and can use monochromatic light, polychromatic light, or a combination of multiple wavelengths.
[0145] Here, different colors can refer to different lighting methods. Light of the same color at different angles can also refer to different lighting methods. Ultimately, we need to stitch images with the same lighting method together so that we can use the same light intensity defect detection map to perform defect judgment on the same image.
[0146] The parameters such as the light source lighting mode, the number of alternating strobe combinations, and the light emission time of the light source can be adjusted according to different detection requirements to meet the detection needs of PCB boards of different specifications and types.
[0147] In this embodiment, the same light is used to illuminate the PCB board in different angle environments. In the same lighting environment, multiple light sources are controlled to perform stroboscopic lighting on the PCB board from at least two different angles in a non-interfering manner. For example, left-direction light, right-direction light, front-direction light or rear-direction light are set in the same light illumination mode.
[0148] S22: Under the lighting mode of step S21, the detection camera 13 collects an image of a normal PCB board to obtain light intensity defect detection.
[0149] By detecting the image of a normal PCB board under the lighting mode by the detection camera 13, a light intensity defect detection map is obtained. The light intensity defect detection map includes a set threshold interval, and the threshold interval detects whether the PCB board has defects.
[0150] In S22, the specific steps of obtaining the strong defect detection map include:
[0151] S221: Under the lighting mode of step S21, multiple light sources are controlled to perform stroboscopic lighting on the normal PCB board from at least two different angles in a non-interfering manner, and the lighting at each angle is performed independently. The detection camera 13 captures images of the normal PCB board under multiple different lighting angles.
[0152] The detection camera 13 collects an image of a normal PCB board to obtain a normal PCB board image, ensuring that the collected image has high quality and can accurately reflect the normal light intensity and color distribution of the PCB board.
[0153] S222: Based on the images of multiple normal PCB boards under illumination at various angles, color channel analysis is performed on the images at each angle to separate the color channels (eg, red, green, and blue channels).
[0154] The acquired normal PCB board image is separated into different color channels, such as red, green, blue, etc. For each color channel, subsequent processing is performed separately.
[0155] S223: respectively set the intensity threshold interval of each color channel of the image at each angle. Each angle corresponds to an independent set of threshold intervals, which are used to determine whether the PCB board is qualified under the lighting of the angle.
[0156] For each color channel, find the minimum intensity value and maximum intensity value of the color channel in the corresponding normal PCB board image. According to the maximum intensity value of the color channel in the normal PCB board image, set a percentage slightly higher than the maximum intensity value (such as 10%) as the upper intensity threshold. Set a percentage slightly lower than the minimum intensity value (such as 10%) as the lower intensity threshold, and the upper intensity threshold is greater than the first lower intensity threshold.
[0157] Each angle corresponds to an independent threshold interval, which is used to determine whether the PCB board is qualified under the lighting of that angle.
[0158] S224: Select and merge threshold intervals to obtain a light intensity defect detection map.
[0159] The user can select at least two threshold intervals that do not interfere with each other to merge according to the detection requirements, so as to meet the detection standards under multiple angles of illumination at the same time. For example, the user can select the threshold intervals of the first angle and the second angle to merge, so as to detect PCB boards that are qualified under both angles.
[0160] In this embodiment, the illumination directions of the first angle and the second angle can be left-right direction or front-back direction, etc.
[0161] Fig. 9 As shown in , a first threshold interval 261 of a normal PCB board image is obtained under the first angle illumination. The first threshold interval 261 includes a first upper intensity threshold 2611 and a first lower intensity threshold 2612. The first threshold interval 261 is used to detect whether the PCB board has defects under the first angle illumination.
[0162] Under the second angle illumination, a second threshold interval 262 of a normal PCB board image is obtained. The second threshold interval 262 includes a second upper intensity threshold 2621 and a second lower intensity threshold 2622. The second threshold interval 262 is used to detect whether the PCB board has defects under the second angle illumination.
[0163] The defect position is different, and the display will be different when the light is shone at different angles. Some defects need to be illuminated from the left side to be more obvious, while some defects need to be illuminated from the right side to be more obvious. Therefore, there is only one defect detection image, and the PCB board image can be multiple images at different angles. In order to detect different defects that can only be effectively displayed under different angles of illumination, the strong defect detection image in this embodiment will contain multiple sets of intensity thresholds of different colors for subsequent defect detection. Of course, multiple threshold intervals can be set according to customer needs, and customers have more room for choice.
[0164] S23: According to the lighting angle combination selected by the user in S224, the inspection camera 13 performs synchronous stroboscopic lighting on the PCB board to be inspected and captures an image to obtain an inspection image. In a single capture process, multiple selected angles of lighting can be simultaneously realized to obtain an inspection image containing multiple angle lighting information.
[0165] The photographing process of step S23 in this embodiment is substantially the same as step S13 in the above embodiment, and will not be described in detail here.
[0166] S24: The logic detection device is used to extract frames and divide the detection image obtained by the detection camera 13, and perform logic detection.
[0167] S241: The logic detection device extracts frames of the image under the alternating strobe in step S23 to obtain a PCB board detection image.
[0168] S242: performing defect recognition on the PCB board detection image through the light intensity defect detection map to obtain a recognition result of the PCB board to be detected.
[0169] S2421: Separate PCB board detection image.
[0170] Separate the PCB inspection image into different color channels, extract the color channel intensity value under each selected angle of illumination, and confirm the intensity of each color channel separately.
[0171] S2422: Compare the intensity value of the PCB board inspection image with the light intensity defect inspection image.
[0172] The PCB board inspection image is compared with the corresponding threshold interval. If the PCB board inspection image intensity values of all selected angles are within the corresponding threshold interval, it is determined that the PCB board is qualified according to the user's requirements; otherwise, the PCB board inspected according to the user's requirements is unqualified, and the user is prompted to confirm.
[0173] For example, under the first angle illumination, the intensity value of each color channel in the PCB board detection image is within the first threshold interval of the color channel; and under the first angle illumination, the intensity value of each color channel in the PCB board detection image is within the second threshold interval of the color channel, then it is determined that the PCB board detection image is qualified according to the user's requirements; otherwise, the PCB board detected according to the user's requirements is unqualified.
[0174] like Fig. 9 As shown, taking the red channel of the PCB board detection image as an example, the intensity value 2613 of the red channel of the PCB board detection image at the first angle of the same lighting method is located within the first threshold interval 261 of the red channel; and the intensity value 2623 of the red channel of the PCB board detection image at the second angle of the same lighting method is located within the second threshold interval 262 of the red channel; the PCB board is determined to be qualified.
[0175] On the contrary, if at least one of the intensity values of each color channel in the PCB board detection image is outside the corresponding threshold range of the color channel, it is determined that the PCB board has defects, such as scratches on the surface of the PCB board.
[0176] In this embodiment, under the same white light illumination or the same infrared illumination mode, the steps of selecting a plurality of PCB board image detection steps captured by light of different angles that do not interfere with each other according to user needs are the same as those in the above implementation manner and will not be elaborated here.
[0177] Because defects on PCB boards may show different characteristics under the same lighting mode due to different lighting angles. Based on the first embodiment, the second embodiment uses multiple threshold intervals and color channels to ensure that defects can be effectively detected under various lighting conditions. At least two non-interfering threshold intervals are merged according to user detection requirements to simultaneously meet the detection standards under multiple angles of illumination. Setting at least two different threshold intervals (such as a first threshold interval and a second threshold interval) can more efficiently identify defects under different angles of illumination (such as left and right direction illumination); each area is set based on the image data of a normal PCB board, ensuring the accuracy and reliability of detection.
[0178] In summary, although the present invention has been disclosed as above in terms of preferred embodiments, the above preferred embodiments are not intended to limit the present invention. A person skilled in the art may make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the scope of protection of the present invention shall be based on the scope defined in the claims.
Claims
1. A method for extracting frames using stroboscopic lighting, characterized in that: include: S11: According to the inspection requirements of the PCB board, set the light source lighting mode, the number of alternating strobe combinations, and the light emission time of the light source; The light source illumination mode includes white light illumination mode and infrared light illumination mode, and the number of alternating strobe combinations is at least 2 groups; S12: Under the lighting mode of S11, the detection camera collects an image of a normal PCB board to obtain a light intensity defect detection image; The detection camera collects an image of a normal PCB board under white light illumination to obtain a white light intensity defect detection map, wherein the white light intensity defect detection map includes an upper threshold value of white light intensity and a lower threshold value of white light intensity; An image of a normal PCB board under infrared light illumination is collected by a detection camera to obtain an infrared light intensity defect detection map, wherein the infrared light intensity defect detection map includes an infrared light intensity upper threshold and an infrared light intensity lower threshold; S13: Under the lighting mode of S11, the detection camera collects an image of the PCB board to be detected to obtain a detection image; S14: The logic detection device is used to extract frames and divide the detection image obtained by the detection camera, and perform logic detection; it includes: S141: when the logic detection device extracts a frame to obtain a detection image under the alternating stroboscopic white light illumination mode and the infrared light illumination mode, it obtains a white light PCB board image under the white light illumination mode and an infrared light PCB board image under the infrared light illumination mode, and the number of the white light PCB board image and the infrared light PCB board image is greater than 1; S142: performing defect recognition on the white light PCB board image through the white light intensity defect detection map, and performing defect recognition on the infrared light PCB board image through the infrared light intensity defect detection map to obtain a recognition result; The step S11 of setting the light source illumination mode according to the detection requirements of the PCB board includes: S111: setting a single white light illumination, the left light source assembly, the right light source assembly, the middle top light source assembly of the top detection light box, and the backlight detection light box emit white light; S112: Setting infrared light illumination, the left light source assembly, the right light source assembly and the middle top light source assembly of the top detection light box emit infrared light, and the backlight detection light box emits red light; S113: Mix white light and infrared light illumination, the left light source assembly, the right light source assembly and the middle top light source assembly in the top detection light box emit white light and infrared light, and the backlight detection light box emits white light or red light; The S12 includes: S121: Under the lighting mode selected in S11, an image of a normal PCB board is collected; S122: separating color channels, separating the acquired normal PCB board image into different color channels; S1231: For each color channel, according to the maximum intensity value of the color channel in the normal PCB board image, a percentage higher than the maximum intensity value is set as the upper intensity threshold; S1232: For each color channel, according to the minimum intensity value of the color channel in the normal PCB board image, a percentage lower than the minimum intensity value is set as the lower intensity threshold; S124: Integrate the intensity upper threshold and the intensity lower threshold of each color channel into a light intensity defect detection map; The S13 includes: S131: The scanning platform conveys the PCB board to be inspected; S132: transmitting signals between the controller and the line scan camera acquisition card in the detection camera through the trigger output line, and the transmission direction is that the signal is transmitted from the controller to the acquisition card of the line scan camera; the controller is also connected to the top detection light box and the backlight detection light box to control the strobe of the light source; S133: According to the lighting mode set in S11, the detection camera is used in conjunction with the top detection light box and the backlight detection light box to obtain a detection image under the alternating strobe of the white light lighting mode and the infrared light lighting mode.
2. The method for extracting frames by stroboscopic lighting according to claim 1, characterized in that: The top detection light box comprises: A first box body, wherein the first box body is provided with a first light outlet facing the PCB board, and a detection port arranged opposite to the first light outlet; A left light source assembly is located inside the first housing and close to the first light outlet, and the left light source assembly illuminates the PCB from one side; A right light source assembly is located inside the first housing and close to the first light outlet. The right light source assembly is arranged opposite to the left light source assembly and illuminates the PCB from the other side. a spectroscope connected to the first housing, the spectroscope being tilted between the first light outlet and the detection outlet, and located inside the first housing near the detection outlet; and A top light source assembly is connected to the first housing and is located inside the first housing on one side close to the detection port. The top light source assembly is arranged relative to the beam splitter. Light from the top light source assembly is directed toward the beam splitter and illuminates the PCB board after being reflected by the beam splitter.
3. The method for extracting frames by stroboscopic lighting according to claim 1, characterized in that: The backlight detection light box comprises: A second box body, wherein the second box body is provided with a second light outlet facing the PCB board, and the PCB board is provided with a through hole; and A backlight source assembly, connected to the second housing, and configured to emit light to illuminate the hole wall of the through hole; The second box body is provided with a connection hole and an arc-shaped adjustment slot, wherein the arc-shaped adjustment slot is located above the connection hole and the opening of the arc-shaped adjustment slot faces the connection hole. The backlight source assembly is connected to the connection hole via screws, and the backlight source assembly is adjustably connected to the arc-shaped adjustment groove via screws, so that the backlight source assembly can be rotated and adjusted around the connection hole.
4. The method for extracting frames by stroboscopic lighting according to claim 1, characterized in that: The S142 includes: S1421: Separate the color channels of the white light PCB board image and the infrared light PCB board image, and separately confirm the intensity of each color channel in the white light PCB board image, and separately confirm the intensity of each color channel in the infrared light PCB board image; S1422: Compare the white light PCB board image with the corresponding white light intensity defect detection map. If the intensity value of the color channel in the white light PCB board image is between the intensity upper threshold and the intensity lower threshold of the color channel in the white light intensity defect detection map, the PCB board captured by the white light PCB board image is deemed qualified; otherwise, the PCB board captured by the white light PCB board image is deemed to have defects, and the user is prompted to confirm. S1423: Compare the infrared light PCB board image with the corresponding infrared light intensity defect detection map. If the intensity value of the color channel in the infrared light PCB board image is between the upper intensity threshold and the lower intensity threshold of the color channel in the infrared light intensity defect detection map, the PCB board photographed by the infrared light PCB board image is deemed qualified; otherwise, the PCB board photographed by the infrared light PCB board image is deemed to have defects, and the user is prompted to confirm.
5. The method for extracting frames by stroboscopic lighting according to claim 1, characterized in that: The S12 further includes: S221: Controlling a plurality of light sources to perform stroboscopic illumination on a normal PCB board from at least two different angles in a non-interfering manner, wherein the illumination at each angle is performed independently, and a detection camera captures images of the normal PCB board under illumination at a plurality of different angles; S222: Based on the images of the plurality of normal PCB boards under illumination at various angles, color channel analysis is performed on the images at each angle to separate the color channels; S223: respectively setting the intensity threshold interval of each color channel of the image at each angle, and each angle corresponds to a set of independent threshold intervals; S224: The user selects at least two non-interfering threshold intervals to merge according to the detection requirements to obtain a light intensity defect detection map.
6. The method for extracting frames by stroboscopic lighting according to claim 5, characterized in that: In S13, according to the lighting angle combination selected by the user in S224, the detection camera synchronously flashes the PCB board to be detected and captures an image to obtain a detection image; During a single shot, multiple selected angles of illumination can be achieved to obtain a detection image containing multiple angle illumination information.
