Defect detection method and device suitable for abnormal shape of bonding pad and storage medium
By extracting the profile and morphological characteristics of the pad, performing contour folding processing and judging the difference data, the problem of the inability to effectively detect the special-shaped defects of the pad in the prior art is solved, and high-accurate defect detection is achieved.
Patent Information
- Application Number
- CN202411976306.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-31
- Publication Date
- 2025-04-25
AI Technical Summary
The prior art cannot effectively detect defects in pad shape during the AI defect filtering process, such as protrusions, depressions, defects, etc., resulting in defects in pad shape being missed during re-checking.
By acquiring the defect image of the circuit board, determine whether the pad exists, and if so, extract the profile and morphological characteristics of the pad. Classify according to the morphological characteristics of the pad. If it is a special shape, the contour folding process is performed, the area and difference data of the folded partition are calculated, and whether it is less than or not within the preset threshold range is determined to determine whether the pad special shape defect exists.
It realizes effective identification and determination of pad special-shaped defects, improves the accuracy and reliability of defect detection, and avoids the misunderstanding of pad special-shaped defects.
Smart Images

Figure CN119887713A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of defect detection technology, and in particular to a defect detection method, device and storage medium suitable for pad profiles. Background Art
[0002] Printed circuit boards (PCBs) are key components of electronic products. As the part of the PCB used to solder electronic components, the quality of the pads directly affects the performance and reliability of electronic products. Machine vision inspection technology is widely used in circuit board yield inspection. An industrial camera is used to obtain the appearance image of the circuit board, and then the image is analyzed through an image processing algorithm to identify defects on the circuit board. AI defect filtering is a further optimization of machine vision inspection technology. It re-inspects the defect result image detected by machine vision, and further verifies the authenticity of the defects in the defect image through the trained AI recognition model, thereby filtering the defect result image and improving the accuracy of defect detection. However, the inventors found that in the process of AI defect filtering, the AI recognition model can effectively detect scratches and foreign matter on the pads, but cannot effectively detect defects such as protrusions, depressions, and incompleteness of the pads, resulting in the defects of the pads being missed in the re-inspection. Summary of the invention
[0003] In view of this, the present application provides a defect detection method, device and storage medium suitable for pad irregularities, so as to solve the technical problem in the prior art that defects of pad irregularities cannot be effectively detected during defect re-inspection and filtering.
[0004] In a first aspect, the present application provides a defect detection method suitable for pad profiles, the method comprising:
[0005] Obtain a defect image of the circuit board and determine whether there is a pad in the defect image;
[0006] If there is a pad, extract the outline and morphological features of the pad in the defect image;
[0007] If the morphological feature of the pad is an irregular shape, it is determined that there is an irregular pad defect in the defect image.
[0008] Preferably, it also includes:
[0009] If the morphological feature of the pad is a nearly circular shape or a nearly rectangular shape, the outline of the pad is folded based on the morphological feature of the pad;
[0010] Calculate the contour area of each folded partition and determine the minimum area value;
[0011] It is determined whether the minimum area value is less than a preset single-area area threshold value. If the minimum area value is less than the preset single-area area threshold value, it is determined that there is a pad irregularity defect in the defect image.
[0012] Preferably, it also includes:
[0013] If the minimum area value is not less than the preset single-area area threshold, then calculating the difference data between the folded partitions;
[0014] Determine whether the difference data between the folded partitions is within a preset difference threshold range;
[0015] If the difference data between the folded partitions is not within the preset difference threshold range, it is determined that there is a pad shape defect in the defect image;
[0016] If the difference data between the folded partitions is within a preset difference threshold range, it is determined that there is no pad shape defect in the defect image.
[0017] Preferably, it also includes:
[0018] If the morphological feature of the pad is a combined morphology, the outline of the pad is split to obtain a nearly circular / rectangular morphological part outline and a line part outline;
[0019] Folding the outline of the nearly circular / rectangular portion based on the morphological features of the outline of the nearly circular / rectangular portion;
[0020] Calculate the contour area of each folded partition and determine the minimum area value;
[0021] It is determined whether the minimum area value is less than a preset single-area area threshold value. If the minimum area value is less than the preset single-area area threshold value, it is determined that there is a pad irregularity defect in the defect image.
[0022] Preferably, it also includes:
[0023] If the minimum area value is not less than the preset single-area area threshold, then calculating the difference data between the folded partitions;
[0024] Determine whether the difference data between the folded partitions is within a preset difference threshold range;
[0025] If the difference data between the folded partitions is not within the preset difference threshold range, it is determined that there is a pad shape defect in the defect image.
[0026] Preferably, it also includes:
[0027] If the difference data between the folded partitions is within a preset difference threshold range, then calculating the line width according to the line portion contour, and determining whether the line width is within a preset line width threshold range;
[0028] If the line width is not within a preset line width threshold range, it is determined that a pad irregularity defect exists in the defect image.
[0029] Preferably, it also includes:
[0030] If the line width is within a preset line width threshold range, it is determined that no pad profile defect exists in the defect image.
[0031] In a second aspect, the present application provides a defect detection device suitable for pad profiles, the device comprising:
[0032] A pad existence module is used to obtain a defect image of a circuit board and determine whether a pad exists in the defect image;
[0033] A pad extraction module is used to extract the outline and morphological features of the pad in the defect image if the pad exists;
[0034] The pad determination module is used to determine that there is a pad irregularity defect in the defect image if the morphological feature of the pad is an irregular shape.
[0035] In a third aspect, the present application provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor implements the defect detection method for pad irregularities described in the first aspect by executing the computer instructions.
[0036] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the defect detection method suitable for pad irregularities described in the first aspect is implemented.
[0037] The defect detection method, device and storage medium for pad irregularity provided in the present application have at least the following beneficial effects:
[0038] The technical solution provided by the present application determines the presence or absence of pads in the defective image. When it is determined that there are no pads in the defective image, it is correspondingly determined that there are no pad irregularity defects in the defective image. After determining that the pad exists, the type of pad can be effectively and accurately determined by extracting the contour of the pad and the morphological features of the pad in the defective image. When the morphological features of the pad are irregular, the pad can be accurately and effectively identified as a pad irregularity defect, thereby improving the stability and reliability of the re-inspection of pad irregularity defects in defective images. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the specific implementation methods or the prior art descriptions. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings without creative work. It should be noted that the drawings described below are schematic and should not be understood as any limitation to the present application. In the drawings:
[0040] Figure 1 A schematic diagram showing a defect detection method suitable for pad profiles in one embodiment of the present application is shown;
[0041] Figure 2 A schematic diagram of a defect detection device suitable for pad profiles in one embodiment of the present application is shown;
[0042] Figure 3 A schematic diagram of a computer device in one embodiment of the present application is shown. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0044] In the description of the present application, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present application. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.
[0045] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, it can also be the internal connection of two components, it can be a wireless connection, or it can be a wired connection. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.
[0046] In addition, the technical features involved in the different embodiments of the present application described below can be combined with each other as long as they do not conflict with each other.
[0047] Although the processes described below include multiple operations that appear in a specific order, it should be clearly understood that these processes may also include more or fewer operations, and these operations may be performed sequentially or in parallel.
[0048] Example 1
[0049] The defect detection method for pad irregularities provided in the present application can be applied to the scenario of defect re-inspection and filtering, and mainly re-inspects and verifies the defect images detected by the first inspection equipment of visual inspection, and achieves the purpose of effectively detecting the defects of pad irregularities by performing data processing on the defect images.
[0050] See also Figure 1 , a defect detection method suitable for pad irregularities provided in one embodiment of the present application may include the following steps.
[0051] Obtain a defect image of the circuit board and determine whether there is a pad in the defect image;
[0052] If there is a pad, extract the outline and morphological features of the pad in the defect image;
[0053] If the morphological feature of the pad is an irregular shape, it is determined that there is an irregular pad defect in the defect image.
[0054] In this embodiment, it is possible to determine whether there is a pad in the defective image based on the threshold segmentation method. Specifically, the defective image is first converted into a grayscale image, because the pad and the circuit board background usually differ in color, brightness, etc. By analyzing the distribution of grayscale values, a suitable threshold is selected to segment the image into two parts: the foreground (which may contain the pad) and the background. For example, if the pad is darker and the background is brighter, a threshold can be set so that pixels with grayscale values lower than the threshold are judged to belong to the pad area, and those above the threshold are the background. Commonly used threshold segmentation algorithms include the global threshold method (such as the Otsu algorithm), which can automatically calculate the optimal threshold and is suitable for relatively uniform image illumination; there is also an adaptive threshold method, which can dynamically adjust the threshold according to the illumination changes in different areas of the image, and has a better effect on circuit board images with uneven illumination. After the segmentation is completed, the obtained foreground area is subjected to a connected domain analysis. If there is a connected domain whose characteristics such as area and shape meet the expectations of the pad, such as a relatively regular shape (circular, square or irregular contour) with a certain size range, it is preliminarily judged that the area corresponding to these connected domains may have a pad.
[0055] In this embodiment, it is also possible to determine whether there is a pad in the defective image by edge detection and contour analysis methods. Specifically, the image is processed using edge detection operators (such as Sobel, Canny, etc.) to highlight the edge information of the object in the image. Obvious edges are usually formed at the boundary between the pad and the surrounding environment, and these edges appear as continuous or discontinuous lines after edge detection. Contour extraction is performed on the detected edges to find closed contours. Similarly, by analyzing the features of the contour, such as geometric parameters such as perimeter, area, and circularity, it is determined whether it is consistent with the features of the pad. For example, the perimeter and area of a normal pad will be within a certain numerical range. If the parameters of a certain contour are within this range, it is more likely to be a pad. Moreover, for special-shaped pads, although the shape is irregular, there are also specific size ranges and shape characteristics designed to be distinguished. In addition, feature matching methods and deep learning methods can also be used to determine whether there is a pad in the defective image, which will not be repeated here.
[0056] In this embodiment, if it is determined that there is no pad in the defect image, then it is correspondingly determined that there is no pad irregularity defect in the defect image.
[0057] In this embodiment, after determining that there is a pad in the defective image, the following method can be used to extract the contour and morphological features of the pad. Contour extraction invention, such as contour extraction based on edge detection, uses a Canny edge detection operator to process the image. The Canny operator can accurately find the edges of objects in the image by calculating the image gradient, and use high and low thresholds to filter out strong edges and weak edges, and connect them through certain rules to obtain relatively clear pad edge lines. Afterwards, use the findContours function in the OpenCV library to perform contour search on these edges. This function can return all contour information in the image. These contours are represented in the form of a series of point coordinates, accurately outlining the boundary shape of the pad, whether it is a regular circular or square pad, or a complex special-shaped pad, it can be effectively extracted.
[0058] Another example is contour extraction based on region growth, which first selects one or more seed points in the image. These seed points are usually located in the suspected pad area. Then, according to certain growth rules, such as grayscale similarity, color similarity, or texture similarity of pixels, the seed points are allowed to "grow" toward the surrounding area until the growth boundary is significantly different from the surrounding environment. At this time, the boundary of the growth area is the outline of the pad. This method is more suitable for situations where the pad is not particularly distinguishable from the background, but there is a certain grayscale or color gradient, and can adaptively extract the pad outline.
[0059] In terms of morphological features, such as the area in the geometric features, for the extracted pad contour, the area of the area enclosed by the contour is calculated by mathematical methods such as integration. In OpenCV, the contourArea function can be used to obtain it conveniently. The area feature can intuitively reflect the size of the pad, which is very helpful for judging whether the pad has dimensional deviations during the manufacturing process. For example, if the standard pad area is a specific value, if the calculated actual pad area is significantly different from it, there may be defects.
[0060] The perimeter in the geometric features is also calculated based on the coordinates of the contour points using a mathematical formula to calculate the perimeter of the pad contour. The perimeter combined with the area can further analyze the shape characteristics of the pad, such as by calculating the circularity (area / square of the perimeter). For a regular circular pad, the circularity is close to 1, while the circularity of an irregular pad will deviate from this value, thereby judging whether the shape of the pad meets the design expectations and whether there is any deformation.
[0061] The circumscribed rectangle and the minimum circumscribed rectangle in the geometric features are used to find the circumscribed rectangle of the pad outline, that is, the minimum rectangle that can contain the entire pad outline. Its length and width can reflect the maximum size range of the pad in the horizontal and vertical directions, which is important for judging whether the pad is reasonably placed in the layout space on the PCB. At the same time, the minimum circumscribed rectangle can also be calculated. It is a rectangle that fits the pad outline closely. Its parameters such as angle and side length can provide more details for analyzing the special shape of special-shaped pads, such as judging whether the special-shaped pads are skewed.
[0062] Another example is the central moment in the moment feature, which is obtained by performing a series of mathematical operations on the coordinates of the pad contour points. The first-order central moment can determine the center of gravity of the pad, which is critical for understanding the relative position accuracy of the pad on the PCB. If the center of gravity deviates too much from the design center position, it may affect the subsequent soldering accuracy of electronic components. The second-order central moment can reflect the direction and extension of the pad. Combined with the circumscribed rectangle, it can more comprehensively describe the shape of the pad, especially for special-shaped pads, to help analyze the distribution characteristics of their complex shapes.
[0063] The Hu moment in the moment feature is a set of features with translation, rotation and scale invariance derived from the central moment. The Hu moment can be used to accurately identify the morphological features of the pad when there is a certain translation and rotation change. It is widely used in the field of image recognition and matching. For the detection of PCB pads, it can improve the feature extraction accuracy of pads with different postures and ensure the accuracy of pad morphology judgment in complex production environments.
[0064] In this embodiment, the morphological characteristics of the pad are mainly classified into nearly circular, nearly rectangular, irregular and combined forms. If the morphological characteristics of the pad are irregular, it is determined that there is a pad irregular defect in the defect image. The so-called irregular form is simply a form other than nearly circular, nearly rectangular and combined forms.
[0065] In this embodiment, by judging the presence or absence of pads in the defect image, when it is judged that there are no pads in the defect image, it is correspondingly judged that there are no pad irregularity defects in the defect image. After determining that the pad exists, the type of pad can be effectively and accurately determined by extracting the contour of the pad and the morphological features of the pad in the defect image, and when the morphological features of the pad are irregular, the pad can be accurately and effectively identified as a pad irregularity defect, thereby improving the stability and reliability of the re-inspection of pad irregularity defects in the defect image.
[0066] Preferably, it also includes:
[0067] If the morphological feature of the pad is a nearly circular shape or a nearly rectangular shape, the outline of the pad is folded based on the morphological feature of the pad;
[0068] Calculate the contour area of each folded partition and determine the minimum area value;
[0069] It is determined whether the minimum area value is less than a preset single-area area threshold value. If the minimum area value is less than the preset single-area area threshold value, it is determined that there is a pad irregularity defect in the defect image.
[0070] Preferably, it also includes:
[0071] If the minimum area value is not less than the preset single-area area threshold, then calculating the difference data between the folded partitions;
[0072] Determine whether the difference data between the folded partitions is within a preset difference threshold range;
[0073] If the difference data between the folded partitions is not within the preset difference threshold range, it is determined that there is a pad shape defect in the defect image;
[0074] If the difference data between the folded partitions is within a preset difference threshold range, it is determined that there is no pad shape defect in the defect image.
[0075] In this embodiment, the contour of the pad is folded based on the morphological characteristics of the pad. Specifically, when the contour of a pad in a nearly circular shape is folded, any diameter can be determined as a symmetry axis for symmetrical folding. When the contour of a pad in a nearly rectangular shape is folded, a straight line passing through the center point and parallel to any rectangular side can be determined as a symmetry axis for symmetrical folding.
[0076] It should be noted that in practical applications, two foldings can be performed, that is, according to the symmetry axis of the first fold, the vertical line through its center is determined as the symmetry axis of the second folding, and then four folded partitions are obtained. The partitions after two foldings have smaller partition areas, and the difference results between the four folded partitions are more significant. Correspondingly, when determining whether there are pad profile defects, the stability and reliability of the determination results can be further improved. Of course, the four foldings can be understood in the same way, and will not be repeated here.
[0077] In this embodiment, by judging whether the minimum area value is less than the preset single-area area threshold, that is, if the minimum area value is less than the preset single-area area threshold, the folded partition corresponding to the minimum area value has a pad defect, for example, the area is smaller due to the concave edge of the pad, or the pad is smaller in size. Therefore, when the minimum area value is less than the preset single-area area threshold, it is determined that there is a pad irregularity defect in the defect image.
[0078] In this embodiment, since the defective image is re-inspected, when the pad is identified, the pad in the image cannot be accurately mapped to the specific position of the corresponding pad on the design board or the mother board, that is, it cannot be compared and detected based on the corresponding standard pad, and can only be identified based on the contour and features of the pad in the current image. Therefore, in this embodiment, re-inspection can only be performed by means other than traditional comparative detection, by classifying the morphological features of the pad, and when the morphological features of the pad are nearly circular or rectangular, the contour of the pad is folded based on the morphological features of the pad, so as to calculate the contour area of each folded partition, calculate the difference data between the folded partitions, and compare them with the corresponding threshold value, so as to determine whether the pad has a special-shaped defect. Specifically, for example, if there is a bulge on a partition after folding, then when calculating the difference data between the folded partitions, it will be calculated that there is a bulge at the corresponding position of this partition. The difference data, such as the specific parameters of the bulge, including the height, width and area of the bulge, can be compared with the preset difference threshold range. If it is not within the preset difference threshold range, it means that the bulge will affect the performance of the pad and needs to be detected. If it is within the preset difference threshold range, it means that the bulge is very small and within the acceptable range, and will not affect the performance of the pad. It is determined that there is no pad irregularity defect in the defect image, that is, the defect image is a false point and a false detection occurs.
[0079] In this embodiment, the folding process and subsequent judgment process play a role of precision filtering. By partitioning and folding the pad contour according to the shape, the pad details can be deeply analyzed by comparing the folded partitions with each other, and the contour area of each folded partition can be calculated and compared with the preset threshold. Those sunken special-shaped defects and the extremely hidden and shrunken special-shaped defects can be accurately found, pushing the accuracy of pad special-shaped defect detection to a new height. It effectively avoids pad quality problems caused by tiny special-shaped defects, effectively ensures the stable operation of electronic products under complex working conditions, and greatly improves the product yield and reliability.
[0080] In this embodiment, the difference data between the folded partitions is newly calculated and compared with the preset difference threshold. After the contour folding of the nearly circular or rectangular pad is performed, the subtle differences between the partitions are deeply explored, no longer limited to the simple area consideration. Whether it is the irregularity of the partition boundary, the gradual change trend of the shape, or the slight difference in texture features, it can be accurately quantified through the difference data. This makes those extremely hidden and difficult to detect special-shaped defects nowhere to hide, further enhancing the accuracy of pad special-shaped defect detection.
[0081] Preferably, it also includes:
[0082] If the morphological feature of the pad is a combined morphology, the outline of the pad is split to obtain a nearly circular / rectangular morphological part outline and a line part outline;
[0083] Folding the outline of the nearly circular / rectangular portion based on the morphological features of the outline of the nearly circular / rectangular portion;
[0084] Calculate the contour area of each folded partition and determine the minimum area value;
[0085] It is determined whether the minimum area value is less than a preset single-area area threshold value. If the minimum area value is less than the preset single-area area threshold value, it is determined that there is a pad irregularity defect in the defect image.
[0086] Preferably, it also includes:
[0087] If the minimum area value is not less than the preset single-area area threshold, then calculating the difference data between the folded partitions;
[0088] Determine whether the difference data between the folded partitions is within a preset difference threshold range;
[0089] If the difference data between the folded partitions is not within the preset difference threshold range, it is determined that there is a pad shape defect in the defect image.
[0090] In this embodiment, the morphological feature of the pad is a combined morphology, that is, the pad is not only in a single state, but also connected to other circuits. Therefore, in this case, it is necessary to extract the contour of the pad part and the contour of the circuit part, and first judge the irregular defect of the pad part contour. The specific judgment process is the same as the above judgment process, which will not be repeated here.
[0091] In this embodiment, the contour of the combined pad is split to obtain the contour of the nearly circular / rectangular part and the contour of the line part, and the split parts are judged as irregular defects. The applicability of the recognition of irregular pad defects is improved, and the detection efficiency of irregular pad defects in the defect image is further improved.
[0092] Preferably, it also includes:
[0093] If the difference data between the folded partitions is within a preset difference threshold range, then calculating the line width according to the line portion contour, and determining whether the line width is within a preset line width threshold range;
[0094] If the line width is not within a preset line width threshold range, it is determined that a pad irregularity defect exists in the defect image.
[0095] If the line width is within a preset line width threshold range, it is determined that no pad profile defect exists in the defect image.
[0096] In this embodiment, the line width is calculated according to the outline of the line part, and compared with the preset line width threshold range, so as to realize the efficient identification of pad irregularity defects. When the line width is not within the preset range, it can be timely and accurately determined that there is a pad irregularity defect in the defect image, so that when the morphological characteristics of the pad are in a combined form and there is no irregularity defect in the nearly circular / rectangular morphological part, the line part can be quickly discovered. This helps to improve the recognition mechanism of pad irregularity defects and judge the irregularity defects of the split line part. It improves the applicability and completeness of the recognition of pad irregularity defects, and further improves the detection efficiency of pad irregularity defects in defect images.
[0097] Example 2
[0098] This embodiment provides a defect detection device suitable for pad irregularities, and is described by applying the defect detection method suitable for pad irregularities provided in the above-mentioned embodiment 1. Figure 2 As shown, a defect detection device suitable for pad irregularities provided in one embodiment of the present application may include the following multiple modules.
[0099] A pad existence module is used to obtain a defect image of a circuit board and determine whether a pad exists in the defect image;
[0100] A pad extraction module is used to extract the contour and morphological features of the pad in the defect image if the pad exists;
[0101] The pad determination module is used to determine that there is a pad irregularity defect in the defect image if the morphological feature of the pad is an irregular shape.
[0102] The defect detection device suitable for pad irregularities provided in the embodiment of the present application can be applied to the defect detection method suitable for pad irregularities provided in the above-mentioned embodiment 1. For relevant details, refer to the above-mentioned method embodiment. The implementation principle and technical effect are similar and will not be repeated here.
[0103] It should be noted that: when the defect detection device for irregular pads provided in the embodiments of the present application performs defect detection for irregular pads, only the division of the above-mentioned functional modules / functional units is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules / functional units as needed, that is, the internal structure of the defect detection device for irregular pads is divided into different functional modules / functional units to complete all or part of the functions described above. In addition, the implementation method of the defect detection method for irregular pads provided in the above-mentioned method embodiment 1 and the implementation method of the defect detection device for irregular pads provided in this embodiment 2 belong to the same concept. The specific implementation process of the defect detection device for irregular pads provided in this embodiment 2 is detailed in the above-mentioned method embodiment 1, which will not be repeated here.
[0104] Example 3
[0105] See also Figure 3 As shown, one embodiment of the present application also provides a computer device, which can be a computer device such as a desktop computer, a laptop computer, a handheld computer, and a cloud server. The computer device can include, but is not limited to, a processor and a memory. The processor and the memory are connected via a bus or other means.
[0106] The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, graphics processing units (GPU), embedded neural network processors (NPU) or other dedicated deep learning coprocessors, discrete gate or transistor logic devices, discrete hardware components and other chips, or a combination of the above chips.
[0107] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs, non-transitory computer executable programs and modules, such as program instructions / modules corresponding to the methods in the above-mentioned embodiments of the present application. The processor executes various functional applications and data processing of the processor by running the non-transitory software programs, instructions and modules stored in the memory, that is, implementing the methods in the above-mentioned method embodiments.
[0108] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0109] One embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program. When the computer program is executed by a processor, the method in the above method embodiment is implemented.
[0110] Those skilled in the art can understand that the implementation of all or part of the processes in the above-mentioned implementation methods of the present application can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the implementation methods of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0111] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0112] Although the embodiments of the present application are described in conjunction with the accompanying drawings, they cannot be understood as limiting the scope of the patent application. It should be pointed out that for ordinary technicians in this field, other different forms of changes or modifications can be made on the basis of the above description without departing from the concept of the present application. It is not necessary and impossible to list all the embodiments here. The obvious changes or modifications derived from this are still within the scope of protection created by the present application. Therefore, the scope of protection of the patent application shall be based on the attached claims.
Claims
1. A defect detection method suitable for pad profiles, characterized in that: The method comprises: Obtain a defect image of the circuit board and determine whether there is a pad in the defect image; If there is a pad, extract the outline and morphological features of the pad in the defect image; If the morphological feature of the pad is an irregular shape, it is determined that there is an irregular pad defect in the defect image.
2. The defect detection method suitable for pad profile according to claim 1, characterized in that: Also includes: If the morphological feature of the pad is a nearly circular shape or a nearly rectangular shape, the outline of the pad is folded based on the morphological feature of the pad; Calculate the contour area of each folded partition and determine the minimum area value; It is determined whether the minimum area value is less than a preset single-area area threshold value. If the minimum area value is less than the preset single-area area threshold value, it is determined that there is a pad irregularity defect in the defect image.
3. The defect detection method suitable for pad profile according to claim 2, characterized in that: Also includes: If the minimum area value is not less than the preset single-area area threshold, then calculating the difference data between the folded partitions; Determine whether the difference data between the folded partitions is within a preset difference threshold range; If the difference data between the folded partitions is not within the preset difference threshold range, it is determined that there is a pad shape defect in the defect image; If the difference data between the folded partitions is within a preset difference threshold range, it is determined that there is no pad shape defect in the defect image.
4. The defect detection method suitable for pad profile according to claim 1, characterized in that: Also includes: If the morphological feature of the pad is a combined morphology, the outline of the pad is split to obtain a nearly circular / rectangular morphological part outline and a line part outline; Folding the outline of the nearly circular / rectangular portion based on the morphological features of the outline of the nearly circular / rectangular portion; Calculate the contour area of each folded partition and determine the minimum area value; It is determined whether the minimum area value is less than a preset single-area area threshold value. If the minimum area value is less than the preset single-area area threshold value, it is determined that there is a pad irregularity defect in the defect image.
5. The defect detection method suitable for pad profile according to claim 4, characterized in that: Also includes: If the minimum area value is not less than the preset single-area area threshold, then calculating the difference data between the folded partitions; Determine whether the difference data between the folded partitions is within a preset difference threshold range; If the difference data between the folded partitions is not within the preset difference threshold range, it is determined that there is a pad shape defect in the defect image.
6. The defect detection method suitable for pad profile according to claim 5, characterized in that: Also includes: If the difference data between the folded partitions is within a preset difference threshold range, then calculating the line width according to the line portion contour, and determining whether the line width is within a preset line width threshold range; If the line width is not within a preset line width threshold range, it is determined that a pad irregularity defect exists in the defect image.
7. The defect detection method suitable for pad profile according to claim 6, characterized in that: Also includes: If the line width is within a preset line width threshold range, it is determined that no pad profile defect exists in the defect image.
8. A defect detection device suitable for pad profiles, characterized in that: The device comprises: A pad existence module is used to obtain a defect image of a circuit board and determine whether a pad exists in the defect image; A pad extraction module is used to extract the outline and morphological features of the pad in the defect image if the pad exists; The pad determination module is used to determine that there is a pad irregularity defect in the defect image if the morphological feature of the pad is an irregular shape.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor implements the defect detection method suitable for pad irregularities as described in any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the defect detection method suitable for pad irregularities according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Circuit board automatic scoring method and device, electronic equipment and storage medium
CN120746994A