A method for detecting bridging defects of solder joints on PCB

By considering the gray value and edge features in the local area of ​​the PCB board image, a segmentation parameter image is generated, and the Otsu threshold method and neural network are used to detect solder joint bridging defects, which solves the problem of inaccurate segmentation in traditional methods and improves detection accuracy. sex.

CN118154592BActive Publication Date: 2024-09-27NANJING RGB INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410569020.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-09
Publication Date
2024-09-27
Estimated Expiration
2044-05-09

Smart Images

  • Figure CN118154592B
    Figure CN118154592B
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and in particular to a method for detecting solder joint bridging defects on a PCB board. The method comprises: obtaining the confidence that the local area of ​​the target pixel point is a welding area according to the grayscale values ​​of all pixels in the local area of ​​the target pixel point and the grayscale distribution differences of corresponding pixels in different directions in the local area of ​​the target pixel point; obtaining the shape regularity of the local area of ​​the target pixel point according to the regularity characteristics of the local edge of the local area of ​​the target pixel point; obtaining the final confidence that the local area of ​​the target pixel point is a welding area according to the confidence that the local area of ​​the target pixel point is a welding area and the shape regularity of the local area of ​​the target pixel point; performing image segmentation according to a segmentation parameter image, obtaining a welding area, and then detecting solder joint bridging defects. Segmentation according to the segmentation parameter image makes the segmented area more accurate, thereby making the defect detection result more accurate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to a method for detecting bridging defects of solder joints on a PCB. Background Art

[0002] PCB board defect detection is an important part of the electronics manufacturing industry. It is used to detect and locate defects on PCB boards. Solder joint bridging defects can cause circuit short circuits, signal interference, and even equipment failures. Therefore, in order to ensure the manufacturing quality of PCB boards, it is very important to detect and eliminate solder joint bridging defects. The traditional PCB board defect detection method based on manual visual inspection relies on the experience of personnel, has a slow detection speed and is easily affected by subjective factors; while the use of mathematical methods and image processing algorithms to segment PCB board images and various defect detection results will be more efficient, such as the Otsu threshold segmentation method. However, the traditional Otsu threshold segmentation method only relies on the single characteristic of grayscale value when processing, and the grayscale distribution of PCB board images has complex diversity due to the presence of solder joints on the PCB board. Therefore, it may be inaccurate to directly segment PCB board images using the traditional Otsu threshold segmentation method. Summary of the invention

[0003] The present invention provides a PCB solder joint bridging defect detection method to solve the problem that the existing traditional Otsu threshold method only relies on the single characteristic of grayscale value when segmenting the PCB board image, which may lead to inaccurate segmentation results.

[0004] A PCB solder joint bridging defect detection method of the present invention adopts the following technical solution:

[0005] An embodiment of the present invention provides a method for detecting bridging defects of solder joints on a PCB, the method comprising the following steps:

[0006] Get the grayscale image of the PCB board;

[0007] Take any pixel in the grayscale image as the target pixel;

[0008] The confidence that the local area of ​​the target pixel point is the welding area is obtained according to the grayscale values ​​of all pixels in the local area of ​​the target pixel point and the grayscale distribution difference of corresponding pixels in different directions in the local area of ​​the target pixel point;

[0009] In the local area of ​​the target pixel, the regularity feature of the local edge in the local area of ​​the target pixel is obtained according to the chain code difference of the adjacent edge pixels on the local edge; the shape regularity of the local area of ​​the target pixel is obtained according to the chain code feature value of all edge pixels in the local area of ​​the target pixel and the maximum and minimum values ​​of the regularity feature of the local edge;

[0010] According to the confidence that the local area of ​​the target pixel point is the welding area and the shape regularity of the local area of ​​the target pixel point, a final confidence that the local area of ​​the target pixel point is the welding area is obtained;

[0011] According to the final confidence that the local area of ​​the target pixel point is the welding area and the gray value of the target pixel point, the segmentation parameter of the target pixel point is obtained;

