PCB solder joint defect detection system and method based on image recognition
The PCB solder joint defect detection system based on image recognition enables multimodal feature extraction and parameter calibration, solving the problems of low detection efficiency and unstable accuracy in existing technologies. It generates efficient and accurate defect detection reports, improving production efficiency and product quality.
Patent Information
- Application Number
- CN202510850386.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2045-06-24
AI Technical Summary
Existing PCB solder joint defect detection technologies suffer from low detection efficiency, unstable accuracy, susceptibility to environmental influences, inaccurate detection results, and a lack of intelligent report generation, making it difficult to meet the demands for high precision and high efficiency in production.
A PCB solder joint defect detection system based on image recognition is adopted, including an image preprocessing module, a feature fusion module, a defect discrimination module, and a parameter calibration module. Through multimodal feature extraction and feature fusion, combined with defect type mapping index and parameter calibration, a structured defect detection report is generated.
It improves the efficiency and accuracy of weld joint defect detection, enhances the stability and adaptability of the detection system, provides a scientific basis for defect repair, and improves production efficiency and product quality.
Smart Images

Figure CN120689335B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of PCB solder joint defect detection, in particular to a PCB solder joint defect detection system and method based on image recognition. BACKGROUND
[0002] In the rapid development of electronic information technology, PCB (Printed Circuit Board) as the core component of electronic equipment, its quality is directly related to the performance and reliability of the entire electronic equipment. And solder joint as the key node connecting components and circuit board on the PCB, its quality is also crucial. Once the solder joint defects such as virtual welding, insufficient soldering, excessive soldering, bridging, etc., not only will lead to poor circuit conduction, abnormal signal transmission, and even cause major safety accidents.
[0003] With the miniaturization and integration of electronic components, the number of solder joints on the PCB is increasing, and the size is becoming smaller, which puts higher requirements on solder joint defect detection. Traditional manual visual detection method not only has low efficiency, but also is difficult to meet the demand of large-scale production, and is greatly affected by subjective factors of the detector, with unstable detection accuracy and prone to missed detection and false detection.
[0004] Although some existing automatic detection technologies such as X-ray detection and ultrasonic detection have improved the detection efficiency and accuracy to some extent, these technologies often have problems such as high equipment cost, slow detection speed, and poor detection effect on some defect types. For example, X-ray detection equipment is expensive, and the detection effect for some surface defects is not ideal; ultrasonic detection has high requirements for the detection environment and is relatively complex to operate.
[0005] The application of image recognition technology in industrial detection provides a new idea for PCB solder joint defect detection. However, the existing PCB solder joint defect detection technology based on image recognition still has many shortcomings. On the one hand, in the image preprocessing stage, it is difficult to accurately divide the region of interest for detection, which is easily disturbed by background noise and other components, leading to inaccurate feature extraction; on the other hand, in the feature extraction process, only single feature type such as geometric feature or gray scale feature is considered, which cannot fully reflect the true state of the solder joint, resulting in low accuracy and reliability of the defect discrimination result.
[0006] The existing detection system lacks effective parameter calibration mechanism, and when the detection environment or process parameters change, the stability of the detection result is difficult to guarantee. At the same time, the generation of detection report is not intelligent enough, which cannot reasonably sort and analyze the defects according to their severity, and is not conducive to subsequent defect repair and quality improvement.
[0007] Therefore, how to improve the efficiency, precision and stability of the PCB solder joint defect detection, and realize the rapid and accurate identification and classification of the solder joint defects, becomes a problem to be solved in the current PCB production and manufacturing field. The present application aims to provide a PCB solder joint defect detection system and method based on image recognition to solve the above problems existing in the prior art. SUMMARY
[0008] The present application aims to provide a PCB solder joint defect detection system and method based on image recognition to solve the problems raised in the background art.
[0009] To achieve the above-mentioned purpose, the present application provides the following technical scheme: a PCB solder joint defect detection system based on image recognition, the system comprising:
[0010] An image preprocessing module is configured to acquire an original image stream of a PCB solder joint to be detected, and divide a region of interest for detection of the solder joint to be detected according to process parameters of the PCB.
[0011] A feature fusion module is configured to perform multi-modal feature extraction on the original image stream, acquire geometric features, gray scale distribution features and texture gradient features of the solder joint to be detected, and form a solder joint feature fusion set.
[0012] A defect discrimination module is configured to acquire a discrimination benchmark of the solder joint feature fusion set, establish a mapping index of the feature fusion set and defect types, calculate a matching coefficient of the solder joint feature fusion set and a standard sample, and obtain a defect type discrimination result.
[0013] A parameter calibration module is configured to perform consistency verification on detection parameters of the solder joint to be detected with reference to the defect type discrimination result, identify abnormal offset in the detection parameters, and adjust the mapping index of the feature fusion set and the defect types based on the abnormal offset.
[0014] A report output module is configured to extract a defect type and a spatial coordinate of the solder joint to be detected according to the adjusted mapping index of the feature fusion set and the defect types, and generate a defect detection report according to a structured template.
[0015] Preferably, the implementation of the image preprocessing module comprises:
[0016] For any solder joint to be detected on a PCB, an industrial line array camera matched with the process parameters is called;
[0017] The original image stream of the solder joint is collected by the industrial line array camera, and a histogram equalization operation is used to enhance the contrast of the image.
[0018] The edge gradient value of the solder joint region in the enhanced image is identified, and the continuous pixel group with a gradient value greater than a threshold value is extracted as the region of interest for detection of the solder joint to be detected.
[0019] Preferably, the implementation of extracting the group of continuous pixels with gradient values greater than the threshold value further comprises:
[0020] Converting the enhanced image into an HSL color space, and calculating the luminance component of each pixel point;
[0021] Extracting the pixel points with luminance components within a preset range as candidate edge points, and connecting adjacent candidate edge points to form a closed region;
[0022] Taking the closed region as a boundary, intercepting the pixel matrix of the corresponding region in the HSL image as a region of interest for detecting the welding point.
[0023] Preferably, the implementation of dividing the region of interest for detecting the welding point further comprises:
[0024] Performing coordinate labeling on the region of interest, analyzing the row coordinates and column coordinates of the region on the PCB, projecting the region of interest according to the row coordinates and column coordinates, and establishing a positioning correlation between the region of interest and the pad position on the PCB.
[0025] Preferably, the implementation of the feature fusion module comprises:
[0026] Calling a geometric morphological algorithm, a gray scale algorithm, and a texture analysis algorithm for the welding point to be detected, generating a plurality of un-fused feature extraction results, the un-fused feature extraction results representing geometric parameters, gray scale parameters, and texture parameters that are not associated with defect types;
[0027] Determining whether the plurality of un-fused feature extraction results is a valid feature subset, and if so, merging the valid feature subset into a welding point feature fusion set.
[0028] Preferably, the implementation of establishing a mapping index between the feature fusion set and the defect type comprises: establishing a mapping index between the feature fusion set and the defect type based on the geometric feature description, the gray scale distribution value, and the texture gradient pattern in the welding point feature fusion set, and the definition parameters of the defect type and the identification code of the defect type.
[0029] Preferably, the implementation of the defect discrimination module comprises:
[0030] Clustering the welding point feature fusion set and the defect type according to defect morphology, defect size, and influence level, and setting the main cluster center after the clustering processing as a feature discrimination reference;
[0031] Extracting core feature parameters of the feature discrimination reference, calculating the parameter similarity between the core feature parameters, and setting a feature sequence related to the parameter similarity between the core feature parameters;
[0032] The defect feature matching coefficients between the defect features are set according to the frequency distribution of the defect features, and a defect type discrimination result is set.
[0033] The defect feature matching coefficients between the defect features are set according to the frequency distribution of the defect features, and a defect type discrimination result is set.
[0034] Preferably, the parameter calibration module is implemented in the following manner:
[0035] The frequency distribution of the defect features is extracted from the defect type discrimination result; and the calibration path of the defect type discrimination result is set according to the detection time period corresponding to the frequency distribution of the defect features.
[0036] The calibration path of each defect feature in the defect type discrimination result is curve-fitted to obtain a fitted calibration path, and the probability value of the fitted path at each detection time period is set as the discrimination confidence of the defect type discrimination result.
[0037] The discrimination confidence of the defect type discrimination result is compared with the standard reference value of the detection parameter, an offset difference value is marked, and the detection parameter is corrected according to the offset difference value, thereby completing calibration of the detection parameter.
[0038] Preferably, the report output module is implemented in the following manner:
[0039] According to the mapping index of the feature fusion set and the defect type, the defect type of the to-be-detected solder joint is extracted, the defect types are prioritized according to the severity level of the defect types, and a defect processing order of the to-be-detected solder joint is obtained; and the defect types, spatial coordinates and defect processing order are integrated in a table form to generate a defect detection report.
[0040] Preferably, the present application further comprises a PCB solder joint defect detection method based on image recognition, which is applied to the PCB solder joint defect detection system based on image recognition described above, and the method comprises the following steps:
[0041] An original image stream of a to-be-detected solder joint of a PCB is acquired, and a region of interest for detection of the to-be-detected solder joint is divided according to the process parameters of the PCB.
[0042] Multi-modal feature extraction is performed on the original image stream to acquire geometric features, gray distribution features and texture gradient features of the to-be-detected solder joint, thereby forming a solder joint feature fusion set.
[0043] A discrimination benchmark of the solder joint feature fusion set is acquired, a mapping index of the feature fusion set and the defect type is established, a matching coefficient of the solder joint feature fusion set and a standard sample is calculated, and a defect type discrimination result is obtained.
[0044] With the defect type discrimination result as a reference, the detection parameters of the to-be-detected welding point are verified for consistency, abnormal offset in the detection parameters is identified, and the mapping index of the feature fusion set and the defect type is adjusted based on the abnormal offset;
[0045] According to the adjusted mapping index, the defect type and the spatial coordinates of the to-be-detected welding point are extracted, and a defect detection report is generated according to the structured template.
[0046] Compared with the prior art, the present application has the following advantages:
[0047] In the image preprocessing link, the original image stream is collected by calling the industrial line array camera matched with the process parameters, the image contrast is enhanced by using histogram equalization, and the HSL color space analysis and edge gradient value extraction are combined to accurately divide the interested detection area of the to-be-detected welding point. This method effectively eliminates the interference of background noise and other components, lays a solid foundation for subsequent feature extraction, and greatly improves the accuracy and reliability of image preprocessing.
[0048] The feature fusion module extracts multi-modal features from the original image stream by calling geometric morphological algorithms, gray level algorithms and texture analysis algorithms, obtains geometric features, gray level distribution features and texture gradient features and forms a fusion set. This multi-feature fusion method can comprehensively and accurately reflect the true state of the welding point, overcome the limitations of single feature extraction in the prior art, make the extracted features more rich and comprehensive, and provide a more sufficient basis for defect discrimination.
[0049] The defect discrimination module performs clustering processing on the welding point feature fusion set and the defect type, sets a feature discrimination reference, calculates the similarity between core feature parameters, extracts defect features and sets the matching value of the longest common feature subsequence as the defect feature matching coefficient, so as to obtain accurate defect type discrimination results. This process fully considers factors such as the morphology, size and influence level of the defect, improves the accuracy and reliability of defect discrimination, and can more accurately identify various types of welding point defects.
[0050] The parameter calibration module verifies the detection parameters for consistency with reference to the defect type discrimination result, identifies abnormal offset and adjusts the mapping index. This mechanism enables the detection system to automatically calibrate the detection parameters according to the actual detection results, adapts to changes in the detection environment and process parameters, improves the stability and adaptability of the detection system, and ensures high detection accuracy under different conditions.
[0051] The report output module extracts the defect type and spatial coordinates according to the adjusted mapping index, prioritizes the defects according to the severity level, and generates a structured defect detection report in the form of a table. This approach not only improves the readability and practicality of the report, but also provides a scientific basis for subsequent defect repair and quality improvement, helping to improve production efficiency and product quality.
[0052] The present application realizes efficient and accurate detection of PCB solder joint defects through the cooperative work of each module, improves the detection efficiency and accuracy, enhances the stability and adaptability of the detection system, provides reliable quality assurance for PCB production and manufacturing, and has significant economic and social benefits. BRIEF DESCRIPTION OF DRAWINGS
[0053] Figure 1 The working principle diagram of the PCB solder joint defect detection system based on image recognition described in the present application;
[0054] Figure 2 The working principle diagram of the image preprocessing module;
[0055] Figure 3 The working principle diagram of the group of continuous pixels with gradient values greater than the threshold value;
[0056] Figure 4 The working principle diagram of the defect discrimination module. DETAILED DESCRIPTION
[0057] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0058] Please refer to Figures 1-4 The present application relates to a PCB solder joint defect detection system based on image recognition, which comprises an image preprocessing module, a feature fusion module, a defect discrimination module, a parameter calibration module and a report output module. The specific implementation is as follows:
[0059] The image preprocessing module is configured to acquire a raw image stream of a to-be-inspected solder joint of a PCB, and divide a region of interest for inspection of the to-be-inspected solder joint according to a process parameter of the PCB. Specifically, for any to-be-inspected solder joint of the PCB, an industrial line array camera matching the process parameter is called, and a raw image stream of the solder joint is acquired by the camera. Then, a histogram equalization operation is performed to enhance the contrast of the image. After that, the edge gradient values of the solder joint region in the enhanced image are identified, and the continuous pixel groups with gradient values greater than a threshold value are extracted as the region of interest for inspection of the to-be-inspected solder joint. Meanwhile, the region of interest for inspection is also marked with coordinates, and the row coordinates and column coordinates of the region of interest for inspection on the PCB are analyzed. The region of interest for inspection is projected in space according to the row coordinates and column coordinates, so as to establish a positioning correlation between the region of interest for inspection and the pad position of the PCB.
[0060] The feature fusion module is configured to perform multi-modal feature extraction on the raw image stream, acquire geometric features, gray distribution features and texture gradient features of the to-be-inspected solder joint, and form a solder joint feature fusion set. The implementation manner is to call geometric shape algorithms, gray level algorithms and texture analysis algorithms of the to-be-inspected solder joint, generate a plurality of un-fused feature extraction results, and determine whether the plurality of un-fused feature extraction results are an effective feature subset. If the plurality of un-fused feature extraction results are an effective feature subset, the effective feature subset is combined into the solder joint feature fusion set.
[0061] The defect discrimination module is configured to acquire a discrimination reference of the solder joint feature fusion set, establish a mapping index between the feature fusion set and a defect type, calculate a matching coefficient between the solder joint feature fusion set and a standard sample, and obtain a defect type discrimination result. Specifically, the solder joint feature fusion set and the defect type are clustered according to defect morphology, defect size and influence level. The main cluster center after the clustering is set as a feature discrimination reference. Core feature parameters of the feature discrimination reference are extracted, and parameter similarities between the core feature parameters are calculated. A feature sequence related to the parameter similarities between the core feature parameters is set. Defect features existing in the feature sequence are extracted using the feature sequence. A longest common feature sub-sequence between the defect features is set. A matching value of the longest common feature sub-sequence is set as a defect feature matching coefficient. Finally, defect type discrimination results are set according to the frequency distribution of the defect features.
[0062] The parameter calibration module is configured to verify the consistency of the detection parameters of the to-be-detected solder joint with reference to the defect type discrimination result, identify abnormal offset in the detection parameters, and adjust the mapping index of the feature fusion set and the defect type based on the abnormal offset. Specifically, the frequency distribution of each defect feature is extracted from the defect type discrimination result, the calibration path of the defect type discrimination result is set according to the detection period corresponding to the frequency distribution of each defect feature, the calibration path of each defect feature in the defect type discrimination result is curve-fitted to obtain a fitted calibration path, the probability value of the fitted path at each detection period is set as the discrimination confidence of the defect type discrimination result, the discrimination confidence is compared with the standard reference value of the detection parameter, the existing offset difference is marked, and the detection parameter is corrected according to the offset difference to complete the calibration of the detection parameter.
[0063] The report output module is configured to extract the defect type and spatial coordinates of the to-be-detected solder joint according to the adjusted mapping index of the feature fusion set and the defect type, and generate a defect detection report according to the structured template. Specifically, the defect type of the to-be-detected solder joint is extracted according to the adjusted mapping index, the defect types are prioritized according to the severity level of the defect types to obtain a defect processing order of the to-be-detected solder joint, and the defect types, spatial coordinates, and defect processing order are integrated in a table form to generate a defect detection report.
[0064] Embodiment 1:
[0065] In the image preprocessing module, for any to-be-detected solder joint on the PCB, a line array camera matched with the process parameters of the PCB is first called. The selection of the line array camera needs to strictly follow the specific process requirements of the PCB. For example, when the solder joint size of the PCB is small and the density is high, a line array camera with high resolution and high frame rate should be selected to ensure that the original image stream of the solder joint can be clearly collected. Different types of line array cameras differ in terms of photosensitive element size, pixel resolution, and scanning frequency. Only when the process parameters are matched can the collected image meet the accuracy requirements of subsequent detection.
[0066] The original image stream is obtained by image acquisition of the welding points through the selected industrial line array camera. Since in the actual production environment, factors such as lighting conditions, relative positions of the camera and the PCB board, etc. may cause the contrast of the original image stream to be low, and the distinction between the welding points and the background is not obvious enough, it is necessary to perform a histogram equalization operation on the original image stream to enhance the image contrast. The principle of histogram equalization is to re-adjust the gray scale distribution of the image, and expand the pixel values originally concentrated in a certain gray scale interval to a wider range, so that the details of the dark areas in the image can be revealed, and the levels of the bright areas are more abundant, thereby improving the contrast between the welding point area and the background, laying a foundation for subsequent edge detection and region extraction.
[0067] After completing the image contrast enhancement, it is necessary to identify the edge gradient values of the welding point region in the enhanced image. The edge gradient value can reflect the degree of change in the pixel gray scale in the image, and the edge of the welding point usually has a large gradient value. In specific implementation, classic gradient operators such as the Sobel operator or the Prewitt operator can be used. Taking the Sobel operator as an example, it performs convolution operations on the horizontal direction and the vertical direction of the image through two 3x3 convolution kernels respectively, to obtain the horizontal gradient and the vertical gradient, and then determines the gradient value of each pixel point by calculating the combined value of the two. After calculating the gradient values of each pixel point, a suitable threshold value is set, and the continuous pixel group with a gradient value greater than the threshold value is extracted. The setting of this threshold value needs to consider factors such as the material of the PCB board, the shape of the welding point, and the production environment, and a reasonable range can usually be determined through analysis of a large number of standard welding point images.
[0068] In order to further improve the accuracy of the extraction of the region of interest, the enhanced image can also be converted to the HSL color space. The HSL color space represents color as three components: hue (H), saturation (S), and lightness (L). Compared with the traditional RGB color space, it is more consistent with the way humans perceive color. In the HSL color space, the lightness component of each pixel point is calculated. Since the welding point usually has a specific lightness feature, the pixel points with a lightness component within a predetermined range can be extracted as candidate edge points. The determination of the predetermined range needs to refer to the lightness distribution characteristics of the standard welding point in the HSL color space, for example, by statistically analyzing the lightness components of multiple standard welding point images, a lightness interval that can contain most of the welding point pixels is determined.
[0069] After extracting the candidate edge points, it is necessary to connect adjacent candidate edge points to form a closed region. In the connection process, the spatial position relationship and the consistency of the gradient direction between the pixel points need to be considered to ensure that the closed region accurately encloses the solder point region. Taking the closed region as the boundary, the pixel matrix of the corresponding region in the HSL image is intercepted, and this pixel matrix is the detection region of interest of the solder point to be detected. By processing in the HSL color space, the color characteristics of the solder point can be better utilized, the accuracy of the extraction of the region of interest can be improved, and the false extraction caused by uneven illumination and other factors can be avoided.
[0070] After obtaining the detection region of interest, it needs to be coordinate labeled. Specifically, the row coordinates and column coordinates of the region on the PCB board are analyzed, which can be realized through the conversion relationship between the coordinate system of the PCB board and the image coordinate system. Usually, when the detection system is installed, the position of the camera and the coordinate system of the PCB board are calibrated to establish the mapping relationship between them. The detection region of interest is projected in space according to the row coordinates and column coordinates, and through the spatial projection, the specific position range of the region on the PCB board can be determined.
[0071] It is very important to establish the positioning correlation between the detection region of interest and the PCB pad position. Through the above coordinate labeling and spatial projection, the detection region of interest in the image can be accurately corresponded to the actual pad position on the PCB board. The establishment of this positioning correlation makes the subsequent detection results of the solder defect correspond to the specific position on the PCB board, which is convenient for accurate positioning and repair of the defective solder point in the production process. For example, when a defect is detected in a detection region of interest, the specific position of the defect on the PCB board can be quickly found through the positioning correlation, improving the production efficiency and the accuracy of quality control.
[0072] In the whole image preprocessing process, each step needs to be strictly operated according to the above process to ensure that the obtained detection region of interest can accurately reflect the actual situation of the solder point. The correct selection of the industrial line array camera ensures the quality of image acquisition, the histogram equalization operation enhances the readability of the image, the identification of the edge gradient value and the extraction of the candidate edge point ensure the accuracy of the region of interest, and the establishment of the coordinate labeling and positioning correlation provides a basis for the subsequent defect detection and positioning. Each link cooperates with each other to form the complete implementation mode of the image preprocessing module, which lays a solid foundation for the subsequent feature fusion, defect discrimination and other operations.
[0073] Embodiment 2:
[0074] The implementation of the feature fusion module needs to be developed from the underlying logic of multi-modal feature extraction. After obtaining the original image stream processed by the image preprocessing module, the system needs to synchronously call the geometric shape algorithm, gray scale homogenization algorithm and texture analysis algorithm for the welding point to be detected. Among them, the geometric shape algorithm is based on mathematical morphology theory, and by designing different shaped structural elements (such as circle, square, diamond, etc.), the welding point image is subjected to corrosion, expansion, open operation, close operation, etc. Operation, so as to extract the geometric feature parameters of the welding point. For example, by calculating the area, perimeter, equivalent diameter, circularity (i.e. 4π×area / Perimeter 2 ), rectangularity (area / minimum circumscribed rectangle area) and other parameters of the welding point area, the shape characteristics of the welding point are described; by identifying the inflection points, sharp corners and other feature points of the welding point edge, the contour shape of the welding point is reflected.
[0075] The gray scale homogenization algorithm is mainly used to analyze the gray scale distribution characteristics of the welding point image. This algorithm first performs statistics on the gray scale values of the welding point image, and calculates the basic statistical quantities such as gray scale mean, variance, skewness and kurtosis. The gray scale mean reflects the brightness of the whole welding point, the variance reflects the dispersion degree of the gray scale value, the skewness describes the symmetry of the gray scale distribution, and the kurtosis represents the steepness of the gray scale distribution. In addition, a gray scale histogram can be generated, and by analyzing the shape, peak position, distribution interval and other information of the histogram, the gray scale features of the welding point are further obtained. For example, when the welding point has a virtual welding defect, its gray scale distribution may present different peak shift or distribution interval change from the normal welding point.
[0076] The texture analysis algorithm is used to extract the texture gradient features of the welding point image, and this algorithm is based on the analysis of the gray scale change pattern of the local region of the image. Common texture analysis methods include gray level co-occurrence matrix (GLCM), local binary pattern (LBP), Gabor filter, etc. Taking the gray level co-occurrence matrix as an example, this method constructs a co-occurrence matrix by calculating the frequency of gray scale combination of two pixels in a certain direction and distance in the image, and then extracts texture feature parameters such as energy, entropy, contrast and correlation. These parameters can reflect the texture roughness, texture directionality and other features of the welding point surface. For example, the texture of a normal welding point usually has certain regularity and uniformity, while the texture of a welding point with defects such as insufficient solder may become chaotic, and the corresponding texture feature parameters will also change significantly.
[0077] Through the parallel operation of the above three algorithms, the system will generate multiple un-fused feature extraction results. These results exist in the form of numerical values or vectors, corresponding to the geometric parameters, gray parameters and texture parameters that are not associated with the defect type. For example, the geometric shape algorithm may output the weld area as 12.5 square pixels, the perimeter as 15.3 pixels, the circularity as 0.82, and the like. The gray level algorithm may obtain the gray mean value as 120, the variance as 35.6, and the like. The texture analysis algorithm may extract the energy as 0.75, the contrast as 23.4, and the like. These un-fused feature parameters describe the image features of the weld from different dimensions, but have not yet formed a comprehensive feature representation.
[0078] Next, the system needs to judge the effectiveness of these un-fused feature extraction results to determine whether they constitute an effective feature subset. The basis for effectiveness judgment mainly includes the discrimination of the feature and the correlation between features. The discrimination of the feature refers to the ability of the feature to distinguish different types of defects, that is, whether there is a significant difference in the values of different defect types on the feature. For example, for two defects of virtual welding and excessive soldering, if the difference in the value of a certain geometric feature parameter between the two is significant, the feature has a high discrimination. The correlation between features refers to the degree of association between different features. If there is a high correlation between two features (such as a correlation coefficient greater than 0.8), it means that they may contain similar information and one of them can be retained to avoid information redundancy when fusing features.
[0079] The specific implementation process of effectiveness judgment is as follows: First, for each un-fused feature, collect a large number of weld sample data of known defect types, and calculate the value of each sample on the feature. Then, use statistical methods (such as t-test, analysis of variance, etc.) to analyze whether the mean difference of different defect types on the feature has statistical significance to evaluate the discrimination of the feature. At the same time, calculate the correlation coefficient (such as Pearson correlation coefficient) between features to determine the correlation between features. According to the preset discrimination threshold and correlation threshold, it is judged whether the feature is an effective feature. For example, set the discrimination p-value less than 0.05 as effective, and the correlation absolute value less than 0.7 as retainable.
[0080] When it is determined that multiple un-fused feature extraction results constitute an effective feature subset, the system will perform a feature fusion operation to combine these effective feature subsets into a solder joint feature fusion set. The feature fusion method uses a splicing method, that is, all effective feature parameters are connected in a certain order to form a high-dimensional feature vector. For example, if the effective features include 3 geometric parameters, 4 gray parameters and 5 texture parameters, the dimension of the fused feature vector is 3+4+5=12. In the splicing process, attention should be paid to the problem of dimensionless of feature parameters. For features with different dimensions, standardization processing (such as Z-score standardization or Min-Max standardization) can be performed first to convert them into dimensionless values to avoid the influence of dimension difference on subsequent defect discrimination.
[0081] The construction of the feature fusion set is of great significance, which integrates the feature information originally scattered in different modalities into a comprehensive feature representation, and can more comprehensively and accurately describe the image features of the solder joint. For example, geometric features reflect the shape and contour of the solder joint, gray features reflect the light and dark distribution of the solder joint, and texture features reveal the microstructure of the solder joint surface. The fusion of the three enables the system to analyze the solder joint from multiple dimensions, improving the accuracy and reliability of defect detection. In addition, through feature fusion and effectiveness screening, the dimension of the feature can be reduced, the computational complexity of the subsequent defect discrimination module can be reduced, and the running efficiency of the system can be improved.
[0082] In the implementation process of the entire feature fusion module, the parameter setting and algorithm selection of each link need to be adjusted and optimized according to the specific PCB board type, solder joint process requirements and defect type. For example, for PCB boards of different materials, the gray features of their solder joints may differ, and the parameters of the gray scale calculation algorithm need to be adjusted accordingly; for solder joints of different shapes, the selection of the structural elements of the geometric shape algorithm also needs to be optimized. Only through reasonable algorithm configuration and strict feature screening and fusion process, can the generated solder joint feature fusion set accurately reflect the actual condition of the solder joint, and provide reliable feature input for the subsequent defect discrimination.
[0083] Example 3:
[0084] The implementation of the defect discrimination module needs to start from establishing the discrimination benchmark. The system fuses the acquired welding point features with known defect type data according to three dimensions of defect morphology, defect size, and influence level for clustering processing. The defect morphology covers the contour features of the welding point, such as whether there are cracks, notches, burrs, etc. The defect size includes quantitative parameters such as the area, length, and depth of the defect. The influence level is divided according to the influence degree of the defect on the electrical performance and mechanical strength of the PCB, such as fatal defect, serious defect, general defect, etc. The clustering processing adopts an iterative optimization clustering algorithm. Initially, a number of clustering centers can be set according to prior knowledge, then each feature fusion set is classified into the nearest category by calculating the distance between the feature fusion set and the clustering center, and the category center is recalculated, and the iteration is repeated until the clustering center is stable or the preset iteration number is reached.
[0085] After the clustering processing is completed, the main clustering center in each cluster is set as the feature discrimination benchmark. The determination of the main clustering center is based on the distribution density of the samples in the cluster. Usually, the center of the region with the highest sample density is selected as the main clustering center to ensure that it can represent the typical features of the category. For example, in the cluster of virtual welding defects, the main clustering center should contain the typical parameter combination of this type of defect in terms of geometric features (such as small welding point area, low circularity), gray level features (high gray level mean), and texture features (large texture entropy value).
[0086] The core feature parameters of the feature discrimination benchmark are extracted. The selection of the core feature parameters needs to follow the effectiveness and representativeness principles. By analyzing the contribution of each feature parameter to defect classification, a feature importance evaluation method (such as information gain, Gini index, etc.) is used to select parameters with high discrimination degree for defect types. For example, in distinguishing between bridge defects and normal welding points, the welding point spacing in geometric features, the gray level difference between adjacent welding points in gray level features, and the texture correlation between welding points in texture features may become core feature parameters.
[0087] The parameter similarity between each core feature parameter is calculated. The calculation of the parameter similarity is based on the type of the feature and uses different methods: for numerical features, the Euclidean distance or cosine similarity is used; for categorical features, the chi-square test or information entropy is used. Through similarity calculation, an association matrix between core feature parameters is constructed, which reflects the dependency relationship and synergistic effect between feature parameters. For example, when the similarity between the welding point area and the gray level mean is high, it means that these two feature parameters have strong correlation in describing the state of the welding point.
[0088] The feature sequence related to each core feature parameter is set based on the parameter similarity. The construction of the feature sequence takes the correlation strength between parameters as the weight, arranges the feature parameters with higher similarity in a certain order, and forms a sequence structure that can reflect the internal relationship of defect features. For example, when describing the solder deficiency defect, the feature sequence can be solder pad area, gray mean value, and texture contrast in turn. These three feature parameters are sorted according to their correlation strength with the defect, and the typical feature evolution order of the defect in geometry, gray value, and texture is embodied.
[0089] The defect features existing in the constructed feature sequence are extracted, and the sub-sequence matching the known defect feature mode is identified in the feature sequence by means of sliding window or sequence pattern matching. For example, the feature mode of the preset solder excess defect is “area exceeding threshold value→gray mean value lower than threshold value→texture energy higher than threshold value”. When a sub-sequence conforming to the mode appears in the feature sequence, the corresponding defect feature can be extracted.
[0090] The longest common feature sub-sequence between different defect features is set. The determination of the longest common feature sub-sequence is based on the dynamic programming algorithm. By calculating the length of the common sub-sequence between the feature sequences corresponding to different defect features, the longest common part is found. The matching value of the longest common feature sub-sequence is set as the defect feature matching coefficient. The value range of the matching coefficient is [0, 1], and the larger the value is, the higher the matching degree of the feature of the weld point to be detected and the standard defect feature is. For example, if the length of the longest common sub-sequence of the feature sequence of the weld point to be detected and the standard feature sequence of a certain defect type is 8, and the length of the standard sequence is 10, the matching coefficient is 0.8.
[0091] The defect feature matching coefficients between different defect features are set as the defect type discrimination results according to the frequency distribution of each defect feature. First, the frequency of each defect feature in the historical detection data is counted. The defect features with high frequency have higher weights in the discrimination results. For example, if the frequency of a certain defect feature in the historical data is 30%, the weight of the corresponding matching coefficient in the final discrimination result is 0.3. By means of weighted summation, the comprehensive matching score of the weld point to be detected and each defect type is calculated, and the defect type with the highest score is the discrimination result.
[0092] In the implementation process, the initial parameter setting of the clustering algorithm, the selection threshold of the core feature parameter, and the selection of the similarity calculation method all need to be adjusted according to the specific PCB production process and defect type. For example, for high-density PCB boards, the geometric relationship between the welding points needs to be paid more attention to when selecting the core feature parameters; for high-frequency circuit boards, the impact level assessment of the defect needs to focus more on the electrical performance indicators. In addition, the system also needs to update the clustering center and feature discrimination benchmark regularly according to new detection data to adapt to changes in production processes and new defect types, ensuring the accuracy and timeliness of the defect discrimination results.
[0093] The entire defect discrimination process builds a discrimination benchmark through multi-dimensional clustering, combines similarity analysis of feature parameters and sequence matching, and realizes the mapping from the feature fusion set to the defect type. This process not only considers the discrimination effect of a single feature parameter, but also fully utilizes the correlation between feature parameters and sequence features, which can more comprehensively capture the complex characteristics of welding point defects and improve the robustness and accuracy of defect discrimination. At the same time, by introducing the frequency distribution of defect features as a weight, the discrimination result is more consistent with the actual defect occurrence in production, enhancing the practicality of the system.
[0094] Example 4:
[0095] The implementation of the parameter calibration module needs to be based on the defect type discrimination results, and the frequency distribution of each defect feature is extracted from the results. For example, in the detection of a batch of PCB boards, the discrimination results show that the virtual welding defect feature appears 20 times, the solder deficiency defect feature appears 15 times, the bridging defect feature appears 8 times, and the other type defect feature appears 12 times. The system will record the number of occurrences of these different defect features in the order of detection time to form the corresponding frequency distribution data. The defect features here can be specific feature parameters such as welding point area less than standard value, gray mean abnormality, and texture gradient pattern disorder, and the frequency distribution of each feature can reflect the probability of occurrence of the feature in different detection periods.
[0096] The defect type discrimination results are set according to the detection period corresponding to the frequency distribution of each defect feature. The detection period can be divided by time units such as hours, shifts, and dates, for example, taking each hour as a detection period to count the frequency of each defect feature in each period. Assuming that in the detection period from 8 am to 9 am, the virtual welding defect feature appears 5 times and the solder deficiency defect feature appears 3 times; in the 9 am to 10 am period, the virtual welding feature appears 4 times, the solder deficiency feature appears 4 times, and the bridging feature appears 2 times. The system will construct a frequency curve that changes over time for each defect feature based on the frequency distribution in these periods, which constitutes the basis of the calibration path.
[0097] The calibration path of each defect feature in the defect type discrimination result is curve fitted. In the curve fitting, a function model suitable for the change of frequency distribution is adopted, such as a polynomial function, an exponential function or a Gaussian function, etc. For example, if the appearance frequency of a certain defect feature presents a trend of first rising and then falling in the detection period, a quadratic polynomial function can be selected for fitting; if it presents a gradually rising trend, an exponential function can be selected for fitting. In the fitting process, the function parameters are adjusted by the least square method or the like, so that the fitted curve is as close as possible to the actual frequency distribution data points. The fitted calibration path can smoothly represent the trend of the appearance frequency of the defect feature with time, eliminate the fluctuations caused by accidental factors, and thus more clearly reflect the potential law in the detection process.
[0098] The probability value of the fitted path in each detection period is set as the discrimination confidence of the defect type discrimination result. For example, after curve fitting, in the detection period from 10 am to 11 am, the probability value of the fitted path of the virtual soldering defect feature is 0.65, the probability value of the soldering defect feature is 0.30, and the probability value of other features is 0.05. These probability values represent the confidence degree of the discrimination result for the corresponding defect type in this period. The discrimination confidence reflects the system's evaluation of the reliability of the current detection result. The higher the probability value, the higher the credibility of the discrimination of the defect type.
[0099] The discrimination confidence of the defect type discrimination result is compared with the standard reference value of the detection parameter. The standard reference value of the detection parameter is set in advance according to the PCB production process requirements, for example, the standard value of the exposure time of the industrial line array camera is 10 ms, the standard value of the focal length is 50 mm; the standard value of the edge gradient threshold in the feature extraction algorithm is 80, the standard value of the preset range of the gray distribution is that the brightness component is between 60-120, etc. Taking the camera exposure time as an example, if the discrimination confidence of the virtual soldering defect suddenly increases in a certain detection period, and at this time the actual exposure time of the camera is 15 ms, which deviates from the standard value of 10 ms by 5 ms, the system will mark this offset value.
[0100] The detection parameter is corrected according to the offset value, and the calibration of the detection parameter is completed. In the correction, the parameter value is adjusted according to the direction and amplitude of the offset, for example, the exposure time is offset by 5 ms, which is adjusted back to the vicinity of 10 ms, and a reasonable adjustment step is set according to the actual situation to avoid excessive adjustment leading to new deviation. If multiple detection parameters deviate at the same time, the relevance between the parameters needs to be analyzed, and the correction is performed in the order of priority. For example, when the focal length and the exposure time of the camera deviate from the standard value at the same time, if the focal length offset has a more critical impact on the image quality, the focal length parameter is preferentially calibrated.
[0101] In a specific implementation, it is assumed that a PCB production line is detected in the afternoon from 2:00 to 3:00, and the system determines that a large number of solder joints have a solder deficiency defect, and the determination confidence is 0.85. At this time, the detection parameters of this period are checked, and it is found that the brightness component preset range of the gray scale algorithm in the feature extraction algorithm is 40-80, and the standard reference value is 60-120. Since the lower limit of the preset range is lower than the standard value, it may lead to misjudgment of the brightness component of normal solder joints as abnormal, thereby overestimating the frequency of occurrence of the solder deficiency defect. The system marks the offset value of the lower limit as 20 and the upper limit as 40, and then adjusts the brightness component preset range to 60-120, so that the detection parameters are consistent with the standard reference value.
[0102] After calibration, the system will recalculate the determination confidence of this period, and observe whether the frequency of occurrence of defect features in subsequent detection periods returns to the normal range. For example, after adjusting the brightness component preset range, the determination confidence of the solder deficiency defect in the detection period from 3:00 to 4:00 is reduced to 0.20, close to the normal level, indicating that the calibration of the detection parameter is effective. If the frequency of occurrence of defect features does not improve after calibration, further investigation is needed to determine whether other detection parameters are offset or whether there are new influencing factors, such as camera lens contamination, PCB board conveying device vibration, etc., so as to make more comprehensive parameter adjustment and equipment maintenance.
[0103] The whole parameter calibration process realizes the self-optimization of the detection system by dynamically associating the defect determination results with the detection parameters. It not only can timely find the misjudgment caused by parameter offset, but also can predict the potential parameter abnormal trend through the accumulation and analysis of historical data, and perform calibration in advance to ensure that the detection system is always in the best working state. For example, when it is found that a certain detection parameter gradually deviates from the standard value in continuous multiple periods, the system can automatically issue a warning, and generate an optimal adjustment scheme according to the historical calibration data to improve the efficiency and accuracy of calibration. This parameter calibration method based on actual detection results can better adapt to changes in the production environment, such as light source aging, equipment wear, etc., to ensure the accuracy and stability of the PCB solder joint defect detection, and provide reliable support for the quality control of the production line.
[0104] Example 5:
[0105] The implementation of the report output module needs to be based on the adjusted feature fusion set and the mapping index of defect types. First, the defect types of the solder joints to be detected are extracted from the mapping index. For example, in the detection of a certain PCB board, the system determines that the solder joint numbered A12 has a bridging defect, the solder joint numbered B35 has a fake solder defect, and the solder joint numbered C7 has a solder deficiency defect through the mapping relationship between the feature fusion set and the defect type. The extraction of these defect types strictly follows the feature matching rules set in the mapping index, such as the bridging defect corresponding to the abnormal gray gradient between the solder joints and the connected geometric shape, the fake solder defect corresponding to the solder joint area less than the threshold and the high gray mean value, and the solder deficiency defect corresponding to the solder joint volume parameter lower than the standard range and the large texture entropy value.
[0106] After extracting the defect types, they need to be prioritized according to the severity level of the defect types. The division of severity level is usually based on the influence of the defect on the electrical performance and mechanical strength of the PCB board. For example, fatal defects (such as bridging leading to circuit short circuit) have the highest priority, serious defects (such as fake solder leading to poor contact) come second, and general defects (such as slight solder deficiency) have the lowest priority. Assuming that in the above example, the bridging defect belongs to the fatal defect, the fake solder defect belongs to the serious defect, and the solder deficiency defect belongs to the general defect, the priority order is: A12 solder joint (bridging) > B35 solder joint (fake solder) > C7 solder joint (solder deficiency).
[0107] After obtaining the defect processing order of the solder joints to be detected, the defect types, spatial coordinates, and defect processing order are integrated in table form. The columns of the table usually include fields such as "solder joint number", "defect type", "spatial coordinates (row / column)", "severity level", and "processing order". To illustrate with a specific example, assuming that the row coordinates of the PCB board are represented by letters A-Z and the column coordinates are represented by numbers 1-100, the integrated table is as follows:
[0108]
[0109] In the table, the annotation of spatial coordinates needs to be consistent with the actual coordinate system of the PCB board, which is usually determined by the positioning relationship between the region of interest and the pad position established by the image preprocessing module. For example, the spatial coordinates A / 12 of the A12 solder joint indicate that it is located at the 12th column of the A row of the PCB board. This coordinate is obtained by spatial projection of the row and column coordinates of the region of interest, ensuring one-to-one correspondence with the physical position of the PCB board.
[0110] After integration, the system generates a defect detection report according to the structured template. The structure of the report usually includes cover, table of contents, detection overview, defect details table, and treatment suggestions. The cover contains the report name, detection date, and detection object (such as PCB model number, batch number); the detection overview briefly describes the detection purpose, scope, and method; the defect details table is the integrated table mentioned above, which can be extended to multiple pages as needed; the treatment suggestions section proposes specific repair measures for different defect types, such as using a soldering iron to remove excess solder for bridging defects, re-soldering for virtual welding defects, and adding solder for insufficient solder defects, etc.
[0111] Taking a specific PCB detection report as an example, the cover content is: "PCB solder joint defect detection report" "Detection date: June 22, 2025" "Detection object: XX model PCB board (batch number: PCBA2025062201)". The detection overview part explains that the detection system based on image recognition is used to automatically detect 500 solder joints on the PCB, and a total of 3 defects are identified. In addition to the above three solder joints, if there are other defects, they also need to be listed one by one, and the spatial coordinates of each solder joint need to be accurate to the grid coordinates of the PCB to facilitate the rapid positioning of production personnel.
[0112] The treatment suggestions section details the operation steps and precautions for each defect type. For example, for the bridging defect of A12 solder joint, it is recommended to "use a constant temperature soldering iron (temperature set to 350±10°C) with a fine soldering iron tip, gently draw along the bridging part between the solder joints to remove excess solder, and avoid pulling the PCB circuit during operation"; for the virtual welding defect of B35 solder joint, it is recommended to "first apply flux to the surface of the solder joint, then heat the solder joint with a soldering iron until the solder melts, ensuring that the solder fully wets the pad and pin, and check the solder joint gloss and fullness after cooling"; for the insufficient solder defect of C7 solder joint, it is recommended to "use a thin solder wire (diameter 0.5mm) to supplement the solder at the edge of the solder joint, and control the heating time to 2-3 seconds to avoid excessive solder causing new bridging defects".
[0113] During the report generation process, the system also automatically calculates the distribution characteristics of the defects, such as the proportion of the number of different defect types and the regional distribution on the PCB. For example, in the above example, the 3 defects are distributed in the upper left corner (A12), the middle (B35), and the lower right corner (C7) of the PCB, respectively, and there is no obvious centralized distribution trend, indicating that the defects may be caused by random factors; if multiple defects are concentrated in a certain area, it is necessary to check whether the soldering process parameters in that area are abnormal, such as uneven soldering station temperature and inconsistent solder paste thickness.
[0114] The format of the report can be customized according to the actual needs of the production enterprise, for example, adding the enterprise LOGO, the signature column of the detection personnel, the audit process, etc. For batch detection of PCB boards, the report can also include statistical charts, such as defect type pie charts, defect quantity trend charts divided by detection period, etc., to help managers intuitively understand the product quality status. For example, the defect type pie chart of a batch of PCB boards shows that the bridge defect accounts for 40%, the virtual soldering defect accounts for 30%, the insufficient soldering accounts for 20%, and the other defects account for 10%. The manager can determine that there may be problems such as too high soldering temperature (leading to bridging) or insufficient solder supply (leading to insufficient soldering) in the soldering process, and then adjust the production parameters.
[0115] The generated defect detection report can be automatically sent to relevant departments such as the production department, the quality department, the process department, etc. by the system. Each department cooperates to handle the defect problem according to the report content. The production department is responsible for repairing the defect soldering points according to the processing suggestion, the quality department rechecks the repair result, and the process department analyzes the potential problems in the production process according to the defect distribution and type, and proposes process optimization scheme. For example, if a high proportion of bridge defects appear in consecutive batches of PCB boards, the process department can adjust the soldering wave peak height, transportation speed and other parameters, and verify the optimization effect through subsequent detection.
[0116] The implementation process of the whole report output module, from defect information extraction to structured report generation, forms a complete quality traceability chain. Through accurate defect positioning, clear severity level division and specific processing suggestions, not only direct guidance is provided for defect repair in the production site, but also data support is provided for process improvement and quality improvement. For example, after using the report generated by the system, an electronic factory found that the virtual soldering defects of a certain type of PCB board were concentrated on the soldering points of a certain component, which was caused by the oxidation layer of the component pin not being cleaned properly. By adding a pretreatment process, the number of such defects was significantly reduced. This data-driven quality control mode can effectively improve the production yield of PCB boards, reduce production costs, and enhance the competitiveness of enterprises.
[0117] It should be noted that, in this text, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment.
[0118] While embodiments of the application have been shown and described, it is to be understood that the embodiments described are merely exemplary of the principles and application of the present application. Numerous modifications and adaptions can be effected without departing from the spirit and scope of the present application, which is not limited to the exact construction and arrangement described. It is intended, therefore, to cover all modifications and adaptions that fall within the scope of the claims and their equivalents.
Claims
1. A PCB solder joint defect detection system based on image recognition, characterized in that, include: The image preprocessing module is used to acquire the original image stream of the solder joints to be inspected on the PCB board, and to divide the region of interest of the solder joints to be inspected according to the process parameters of the PCB board. The feature fusion module is used to extract multimodal features from the original image stream, obtain the geometric features, gray-level distribution features and texture gradient features of the solder joint to be detected, and form a solder joint feature fusion set; The defect discrimination module is used to obtain the discrimination benchmark of the solder joint feature fusion set, establish the mapping index between the feature fusion set and the defect type, calculate the matching coefficient between the solder joint feature fusion set and the standard sample, and obtain the defect type discrimination result. The parameter calibration module is used to verify the consistency of the detection parameters of the weld point to be inspected with reference to the defect type discrimination result, identify abnormal offsets in the detection parameters, and adjust the mapping index between the feature fusion set and the defect type based on the abnormal offsets. The report output module is used to extract the defect type and spatial coordinates of the weld point to be inspected based on the adjusted feature fusion set and the mapping index of defect type, and generate a defect inspection report according to the structured template. The defect detection module can be implemented in the following ways: The weld feature set and defect type are clustered according to defect morphology, defect size and impact level. The main cluster center after clustering is set as the feature discrimination criterion. Extract the core feature parameters of the feature discrimination benchmark, calculate the parameter similarity between each core feature parameter, and set the feature sequence related to the parameter similarity between each core feature parameter; By utilizing the feature sequences related to the parameter similarity between each core feature parameter, the defect features existing in the sequence are extracted, and the longest common feature subsequence among each defect feature is set. The matching value of the longest common feature subsequence is set as the defect feature matching coefficient. The defect feature matching coefficients between various defect features are set according to the frequency distribution of each defect feature to determine the defect type. The parameter calibration module can be implemented in the following ways: Extract the frequency distribution of each defect feature from the defect type discrimination results; set the calibration path for the defect type discrimination results according to the detection time period corresponding to the frequency distribution of each defect feature; The calibration paths of each defect feature in the defect type discrimination results are curve fitted to obtain the fitted calibration paths. The probability value of the fitted path in each detection period is set as the discrimination confidence of the defect type discrimination results. The confidence level of the defect type identification result is compared with the standard reference value of the detection parameter, the deviation difference is marked, and the detection parameter is corrected according to the deviation difference to complete the calibration of the detection parameter.
2. The PCB solder joint defect detection system based on image recognition according to claim 1, characterized in that, The image preprocessing module can be implemented in the following ways: For any solder joint to be inspected on a PCB board, an industrial line scan camera that matches the process parameters is invoked; Raw image streams of solder joints are acquired using an industrial linear scan camera, and histogram equalization is used to enhance image contrast. The edge gradient values of the solder joint area in the enhanced image are identified, and continuous pixel groups with gradient values greater than a threshold are extracted as the region of interest for the solder joint to be detected.
3. The PCB solder joint defect detection system based on image recognition according to claim 2, characterized in that, Other methods for extracting groups of consecutive pixels with gradient values greater than a threshold include: The enhanced image is converted to the HSL color space, and the luminance component of each pixel is calculated. Pixels whose brightness components are within a preset range are extracted as candidate edge points, and adjacent candidate edge points are connected to form a closed region. Using the closed region as the boundary, the pixel matrix of the corresponding region in the HSL image is extracted as the region of interest for the solder joint to be detected.
4. The PCB solder joint defect detection system based on image recognition according to claim 1, characterized in that, Other methods for dividing the region of interest (ROI) of the solder joint to be inspected include: The region of interest is labeled with coordinates, and the row and column coordinates of the region on the PCB are analyzed. The region of interest is then spatially projected according to the row and column coordinates to establish the positioning relationship between the region of interest and the PCB pads.
5. The PCB solder joint defect detection system based on image recognition according to claim 1, characterized in that, The feature fusion module can be implemented in the following ways: The algorithm for geometric morphology, grayscale statistics, and texture analysis of the weld point to be inspected is called to generate multiple unfused feature extraction results. The unfused feature extraction results represent geometric parameters, grayscale parameters, and texture parameters that are not associated with the defect type. Determine whether multiple unfused feature extraction results constitute a valid feature subset. If they are valid feature subsets, merge the valid feature subsets into a solder joint feature fusion set.
6. The PCB solder joint defect detection system based on image recognition according to claim 3, characterized in that, The implementation of establishing a feature fusion set and defect type mapping index includes: using the geometric feature description, grayscale distribution value and texture gradient mode in the solder joint feature fusion set, combined with the definition parameters of the defect type and the identification code of the defect type, to establish a mapping index between the feature fusion set and the defect type.
7. The PCB solder joint defect detection system based on image recognition according to claim 1, characterized in that, The report output module is implemented as follows: Based on the adjusted feature fusion set and the mapping index of defect types, the defect types of the solder joints to be inspected are extracted. The defect types are prioritized according to their severity level to obtain the defect processing order of the solder joints to be inspected. The defect types, spatial coordinates and defect processing order are integrated in tabular form to generate a defect inspection report.
8. A PCB solder joint defect detection method based on image recognition, applied to the PCB solder joint defect detection system based on image recognition as described in any one of claims 1 to 7, characterized in that, Includes the following steps: Acquire the original image stream of the solder joints to be inspected on the PCB board, and divide the region of interest of the solder joints to be inspected according to the process parameters of the PCB board; Multimodal feature extraction is performed on the original image stream to obtain the geometric features, gray-level distribution features, and texture gradient features of the solder joints to be detected, forming a solder joint feature fusion set; Obtain the discrimination criteria of the solder joint feature fusion set, establish the mapping index between the feature fusion set and the defect type, calculate the matching coefficient between the solder joint feature fusion set and the standard sample, and obtain the defect type discrimination result; Using the defect type discrimination result as a reference, the consistency of the detection parameters of the weld point to be inspected is verified, abnormal offsets in the detection parameters are identified, and the mapping index between the feature fusion set and the defect type is adjusted based on the abnormal offsets. Based on the adjusted mapping index, the defect type and spatial coordinates of the weld point to be inspected are extracted, and a defect inspection report is generated according to the structured template.
Citation Information
Patent Citations
Intelligent control method and system for automatic optical detection of apparent defects and medium
CN116188475A
A method for pipeline defect detection using the magnetostrictive characteristics of ultrasonic guided waves
CN119780227A