PCBA cold-soldering defect detection method and apparatus, and device and medium
By segmenting the PCBA image to be detected and judging the overlap of pixels, the accuracy problem of virtual soldering defect detection in the existing technology is solved, and high-accuracy detection of virtual soldering defects is achieved.
Patent Information
- Application Number
- PCT/CN2023/141559
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-11
- Filing Date
- 2023-12-25
- Publication Date
- 2024-10-17
AI Technical Summary
Existing detection methods cannot accurately identify virtual soldering defects on PCBA, leading to problems of misjudgment and missed detection in electronic product quality inspection.
By obtaining the image to be detected of the target circuit board, input it into the target segmentation model for segmentation, extract the pixel point set of the pin area and the exposed copper area, and determine the pixel overlap value, and perform card control according to the preset overlap threshold to obtain Defect detection results.
It achieves accurate detection of PCBA soldering defects, including detection of invisible soldering holes, improves detection accuracy and avoids over-inspection and missed inspection.
Smart Images

Figure CN2023141559_17102024_PF_FP_ABST
Abstract
Description
A PCBA cold soldering defect detection method, device, equipment and medium Technical Field
[0001] The present application relates to the technical field of circuit boards, and in particular to a method, device, equipment and medium for detecting cold solder joint defects in PCBAs. Background Art
[0002] The PCBA is the most common and crucial component in all electronic products. Similar to the human brain's neural network, it is the core of all electronic products, virtually determining the core, performance, and reliability of the product. According to research, nearly 80% of after-sales electronic product failures originate from the PCBA, making PCBA quality extremely important.
[0003] The actual processing of PCBA requires multiple complex processes, so it is easy to produce various defects. The large number of solder joints with different shapes to be inspected brings tremendous pressure to the quality inspection link.
[0004] Therefore, there is an urgent need for a method that can accurately identify PCBA defects.
[0005] Summary of the Invention
[0006] The main purpose of this application is to provide a method, device, equipment and medium for detecting cold solder joints on PCBAs, aiming to solve the technical problem that existing detection methods cannot accurately detect cold solder joints on PCBAs.
[0007] To solve the above technical problems, the present invention proposes a method for detecting PCBA cold solder joint defects, comprising the following steps:
[0008] Acquire the image to be inspected of the target circuit board;
[0009] Inputting the image to be inspected of the target circuit board into the target segmentation model for segmentation to obtain a first segmented image; wherein the first segmented image includes a first pin area and a first exposed copper area;
[0010] Extracting pixel points in the first pin area to obtain a pin area pixel point set; extracting pixel points in the first exposed copper area to obtain a copper exposed area pixel point set;
[0011] Determine whether the pixel point set of the pin area and the pixel point set of the exposed copper area overlap, and obtain a pixel overlap value;
[0012] The pixel overlap value is controlled according to a preset overlap threshold to obtain a defect detection result.
[0013] As some optional implementations of the present application, in order to distinguish the first pin area and the first exposed copper area, the first pin area and the first exposed copper area are represented by different colors in the first segmented image.
[0014] As some optional implementation methods of the present application, in order to avoid the problem of missed detection caused by inaccurate model segmentation accuracy, the present application performs an image dilation operation step before performing the overlap judgment operation of the pixel points of the first pin area and the pixel points of the first exposed copper area, and expands the two areas that are very close but not intersecting to a certain extent before making a judgment; that is, extracting the pixel points in the first pin area to obtain a pin area pixel point set; extracting the pixel points in the first exposed copper area to obtain a copper exposed area pixel point set, including: performing image dilation processing on the first pin area to obtain an expanded pin area; extracting the pixel points in the expanded pin area to obtain a pin area pixel point set; performing image dilation processing on the first exposed copper area to obtain an expanded copper exposed area; extracting the pixel points in the expanded exposed copper area to obtain a copper exposed area pixel point set.
[0015] As some optional implementation methods of the present application, in order to avoid subjective judgment when judging whether the pin area pixel point set and the copper exposed area pixel point set overlap, which may lead to misjudgment, the embodiments of the present application describe judging whether the pin area pixel point set and the copper exposed area pixel point set overlap and obtaining pixel overlap values, including: obtaining the coordinate values of each pixel in the pin area pixel point set based on the pin area pixel point set; obtaining the coordinate values of each pixel in the copper exposed area pixel point set based on the copper exposed area pixel point set; obtaining the pixel overlap value based on the coordinate values of each pixel in the pin area pixel point set and the coordinate values of each pixel in the copper exposed area pixel point set.
[0016] As some optional implementation methods of the present application, in order to make the obtained defect detection results more objective, the embodiments of the present application control the pixel overlap value according to a preset overlap threshold to obtain a defect detection result, including: if the pixel overlap value is greater than or equal to the preset overlap threshold, the defect detection result is that a defect exists; if the pixel overlap value is less than the preset overlap threshold, the defect detection result is that there is no defect.
[0017] As some optional implementation methods of the present application, obtaining the image to be inspected of the target circuit board refers to an AOI image actually captured based on the target circuit board; therefore, there may be many interference factors in the detection process. Therefore, in the embodiment of the present application, after capturing the solder joint area of the target circuit board and obtaining the original data image, the original data image is grayscale processed and denoised to obtain the image to be inspected of the target circuit board.
[0018] As some optional implementation methods of the present application, in order to ensure that the target segmentation model can accurately segment the image to be detected of the target circuit board when it is actually applied, the target segmentation model described in the embodiment of the present application is obtained by training a circuit board sample image set; the circuit board sample image set includes a cold solder panel sample image set and a standard panel sample image set.
[0019] As some optional implementation methods of the present application, in order to improve the recognition efficiency of the target segmentation model for the sample image set, each cold solder panel sample image in the cold solder panel sample image set described in the embodiment of the present application contains pin area annotation information and exposed copper area annotation information; the annotation information is obtained based on the semantic description information of the cold solder panel sample image.
[0020] To solve the above technical problems, the present application also proposes a PCBA cold soldering defect detection device, comprising:
[0021] An acquisition module is used to acquire the image to be inspected of the target circuit board;
[0022] a segmentation module, configured to input the image of the target circuit board to be inspected into a target segmentation model for segmentation to obtain a first segmented image; wherein the first segmented image includes a first pin area and a first exposed copper area;
[0023] a pixel extraction module, configured to extract pixel points in the first pin area to obtain a pin area pixel point set; and extract pixel points in the first exposed copper area to obtain a exposed copper area pixel point set;
[0024] a pixel overlap value calculation module, configured to determine whether the pixel set in the pin area overlaps with the pixel set in the exposed copper area, and obtain a pixel overlap value;
[0025] The defect detection module is used to control the pixel overlap value according to a preset overlap threshold to obtain a defect detection result.
[0026] To solve the above technical problems, an embodiment of the present application further proposes: an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-mentioned PCBA cold soldering defect detection method.
[0027] To solve the above technical problems, an embodiment of the present application further proposes: a computer-readable storage medium, on which a computer program is stored, and a processor executes the computer program to implement the above-mentioned PCBA cold soldering defect detection method.
[0028] Compared with the prior art, the PCBA cold solder joint defect detection method described in the embodiment of the present application includes: obtaining an original image of a circuit board to be detected for cold solder joint defects, that is, an original image of a target circuit board. However, since it is difficult to determine whether a cold solder joint defect exists in the original image of the target circuit board, the target circuit board image to be detected is input into a target segmentation model for segmentation to obtain a first segmented image; in this case, the first segmented image includes a first pin area and a first exposed copper area, and the first pin area and the first exposed copper area have different colors, making them easier to distinguish; based on this, pixels in the first pin area and the first exposed copper area are respectively extracted to obtain a pin area pixel set and a copper exposed area pixel set; based on a preset algorithm, whether the pin area pixel set and the copper exposed area pixel set overlap is determined to obtain a pixel overlap value, and a control is performed based on a preset overlap threshold to obtain a defect detection result. The detection result obtained through the above steps can accurately detect cold solder joint defects in the target circuit board, including the detection of invisible cold solder joints in holes; at the same time, the preset overlap threshold is set to avoid over-detection, thereby improving the detection accuracy of cold solder joint defects in circuit boards. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] FIG1 is a schematic diagram of the structure of an electronic device in a hardware operating environment according to an embodiment of the present application;
[0030] FIG2 is a flow chart of a method for detecting cold solder joint defects in a PCBA provided in an embodiment of the present application;
[0031] FIG3 is an image of a target circuit board to be inspected provided in an embodiment of the present application;
[0032] FIG4 is a first segmented image of target circuit board A provided in an embodiment of the present application;
[0033] FIG5 is a first segmented binary image of target circuit board A provided in an embodiment of the present application;
[0034] FIG6 is a second segmented image of target circuit board A provided in an embodiment of the present application;
[0035] FIG7 is an image of a target circuit board to be inspected provided by an embodiment of the present application;
[0036] FIG8 is a first segmented image of a target circuit board B provided in an embodiment of the present application;
[0037] FIG9 is a first segmented binary image of a target circuit board B provided in an embodiment of the present application;
[0038] FIG10 is a second segmented image of the target circuit board B provided in an embodiment of the present application;
[0039] FIG11 is a sample image of a cold-weld panel provided in an embodiment of the present application;
[0040] FIG12 is a sample image of a standard panel provided in an embodiment of the present application;
[0041] FIG13 is a first segmented image of a cold-weld panel sample provided by an embodiment of the present application;
[0042] FIG14 is a first segmented image of a standard panel sample provided by an embodiment of the present application;
[0043] FIG15 is a detection image output by a segmentation model corresponding to a sample of a cold-weld panel provided in an embodiment of the present application;
[0044] FIG16 is a detection image output by a segmentation model corresponding to a standard panel sample provided in an embodiment of the present application;
[0045] FIG17 is a schematic diagram of the functional modules of a PCBA cold solder joint defect detection device provided in an embodiment of the present application;
[0046] Among them, 1001 is a processor, 1002 is a communication bus, 1003 is a user interface, 1004 is a network interface, and 1005 is a memory. DETAILED DESCRIPTION
[0047] It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application.
[0048] The main solution of the embodiments of the present application is to provide a method, device, equipment and medium for detecting solder joint defects in PCBAs. The method includes the following steps: obtaining an image to be detected of a target circuit board; inputting the image to be detected of the target circuit board into a target segmentation model for segmentation to obtain a first segmented image; wherein the first segmented image includes a first pin area and a first exposed copper area; extracting pixels in the first pin area to obtain a pin area pixel point set; extracting pixels in the first exposed copper area to obtain a copper exposed area pixel point set; determining whether there is overlap between the pin area pixel point set and the copper exposed area pixel point set to obtain a pixel point overlap value; and controlling the pixel point overlap value according to a preset overlap threshold to obtain a defect detection result.
[0049] The PCBA is the most common and crucial component in all electronic products. Similar to the human brain's neural network, it is the core of all electronic products, virtually determining their core, performance, and reliability. According to research, nearly 80% of after-sales failures in electronic products stem from the PCBA, thus highlighting the importance of PCBA quality. The actual PCBA manufacturing process involves multiple complex steps, which can easily lead to various defects. The large number of solder joints with diverse shapes that require inspection places tremendous pressure on the quality inspection process. Currently, quality inspection based on AI deep learning has begun to gradually replace manual inspection in related fields, but some defects still cannot be accurately detected. Cold solder joints, a common and high-risk defect, are one such difficulty. Therefore, a method for accurately identifying PCBA defects is urgently needed.
[0050] Refer to Figure 1, which is a schematic diagram of the electronic device structure of the hardware operating environment involved in the embodiment of the present application.
[0051] As shown in Figure 1, the electronic device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. The communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the user interface 1003 may optionally include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WI-FI) interface). The memory 1005 may be a high-speed random access memory (RAM) memory, or a stable non-volatile memory (NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0052] Those skilled in the art will appreciate that the structure shown in FIG1 does not limit the electronic device and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0053] As shown in FIG. 1 , the memory 1005 as a storage medium may include an operating system, a network communication module, a user interface module, and an electronic program.
[0054] In the electronic device shown in Figure 1, the network interface 1004 is mainly used for data communication with the network server; the user interface 1003 is mainly used for data interaction with the user; the processor 1001 and the memory 1005 in the electronic device of the present invention can be set in the electronic device, and the electronic device calls the PCBA cold solder joint defect detection device stored in the memory 1005 through the processor 1001 and executes the PCBA cold solder joint defect detection method provided in the embodiment of the present application.
[0055] 2 , an embodiment of the present application provides a method for detecting PCBA cold solder joint defects, comprising the following steps:
[0056] Step S10: Acquire an image of the target circuit board to be inspected.
[0057] In practical applications, the target circuit board refers to a circuit board that needs to be inspected for cold soldering defects; the target circuit board may or may not have cold soldering defects. In addition, the image to be inspected of the target circuit board refers to an AOI image actually shot based on the target circuit board. Therefore, the original image of the target circuit board is a color image, and the circuit board image structure itself is relatively complex. For subsequent feature extraction, the actual shot AOI image can also be patch-labeled, which can be selected according to actual needs. In some embodiments, obtaining the image to be inspected of the target circuit board includes: photographing the solder joint area of the target circuit board to obtain the original data image; grayscale processing and denoising the original data image to obtain the image to be inspected of the target circuit board. The image after grayscale processing and denoising can also be regionally labeled as needed.
[0058] Step S20: Input the target PCB image to be inspected into the target segmentation model for segmentation, obtaining a first segmented image. The first segmented image includes a first pin region and a first exposed copper region. Specifically, the first pin region is a quasi-circular region in the center of the image, and the first exposed copper region is a crescent-shaped region that partially surrounds the first pin region.
[0059] It should be noted that the target segmentation model is obtained by training a set of sample images of a circuit board; the sample image set of the circuit board includes a set of sample images of a cold soldering panel and a set of sample images of a standard panel. In practical applications, the target segmentation model is obtained by training through the following steps: collecting a sample set of cold soldering circuit boards and a sample set of normal circuit boards, and annotating the pin area and the exposed copper area of the pads in the images in the sample set, such as annotating the first pin area as a circular area in the middle of the image, and annotating the first exposed copper area as a crescent-shaped area that semi-surrounds the first pin area; performing data enhancement processing on the annotated images, that is, performing reasonable and effective image transformation on the limited sample images to obtain more training data so that the model can adapt to various possible working conditions; training the segmentation model with the sample set after data enhancement processing to obtain a target segmentation model that can accurately segment the pin area and the exposed copper area of the pads. The target segmentation model obtained by training based on the above method can accurately segment the target circuit board into the pin area and the exposed copper area of the pads. In a specific application, each sample image of a cold solder joint panel in the sample image set includes pin region annotation information and exposed copper region annotation information; the annotation information is obtained based on semantic description information of the sample image of the cold solder joint panel. The data augmentation processing refers to expanding the dataset through methods such as affine transformation and image distortion.
[0060] In practical applications, to obtain a target segmentation model that can accurately segment the pin area and the exposed copper area of the pad, when collecting sample images, it is necessary to cover as many boards as possible with poor solder joints, normal boards, and "defective boards" between poor solder joints and normal boards. This allows the model to learn intermediate states and solve the problem of passing the model in real-world scenarios. In addition, data augmentation processing refers to expanding the dataset through methods such as affine transformation processing and image distortion processing.
[0061] In practical applications, it is possible to visually determine whether the pin area and the exposed copper area overlap, without the need for pixel extraction. However, visual judgment may result in errors and is subjective. Therefore, this application preferably determines whether there is overlap by the pixel overlap value of the pin area and the exposed copper area. That is:
[0062] Step S30: extracting pixel points in the first pin area to obtain a pin area pixel point set; extracting pixel points in the first copper-exposed area to obtain a copper-exposed area pixel point set.
[0063] In practical applications, step S30 extracts the pixels in the first pin area to obtain a pin area pixel set; extracts the pixels in the first copper exposed area to obtain a copper exposed area pixel set, including: performing image expansion processing on the first pin area to obtain an expanded pin area; extracting the pixels in the expanded pin area to obtain a pin area pixel set; performing image expansion processing on the first copper exposed area to obtain an expanded copper exposed area; extracting the pixels in the expanded copper exposed area to obtain a copper exposed area pixel set.
[0064] In practical applications, in order to avoid missed detection problems caused by inaccurate model segmentation accuracy, the present application performs an image dilation operation before performing the overlap judgment operation of the pixels of the first pin area and the pixels of the first exposed copper area. The two areas that are very close but not intersecting are expanded to a certain extent before judgment is performed. Therefore, the number of iterations used in the dilation operation is also an important hyperparameter of this solution, which can be used to control the strictness of the detection solution.
[0065] Step S40: Determine whether the pixel point set in the pin area overlaps with the pixel point set in the exposed copper area, and obtain a pixel overlap value.
[0066] In practical applications, after respectively obtaining the pin area pixel set and the copper exposed area pixel set, it is possible to determine whether the pin area pixel set and the copper exposed area pixel set overlap by overlapping the images, but this method cannot set a preset threshold to control the overlap result. Therefore, the embodiment of the present application preferably overlaps the coordinate values of the pin area pixel set and the coordinate values of the copper exposed area pixel set to obtain the pixel overlap value, that is:
[0067] In actual application, step S40 determines whether there is overlap between the pin area pixel point set and the exposed copper area pixel point set, and obtains the pixel overlap value, including: obtaining the coordinate value of each pixel point in the pin area pixel point set based on the pin area pixel point set; obtaining the coordinate value of each pixel point in the exposed copper area pixel point set based on the exposed copper area pixel point set; obtaining the pixel overlap value based on the coordinate value of each pixel point in the pin area pixel point set and the coordinate value of each pixel point in the exposed copper area pixel point set.
[0068] As described above, the advantage of calculating the overlap of the coordinate values of the pin area pixel set and the coordinate values of the exposed copper area pixel set is that the overlap result can be controlled by a preset threshold. Therefore, after obtaining the pixel overlap value step, the method further includes:
[0069] Step S50: The pixel overlap value is controlled according to a preset overlap threshold to obtain a defect detection result.
[0070] In actual applications, the pixel overlap value is controlled according to a preset overlap threshold to obtain a defect detection result, including: if the pixel overlap value is greater than or equal to the preset overlap threshold, the defect detection result is that a defect exists; if the pixel overlap value is less than the preset overlap threshold, the defect detection result is that no defect exists.
[0071] In practical applications, in order to avoid over-detection or missed detection, the preset overlap threshold can be set according to actual needs. For example, to avoid over-detection, the preset overlap threshold can be set lower; to avoid missed detection, the preset overlap threshold can be set higher.
[0072] The following describes the detection method described in this application in detail with reference to specific cases:
[0073] As shown in Figure 3, the image to be inspected of target circuit board A is input into the target segmentation model for segmentation, and a first segmented image as shown in Figure 4 is obtained; wherein, the first segmented image includes the first pin area (the circular area in the middle of the image) and the first exposed copper area (the crescent-shaped area that half surrounds the first pin area). The first segmented image is binarized to obtain the first segmented binary image as shown in Figure 5; the first segmented binary image is pixel-expanded to obtain the second segmented image as shown in Figure 6. Visual inspection shows that there is pixel overlap between the first pin area and the first exposed copper area; or by extracting the pixel points of the first pin area and the first exposed copper area respectively, it is determined whether the overlap value of the pixel set meets the preset overlap threshold requirement. Based on the overlap result, it is known that the pixel overlap value between the first pin area and the first exposed copper area is greater than the preset overlap threshold, so the defect detection result is a defect.
[0074] As shown in Figure 7, the image to be inspected of target circuit board B is input into the target segmentation model for segmentation, obtaining a first segmented image as shown in Figure 8; wherein, the first segmented image includes a first pin area (a circular area in the middle of the image) and a first exposed copper area (a crescent-shaped area that half surrounds the first pin area). The first segmented image is binarized to obtain a first segmented binary image as shown in Figure 9; the first segmented binary image is pixel-expanded to obtain a second segmented image as shown in Figure 10. Visual inspection shows that there is no pixel overlap between the first pin area and the first exposed copper area; or by extracting the pixels of the first pin area and the first exposed copper area separately, determining whether the overlap value of the pixel set meets the preset overlap threshold requirement, based on the overlap result, it is determined that the pixel overlap value between the first pin area and the first exposed copper area is less than the preset overlap threshold, so the defect detection result is no defect.
[0075] It should be noted that after extracting the pixels of the first pin area and the first exposed copper area respectively, calculating the overlap value of the pixel set can be accomplished by conventional technical means in the art, and thus will not be described in detail here.
[0076] The following describes in detail the training method of the target segmentation model described in this application with reference to specific cases:
[0077] The target segmentation model is trained using a set of sample circuit board images; the set includes a set of sample images of cold-weld panels and a set of sample images of standard panels; the cold-weld panel sample images are shown in Figure 11, and the standard panel sample images are shown in Figure 12. The first segmented image obtained by segmenting the cold-weld panel sample images corresponding to Figure 11 is shown in Figure 13, and the first segmented image obtained by segmenting the cold-weld panel sample images corresponding to Figure 12 is shown in Figure 14.
[0078] After the data enhancement processing of Figures 13 and 14, the segmentation model is trained; the images output by the trained segmentation model are shown in Figures 15-16, where the input image 13 is the output image 15; the input image 14 is the output image 16.
[0079] In specific applications, due to the limited sample images, reasonable and effective image transformations can be performed on the limited sample images to obtain more training data, allowing the model to adapt to a variety of possible working conditions. The segmentation model is trained on the sample set after data enhancement to obtain a target segmentation model that can accurately segment the pin area and the exposed copper area of the pad. After the first sample image shown in Figure 15 is transformed, the second sample image shown in Figure 16 can be obtained.
[0080] In summary, compared with the prior art, the PCBA cold solder joint defect detection method described in the embodiment of the present application includes: obtaining an original image of a circuit board to be detected for cold solder joint defects, that is, an original image of a target circuit board. However, since it is difficult to determine whether a cold solder joint defect exists in the original image of the target circuit board, the image of the target circuit board to be detected is input into a target segmentation model for segmentation to obtain a first segmented image; in this case, the first segmented image includes a first pin area and a first exposed copper area, and the first pin area and the first exposed copper area have different colors, making them easier to distinguish; based on this, respectively extracting pixels in the first pin area and the first exposed copper area to obtain a pin area pixel point set and a copper exposed area pixel point set; based on a preset algorithm, determining whether the pin area pixel point set and the copper exposed area pixel point set overlap, obtaining a pixel overlap value, and performing a control based on a preset overlap threshold to obtain a defect detection result. The detection result obtained through the above steps can accurately detect cold solder joint defects in the target circuit board, including the detection of invisible cold solder joints in holes; at the same time, the preset overlap threshold is set to avoid over-detection, thereby improving the detection accuracy of cold solder joint defects in the circuit board.
[0081] Based on the same inventive concept, as shown in FIG17 , the embodiment of the present application further proposes: a PCBA cold soldering defect detection device, comprising:
[0082] An acquisition module is used to acquire the image to be inspected of the target circuit board;
[0083] a segmentation module, configured to input the image of the target circuit board to be inspected into a target segmentation model for segmentation to obtain a first segmented image; wherein the first segmented image includes a first pin area and a first exposed copper area;
[0084] a pixel extraction module, configured to extract pixel points in the first pin area to obtain a pin area pixel point set; and extract pixel points in the first exposed copper area to obtain a exposed copper area pixel point set;
[0085] a pixel overlap value calculation module, configured to determine whether the pixel set in the pin area overlaps with the pixel set in the exposed copper area, and obtain a pixel overlap value;
[0086] The defect detection module is used to control the pixel overlap value according to a preset overlap threshold to obtain a defect detection result.
[0087] It should be noted that the modules in the PCBA cold solder joint defect detection device in this embodiment correspond one-to-one to the steps in the PCBA cold solder joint defect detection method in the aforementioned embodiment. Therefore, the specific implementation of this embodiment can refer to the implementation of the aforementioned PCBA cold solder joint defect detection method, which will not be repeated here.
[0088] In addition, in one embodiment, an embodiment of the present application further provides a computer program product, which implements the aforementioned method when executed by a processor.
[0089] In addition, in one embodiment, an embodiment of the present application further provides a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method in the aforementioned embodiment are implemented.
[0090] In some embodiments, the computer-readable storage medium may be a memory device such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface mount memory, optical disk, or CD-ROM; or various devices including any one or any combination of the above memories. The computer may be various computing devices including smart terminals and servers.
[0091] In some embodiments, executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0092] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).
[0093] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0094] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0095] The serial numbers of the above embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0096] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0097] The above are only preferred embodiments of the present application and do not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A PCBA cold soldering defect detection method, characterized in that: The following steps are involved: Acquire the image to be inspected of the target circuit board; Inputting the image to be inspected of the target circuit board into the target segmentation model for segmentation to obtain a first segmented image; wherein the first segmented image includes a first pin area and a first exposed copper area; Extracting pixel points in the first pin area to obtain a pin area pixel point set; extracting pixel points in the first copper exposed area to obtain a copper exposed area pixel point set; Determine whether the pixel point set of the pin area and the pixel point set of the copper exposed area overlap, and obtain a pixel point overlap value; The pixel overlap value is controlled according to a preset overlap threshold to obtain a defect detection result.
2. According to the PCBA cold soldering defect detection method of claim 1, it is characterized in that: The first pin area and the first copper exposed area are represented by different colors.
3. According to the PCBA cold soldering defect detection method of claim 2, it is characterized in that: The step of extracting pixel points in the first pin area to obtain a pin area pixel point set; and extracting pixel points in the first copper exposed area to obtain a copper exposed area pixel point set, comprises: Performing image expansion processing on the first pin region to obtain an expanded pin region; extracting pixel points in the expanded pin region to obtain a pin region pixel point set; The first copper-exposed area is subjected to image expansion processing to obtain an expanded copper-exposed area; and pixel points in the expanded copper-exposed area are extracted to obtain a copper-exposed area pixel point set.
4. The PCBA cold soldering defect detection method according to claim 1, characterized in that: The determining whether there is overlap between the pixel point set of the pin area and the pixel point set of the copper exposed area, and obtaining the pixel point overlap value, comprises: Based on the pin area pixel point set, obtaining the coordinate value of each pixel point in the pin area pixel point set; Based on the copper exposed area pixel point set, obtaining the coordinate value of each pixel point in the copper exposed area pixel point set; Based on the coordinate values of each pixel point in the lead area pixel point set and the coordinate values of each pixel point in the copper exposed area pixel point set, a pixel point overlap value is obtained.
5. The PCBA cold soldering defect detection method according to claim 1, characterized in that: The pixel point overlap value is controlled according to a preset overlap threshold to obtain a defect detection result, including: If the pixel overlap value is greater than or equal to the preset overlap threshold, the defect detection result is that a defect exists; if the pixel overlap value is less than the preset overlap threshold, the defect detection result is that a defect does not exist.
6. The PCBA cold soldering defect detection method according to claim 1, characterized in that: The step of obtaining the image to be detected of the target circuit board comprises: Photograph the solder joint area of the target circuit board to obtain a raw data image; The original data image is processed in grayscale and denoised to obtain the image to be inspected of the target circuit board.
7. The PCBA cold soldering defect detection method according to claim 1, characterized in that: The target segmentation model is obtained by training a circuit board sample image set; the circuit board sample image set includes a cold solder panel sample image set and a standard panel sample image set.
8. The PCBA cold soldering defect detection method according to claim 7, characterized in that: Each cold solder joint panel sample image in the cold solder joint panel sample image set includes pin area annotation information and copper exposed area annotation information; the annotation information is obtained based on semantic description information of the cold solder joint panel sample image.
9. A PCBA cold soldering defect detection device, characterized in that: include: An acquisition module is used to acquire the image to be detected of the target circuit board; A segmentation module, used for inputting the image to be detected of the target circuit board into the target segmentation model for segmentation to obtain a first segmented image; wherein the first segmented image includes a first pin area and a first exposed copper area; A pixel extraction module is used to extract pixel points in the first pin area to obtain a pin Extracting the pixel points in the first copper-exposed area to obtain a pixel point set of the copper-exposed area; A pixel point overlap value calculation module is used to determine whether the pixel point set of the pin area and the pixel point set of the copper exposed area overlap, and obtain a pixel point overlap value; The defect detection module is used to control the pixel overlap value according to a preset overlap threshold to obtain a defect detection result.
10. An electronic device, characterized in that: The electronic device includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the PCBA cold soldering defect detection method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the processor executes the computer program to implement the PCBA cold soldering defect detection method as described in any one of claims 1 to 8.
Citation Information
Patent Citations
PCBA quality detection method based on artificial intelligence
CN110865087A
PCB color change defect detection method, device, equipment and medium
CN115861327A
PCBA (Printed Circuit Board Assembly) pseudo soldering defect detection method, device, equipment and medium
CN116109631A
Apparatus for inspecting a wiring pattern according to a micro-inspection and a macro-inspection performed in parallel
US5608816A
Hole protection cap detection method and apparatus, computer device and storage medium
WO2021000524A1
Cited By
Photovoltaic cell defect detection method and system based on image processing
CN119295475A
Welding defect intelligent detection method of AOI equipment and AOI equipment
CN121685453A
Quality inspection programming method and quality inspection processing method of AOI equipment, equipment and storage medium
CN122345613A