[0012] The segmentation parameters of all pixels constitute a segmentation parameter image; image segmentation is performed according to the segmentation parameter image to obtain the welding area; and solder joint bridging defects are detected according to the welding area.

[0013] Preferably, the confidence that the local area of ​​the target pixel point is the welding area is obtained according to the grayscale values ​​of all pixels in the local area of ​​the target pixel point and the grayscale distribution difference of corresponding pixels in different directions in the local area of ​​the target pixel point, including the specific formula as follows:

[0014]

[0015] In the formula, Indicates the confidence that the local area of ​​the i-th target pixel is the welding area; represents the gray value of the i-th target pixel; M represents the number of all pixels in the local area of ​​the i-th target pixel; represents the gray value of the mth pixel in the local area of ​​the i-th target pixel; N represents the number of direction combinations formed by any two directions in the eight neighborhood directions in the local area of ​​the i-th target pixel; Represents the difference between the grayscale mean values ​​of pixels in two directions in the nth neighborhood direction combination in the local area of ​​the i-th target pixel; Represents the difference in standard deviation of the grayscale values ​​of pixels in two directions in the nth neighborhood direction combination in the local area of ​​the i-th target pixel; represents the linear normalization function.

[0016] Preferably, the shape regularity of the local area of ​​the target pixel point is obtained according to the continuous code feature values ​​of all edge pixels in the local area of ​​the target pixel point and the maximum and minimum values ​​of the regularity features of the local edge, and the specific formula included is as follows:

[0017]

[0018] In the formula, represents the shape regularity of the local area of ​​the i-th target pixel; L represents the number of edge pixels in the local area of ​​the i-th target pixel; K represents that the edge of the local area of ​​the i-th target pixel is divided into K local edges of equal length; represents an exponential function with a natural constant as base; represents the local area of ​​the i-th target pixel. The continuous code feature value of edge pixels; express Integer in the interval; express Integer in the interval; Indicates the variance; Represents the regular features of the kth local edge of the local area of ​​the i-th target pixel; Represents the maximum value of the regularized feature of the kth local edge of the local area of ​​the i-th target pixel; Represents the minimum value of the regularized feature of the kth local edge of the local area of ​​the i-th target pixel.

[0019] Preferably, the regularity feature of the local edge is specifically calculated by the following formula:

[0020]

[0021] In the formula, Represents the regular features of the kth local edge of the local area of ​​the i-th target pixel; Represents the chain code value of the jth pixel and its adjacent pixels of the kth local edge of the local area of ​​the i-th target pixel; Represents the chain code value of the j+1th pixel point and its adjacent pixels in the kth local edge segment of the local area of ​​the i-th target pixel point; J represents the number of pixels in the kth local edge segment of the edge of the local area of ​​the i-th target pixel point.

[0022] Preferably, the continuous code feature value of all edge pixels in the local area of ​​the target pixel includes the following specific formula:

[0023]

[0024] In the formula, represents the local area of ​​the i-th target pixel. The chain code value of an edge pixel and its adjacent edge pixels; The local area of ​​the i-th target pixel The continuous code feature value of edge pixels; Represents the minimum function.

[0025] Preferably, the final confidence of the welding area is positively correlated with the confidence; the final confidence of the welding area is negatively correlated with the shape regularity of the local area.

[0026] Preferably, the segmentation parameters of the target pixel are obtained according to the final confidence that the local area of ​​the target pixel is the welding area and the gray value of the target pixel, and the specific formula included is as follows:

[0027]

[0028] In the formula, Represents the segmentation parameter of the i-th target pixel; Indicates the final confidence that the local area of ​​the i-th target pixel is the welding area; Represents the gray value of the i-th target pixel; represents the linear normalization function.

[0029] Preferably, the segmentation parameters of all pixels constitute a segmentation parameter image, which includes the following specific steps:

[0030] The grayscale value of each pixel on the grayscale image is replaced by the segmentation parameter of the pixel to obtain a segmentation parameter image.

[0031] Preferably, the image segmentation is performed according to the segmentation parameter image to obtain the welding area, and the specific steps include the following:

[0032] The segmentation parameter image is segmented using the Otsu threshold method to obtain several welding areas.

[0033] Preferably, the detecting of solder joint bridging defects according to the welding area comprises the following specific steps:

[0034] The welding area is input into the neural network to determine whether there is a bridging defect in the inspection solder joints in the welding area.

[0035] The beneficial effects of the technical solution of the present invention are: according to the characteristics of uneven grayscale distribution and low edge regularity of the welding area, the final confidence that the local area of ​​the pixel point is the welding area is determined; combined with the characteristics of the welding area, the area where the defect of the solder joint bridge of the PCB board is located can be segmented more accurately; further, according to the final confidence that the local area of ​​the pixel point is the welding area and the grayscale value of the pixel point, the segmentation parameter of the pixel point is obtained, and the segmentation parameter avoids the traditional Otsu threshold segmentation method that only uses the single characteristic of the grayscale value during processing, so that the segmentation area is more accurate, and thus the final defect detection effect is more accurate. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0037] Figure 1 A flow chart of the steps of a method for detecting bridging defects of solder joints on a PCB board according to the present invention;

[0038] Figure 2 This is the pin diagram of the MIP package;

[0039] Figure 3 This is the improved MIP package pin diagram. DETAILED DESCRIPTION

[0040] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a PCB board solder joint bridging defect detection method proposed by the present invention, its specific implementation method, structure, features and effects, in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meanings as those generally understood by those skilled in the art to which the present invention belongs. A specific scheme of a PCB solder joint bridging defect detection method provided by the present invention is described in detail below with reference to the accompanying drawings.

[0042] See also Figure 1 , which shows a step flow chart of a method for detecting solder joint bridging defects on a PCB provided by an embodiment of the present invention.

[0043] In this embodiment, the PCB board contains a variety of components, among which the LED display module is a commonly used component. Some LED display technologies using MIP packaging pre-package R, G, and B LEDs into a module, and mount several such modules on the display panel in an array or regular arrangement. Instead of mounting the LED on the panel, the LED is packaged on the MIP, and then the MIP is mounted on the panel. Figure 2 This technology reduces the difficulty of mounting on the panel, but does not achieve the effect of 1+1>2, that is, it fails to reduce costs.

[0044] Based on this, by adding a bridge circuit in the MIP, such as Figure 3As shown, the bridging part of one layer of the two-layer circuit in the panel to the other layer is transferred to the MIP (as shown in Figure 3 As shown in 104 in FIG. 1 , the rest of the panel is merged into another layer of the panel. Thus, the panel circuit is simplified to one layer, but when soldering to the PCB board, there may still be solder joint bridge defects, which may cause the entire LED display module to fail to work properly.

[0045] Figure 2 , Figure 3 101 represents the MIP, 102 represents the LED, 103 represents the MIP pin, and 104 represents the MIP bridge pin.

[0046] Based on this, a PCB board solder joint bridging defect detection method of this embodiment is used to detect solder joint bridging defects on a PCB board, and the method comprises the following steps:

[0047] Step S001: Capture a PCB board image to obtain a grayscale image.

[0048] An industrial camera is used to shoot directly above a newly produced PCB board, collect the image of the PCB board and convert it into grayscale to obtain a grayscale image.

[0049] Step S002: obtaining the confidence that the local area of ​​the target pixel is a welding area according to the grayscale values ​​of all pixels in the local area of ​​the target pixel and the grayscale distribution difference of corresponding pixels in different directions in the local area of ​​the target pixel.

[0050] It should be noted that the welding area is uneven and its grayscale distribution is uneven; at the same time, the welding area is manually processed, and its edge regularity is much smaller than other components in the PCB board; the characteristics of the welding area at these two different angles are analyzed to obtain the final confidence that the local area of ​​the pixel point is the welding area. Since the segmentation result of the Otsu threshold method using only the grayscale value feature is not very accurate, the segmentation parameters of a pixel point are determined in combination with the final confidence that the local area of ​​each pixel point is the welding area, and then the Otsu threshold method segmentation is performed to make the welding area in the segmented grayscale image more accurate.

[0051] Take any pixel in the grayscale image as the target pixel.

[0052] According to the characteristics of uneven grayscale distribution in the welding area, the uneven grayscale distribution of the local area of ​​the target pixel in the grayscale image is analyzed to obtain the confidence that the local area of ​​the target pixel is the welding area. Each target pixel is set as the center of the local area, and its local area is a 13*13 area.

[0053]

[0054] In the formula, Indicates the confidence that the local area of ​​the i-th target pixel is the welding area; represents the gray value of the i-th target pixel; M represents the number of all pixels in the local area of ​​the i-th target pixel; represents the gray value of the mth pixel in the local area of ​​the i-th target pixel; N represents the number of direction combinations formed by any two directions in the eight neighborhood directions in the local area of ​​the i-th target pixel; Represents the difference between the grayscale mean values ​​of pixels in two directions in the nth neighborhood direction combination in the local area of ​​the i-th target pixel; Represents the difference in standard deviation of the grayscale values ​​of pixels in two directions in the nth neighborhood direction combination in the local area of ​​the i-th target pixel; represents the linear normalization function.

[0055] It should be noted that The analysis is conducted from the overall perspective, through the grayscale value of the i-th target pixel and the degree of grayscale unevenness in the local area of ​​the i-th target pixel. Because the uneven grayscale distribution characteristics of the welding area are in a relatively intermediate state in the overall grayscale performance of the grayscale image, its grayscale distribution is neither obviously consistent nor obviously different. The grayscale difference between the i-th target pixel and the rest of the pixels in the local area of ​​the i-th target pixel is accumulated and normalized. When its value is closer to 1 / 2, the local area of ​​the i-th target pixel is more likely to be a welding area. At the same time, because it is based on the i-th target pixel analysis, the larger the grayscale value of the i-th target pixel (the brighter the welding area), The smaller it is (the closer it is to the middle value), the greater the confidence that the local area of ​​the i-th target pixel is the welding area; The reason for adding 1 to the denominator is to avoid the denominator being 0.

[0056] It means that the analysis is conducted locally, because even if the overall grayscale distribution in the welding area is uneven, there are local areas with different grayscale similarities inside it. This means that even if there are differences in the grayscale similarity of different local areas in the welding area, the grayscale similarity of each local area is relatively consistent. Represents the gray value similarity difference of any two directions in the eight neighborhood directions; To represent the difference in grayscale consistency between any two combinations of directions in the eight neighborhood directions; The bigger, The smaller it is, the higher the confidence that the local area of ​​the corresponding i-th target pixel point is the welding area.

[0057] Step S003: According to the number of edge pixels in the local area of ​​the target pixel, the chain code values ​​of the pixels of each edge segment and the adjacent pixels in the local area of ​​the target pixel, and the number of pixels in each local edge segment of the edge of the local area of ​​the target pixel; obtain the shape regularity of the local area of ​​the target pixel.

[0058] It should be noted that starting from the shape characteristics of the welding area, since the direct use of the Otsu threshold segmentation method on the grayscale image will segment the PCB board components in the non-welding area, and the welding area is usually operated manually, the shape of the welding area is irregular compared to other components of the PCB board, and there is a certain degree of disorder. Therefore, the local area of ​​each pixel point can be segmented by the Otsu threshold first, and then the shape regularity analysis can be performed on the segmented area to be analyzed; the edge points of the area to be analyzed for each pixel point are chained to analyze the shape regularity of the local area of ​​the pixel point; the more regular the shape, the more likely it is to be other components of the PCB board, and the more irregular the shape, the more likely it is to be a welding area.

[0059] Get the local area of ​​the i-th target pixel The continuous code feature value of edge pixels , and its calculation formula is as follows:

[0060]

[0061] In the formula, represents the local area of ​​the i-th target pixel. The chain code value of edge pixels and their adjacent edge pixels (clockwise), where the edge pixels in the local area are obtained by the Canny edge detection algorithm; The local area of ​​the i-th target pixel The continuous code feature value of edge pixels; Represents the minimum function.

[0062] It should be noted that is to filter the minimum value of the two, because the differences between the chain code values ​​corresponding to the chain code are not consistent (for example, the lower right direction and the right direction are 7 and 0 respectively, and the actual difference between the two is an interval, but according to the definition of the chain code value, the chain code difference is 7). Therefore, in order to deal with the differences brought about by this situation, the minimum value is filtered to achieve a more accurate adjacent interval chain code difference. In addition, when the When the first edge pixel does not have an adjacent next edge pixel, the chain code value cannot be calculated. In this case, the first edge pixel is interpolated by linear interpolation. The chain code values ​​of the edge pixels are interpolated.

[0063] Each edge of the local area of ​​the i-th target pixel is equally divided into K segments. This embodiment is described by taking K=10 as an example. Other embodiments may be set to other values, which are not specifically limited in this embodiment.

[0064] Regularization features of the kth local edge of the local area of ​​the i-th target pixel The calculation method is as follows:

[0065]

[0066] In the formula, Represents the regular features of the kth local edge of the local area of ​​the i-th target pixel; Represents the chain code value of the jth pixel point and its (clockwise) adjacent pixels of the kth local edge of the local area of ​​the i-th target pixel point; Represents the chain code value of the j+1th pixel point of the kth local edge of the local area of ​​the i-th target pixel point and its (clockwise) adjacent pixel points. J represents the number of pixels in the kth local edge of the edge of the local area of ​​the i-th target pixel point.

[0067] The calculation formula for the shape regularity of the local area of ​​the i-th target pixel is as follows:

[0068]

[0069] In the formula, represents the shape regularity of the local area of ​​the i-th target pixel; L represents the number of edge pixels in the local area of ​​the i-th target pixel; represents an exponential function with a natural constant as the base; K represents that the edge of the local area of ​​the i-th target pixel is divided into K local edges of equal length; represents the local area of ​​the i-th target pixel The continuous code feature value of edge pixels; express An integer in the interval. express Integer in the interval; It means to find the variance, that is, to find the variance of the continuous code feature values ​​of all edge pixels in the local area of ​​the i-th target pixel. Represents the regular features of the kth local edge of the local area of ​​the i-th target pixel; Represents the maximum value of the regularized feature of the kth local edge of the local area of ​​the i-th target pixel; Represents the minimum value of the regularized feature of the kth local edge of the local area of ​​the i-th target pixel.

[0070] It should be noted that the standard deviation of the chain code value reflects the shape regularity of the current local area as a whole. The more regular the shape, the smaller the standard deviation of the chain code value; conversely, the corresponding standard deviation is larger. Indicates the overall analysis of the shape regularity of the local area of ​​the i-th target pixel; Represents the maximum value of the regularized feature of the kth local edge of the local area of ​​the i-th target pixel; Represents the minimum value of the regularized feature of the kth local edge of the local area of ​​the i-th target pixel; It represents the shape regularity of the local area of ​​the i-th target pixel analyzed locally. By comparing the maximum and minimum values ​​of the local edge regularity feature, the smaller the ratio between the two (or the closer to 1), the greater the local edge regularity feature analyzed locally (comparing the maximum and minimum, when the ratio of the two is smaller, the more similar the regularity features of other local edges are); conversely, the larger the ratio between the two, the smaller the local edge regularity feature analyzed locally, and the greater the shape regularity of the local area of ​​the corresponding pixel.

[0071] At this point, the shape regularity of the local area of ​​each target pixel is obtained.

[0072] Step S004: obtaining a final confidence level that the local area of ​​the target pixel point is the welding area according to the confidence level that the local area of ​​the target pixel point is the welding area and the shape regularity of the local area of ​​the target pixel point.

[0073] As an example, the final confidence is calculated as follows:

[0074]

[0075] In the formula, Indicates the final confidence that the local area of ​​the i-th target pixel is the welding area; Indicates the confidence that the local area of ​​the i-th target pixel is the welding area; Indicates the shape regularity of the local area of ​​the i-th target pixel.

[0076] It should be noted that since the welding area is processed manually, its shape regularity is much smaller than the regularity of other components in the PCB board. The bigger, The smaller it is, the greater the final confidence that the local area of ​​the i-th target pixel is the welding area.

[0077] At this point, the final confidence that the local area of ​​each target pixel is the welding area is obtained.

[0078] Step S005: According to the final confidence that the local area of ​​the target pixel is the welding area and the gray value of the target pixel, the segmentation parameters of the target pixel are obtained; and then the welding area in the gray image is obtained by segmentation through the Otsu threshold method.

[0079]

[0080] In the formula, Represents the segmentation parameter of the i-th target pixel; Indicates the final confidence that the local area of ​​the i-th target pixel is the welding area; Represents the gray value of the i-th target pixel; represents the linear normalization function.

[0081] It should be noted that through and Determine the degree of normalization of the whole as a percentage of the sum of the two and The parameter weight, the larger the proportion, the greater the weight, in order to determine the segmentation parameters of the target pixel.

[0082] At this point, the segmentation parameter of each pixel is obtained, and the gray value of each pixel on the gray image is replaced by the segmentation parameter of the pixel to obtain a segmentation parameter image.

[0083] The segmentation parameter image is segmented using the Otsu threshold method to obtain several connected domains. The segmentation parameters of the pixels in these connected domains are large, indicating the welding area in the grayscale image.

[0084] At this point, the welding area in the grayscale image is obtained.

[0085] Step S006: obtaining solder joint bridging defects existing on the PCB board according to the soldering area in the grayscale image.

[0086] The welding area is input into the CNN neural network for defect recognition to determine whether there is a bridging defect in the detection solder joints of the welding area; if there is no bridging defect in all welding areas of the grayscale image of the PCB board, the PCB board is qualified for detection; if there is a bridging defect in any welding area in the grayscale image of the PCB board, it means that there is a circuit connection between the solder joints of the PCB board that should not exist, and the PCB board fails the detection.

[0087] The CNN neural network used in this embodiment is ResNet50. Other embodiments may be set to other values, which are not specifically limited in this embodiment.

[0088] The training method of the CNN neural network is as follows: a large number of grayscale images of PCB boards are collected, and the welding areas of the grayscale images are obtained by using the method of the embodiment. These welding areas constitute a data set, and each welding area in the data set is manually labeled with categories, which are the two categories of the presence of solder joint bridging defects and the absence of solder joint bridging defects. The CNN neural network is trained using the labeled data set, and the loss function used in the training is the cross entropy loss function. The specific training process is a well-known technology, and the specific implementation process is not repeated in this embodiment.

[0089] At this point, this embodiment is completed.

[0090] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for detecting bridging defects of solder joints on a PCB, characterized in that: The method comprises the following steps: Get the grayscale image of the PCB board; Take any pixel in the grayscale image as the target pixel; The confidence that the local area of ​​the target pixel point is the welding area is obtained according to the grayscale values ​​of all pixels in the local area of ​​the target pixel point and the grayscale distribution difference of corresponding pixels in different directions in the local area of ​​the target pixel point; In the local area of ​​the target pixel, the regularity feature of the local edge in the local area of ​​the target pixel is obtained according to the chain code difference of the adjacent edge pixels on the local edge; the shape regularity of the local area of ​​the target pixel is obtained according to the chain code feature value of all edge pixels in the local area of ​​the target pixel and the maximum and minimum values ​​of the regularity feature of the local edge; According to the confidence that the local area of ​​the target pixel point is the welding area and the shape regularity of the local area of ​​the target pixel point, a final confidence that the local area of ​​the target pixel point is the welding area is obtained; According to the final confidence that the local area of ​​the target pixel point is the welding area and the gray value of the target pixel point, the segmentation parameter of the target pixel point is obtained; The segmentation parameters of all pixels constitute a segmentation parameter image; image segmentation is performed based on the segmentation parameter image to obtain the welding area; and solder joint bridging defects are detected based on the welding area; The confidence degree of the local area of ​​the target pixel point being the welding area is obtained according to the grayscale values ​​of all pixels in the local area of ​​the target pixel point and the grayscale distribution difference of corresponding pixels in different directions in the local area of ​​the target pixel point, and the specific formula included is as follows: In the formula, Indicates the confidence that the local area of ​​the i-th target pixel is the welding area; represents the gray value of the i-th target pixel; M represents the number of all pixels in the local area of ​​the i-th target pixel; represents the gray value of the mth pixel in the local area of ​​the i-th target pixel; N represents the number of direction combinations formed by any two directions in the eight neighborhood directions in the local area of ​​the i-th target pixel; Represents the difference between the grayscale mean values ​​of pixels in two directions in the nth neighborhood direction combination in the local area of ​​the i-th target pixel; Represents the difference in standard deviation of the grayscale values ​​of pixels in two directions in the nth neighborhood direction combination in the local area of ​​the i-th target pixel; represents the linear normalization function; The shape regularity of the local area of ​​the target pixel point is obtained according to the continuous code feature values ​​of all edge pixels in the local area of ​​the target pixel point and the maximum and minimum values ​​of the regularity features of the local edge, including the specific formula as follows: In the formula, represents the shape regularity of the local area of ​​the i-th target pixel; L represents the number of edge pixels in the local area of ​​the i-th target pixel; K represents that the edge of the local area of ​​the i-th target pixel is divided into K local edge segments; represents an exponential function with a natural constant as base; represents the local area of ​​the i-th target pixel The continuous code feature value of edge pixels; express Integer in the interval; express Integer in the interval; Indicates the variance; Represents the regular features of the kth local edge of the local area of ​​the i-th target pixel; Represents the maximum value of the regularized feature of the kth local edge of the local area of ​​the i-th target pixel; Represents the minimum value of the regularized feature of the kth local edge of the local area of ​​the i-th target pixel; The final confidence of the welding area is positively correlated with the confidence; the final confidence of the welding area is negatively correlated with the shape regularity of the local area; The segmentation parameters of the target pixel are obtained according to the final confidence that the local area of ​​the target pixel is the welding area and the gray value of the target pixel, and the specific formula included is as follows: In the formula, Represents the segmentation parameter of the i-th target pixel; Indicates the final confidence that the local area of ​​the i-th target pixel is the welding area; Represents the gray value of the i-th target pixel; represents the linear normalization function.

2. A PCB board solder joint bridging defect detection method according to claim 1, characterized in that: The specific calculation formula of the regular features of the local edge is as follows: In the formula, Represents the regular features of the kth local edge of the local area of ​​the i-th target pixel; Represents the chain code value of the jth pixel and its adjacent pixels of the kth local edge of the local area of ​​the i-th target pixel; Represents the chain code value of the j+1th pixel point and its adjacent pixels in the kth local edge segment of the local area of ​​the i-th target pixel point; J represents the number of pixels in the kth local edge segment of the edge of the local area of ​​the i-th target pixel point.

3. A PCB solder joint bridging defect detection method according to claim 1, characterized in that: The specific formula of the continuous code feature value of all edge pixels in the local area of ​​the target pixel is as follows: In the formula, represents the local area of ​​the i-th target pixel The chain code value of an edge pixel and its adjacent edge pixels; The local area of ​​the i-th target pixel The continuous code feature value of edge pixels; Represents the minimum function.

4. A PCB solder joint bridging defect detection method according to claim 1, characterized in that: The segmentation parameters of all pixels constitute a segmentation parameter image, which includes the following specific steps: The grayscale value of each pixel on the grayscale image is replaced by the segmentation parameter of the pixel to obtain a segmentation parameter image.

5. A PCB solder joint bridging defect detection method according to claim 1, characterized in that: The specific steps of performing image segmentation according to the segmentation parameter image to obtain the welding area are as follows: The segmentation parameter image is segmented using the Otsu threshold method to obtain several welding areas.

6. A PCB board solder joint bridging defect detection method according to claim 1, characterized in that: The specific steps of detecting solder joint bridging defects according to the welding area are as follows: The welding area is input into the neural network to determine whether there is a bridging defect in the inspection solder joints in the welding area.