A voltage cabinet assembly positioning and assembly quality detection method based on image matching
By using image matching and pixel-level segmentation technology to perform overall matching and solder joint feature analysis of voltage cabinet components, combined with process flow rules, the problem of inaccurate detection results during the assembly of voltage cabinet components was solved. This enabled accurate classification and rapid location of solder joint position offset and poor contact issues, improving the reliability of detection and the level of intelligence in the production process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HEFEI HONGJIU ELECTRIC POWER EQUIPMENT CO LTD
- Filing Date
- 2026-03-30
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies cannot fully reflect the actual assembly status of voltage cabinet components during assembly, especially when the overall position of the components is offset, which affects the accuracy of the test results. Furthermore, they lack the ability to effectively distinguish the causes of abnormalities and cannot accurately locate the specific process steps where the problem occurred.
The voltage cabinet components are matched as a whole using image matching methods. By combining pixel-level segmentation technology and solder joint feature analysis, a solder joint defect pattern description is generated. Matching analysis is performed in conjunction with process flow rules to trace the assembly process in reverse, identify the root cause, and optimize the detection logic.
It achieves precise positioning of component installation areas and spatial offsets, improves the accuracy and efficiency of assembly quality inspection, can quickly locate the specific process steps where problems occur, and forms a dynamically optimized inspection mechanism.
Smart Images

Figure CN122493096A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of image processing and intelligent manufacturing technology, specifically to a method for positioning and assembly quality inspection of voltage cabinet components based on image matching. Background Technology
[0002] In the field of power equipment manufacturing, voltage cabinets, as critical power distribution and control units, directly affect the safety and stability of equipment operation due to the accuracy of the installation positions and assembly quality of their internal components. With the improvement of automated manufacturing levels, image processing-based detection methods are gradually being applied to the assembly process of voltage cabinet components. By acquiring assembly images and matching them with standard templates, automatic detection of component installation status and connection quality can be achieved.
[0003] In existing technologies, image matching methods are typically used to compare and analyze assembly results, focusing on surface features of solder joints or connection points, such as shape, color, and texture, to determine the presence of defects. However, in practical applications, due to the complex structure of voltage cabinet components, variable assembly environments, and positional relationships between different components, relying solely on local feature comparisons is insufficient to comprehensively reflect the actual assembly state of the components. This is especially true when the overall installation position of the components shifts, which can easily affect the accuracy of subsequent local inspection results. Furthermore, in anomaly detection, existing technologies often employ threshold judgment methods to determine image differences. While these methods can identify abnormal images, they lack the ability to effectively distinguish the specific causes of anomalies. For example, when an abnormal solder joint is detected, it is difficult to determine whether the anomaly is caused by an overall component positional shift or by local assembly defects (such as poor contact or welding deviation), thus limiting the guiding role of the inspection results in actual production. In addition, during assembly quality analysis, existing methods typically lack systematic analysis and utilization of inspection results, making it difficult to trace anomalies in conjunction with the assembly process flow and accurately pinpoint the specific process step where the problem occurred. This means that in actual production, when assembly quality problems occur, it is still necessary to rely on manual experience for troubleshooting, which is not only inefficient but also detrimental to the formation of a stable and reliable quality control mechanism. Summary of the Invention
[0004] The purpose of this invention is to provide a method for positioning and assembly quality inspection of voltage cabinet components based on image matching, thereby solving the problems existing in the prior art.
[0005] To achieve the above objectives, the present invention provides the following technical solution: a method for positioning and assembly quality inspection of voltage cabinet components based on image matching, comprising: S1. Collect images of the voltage cabinet assembly from the production line in real time. Based on the preset component standard template, perform overall matching of the images to determine the installation area and spatial position offset information of the voltage cabinet assembly in the image. Perform resolution scanning on the surface features and geometric contours of the solder points in the image. Extract the pixel distribution deviation and edge contour anomalies of the solder points through pixel-level segmentation technology to obtain a preliminary feature description set. S2. Based on the feature description set, analyze the color depth differences and texture inconsistencies in the solder joint images, and compare them with the preset solder joint standard template. If the regional comparison imbalance exceeds the preset threshold, it is judged as an abnormal solder joint image, and the abnormal image subset is determined. S3. For the subset of abnormal images, extract the defect shape features and spatial position offset, and combine them with local density anomaly data to generate a solder joint defect pattern description, which is used to locate potential problems in the component assembly process. S4. By describing the solder joint defect pattern, compare it with the preset component process flow code and standard operating procedure. If the matching degree of the defect association rule is higher than the preset threshold, then determine the specific problem type as solder joint position offset or poor contact. S5. Based on the determined solder joint position offset or poor contact problem, and combined with the process dependency relationship and problem location parameters in the process database, generate an abnormal trigger condition description for the component assembly process, and determine the specific process node where the problem occurred.
[0006] Preferably, S1 includes: Obtain the assembly image of the voltage cabinet components and the preset component standard template, and calculate the spatial mapping relationship data between the assembly image and the component standard template; Based on the spatial mapping relationship data, the geometric deformation parameters are analyzed, and the spatial position offset of the component is quantified. The spatial position offset values are used to correct and resample the points of interest to obtain the surface features and geometric contour data of the weld joints. The surface features and geometric contour data of the solder joints are segmented at the pixel level to extract pixel distribution deviations and edge contour anomalies, generating a preliminary feature description set.
[0007] Preferably, S2 includes: Acquire images of the solder joints to be inspected and extract color depth data and texture feature distribution data; Based on color depth data and texture feature distribution data, combined with a preset solder joint standard template, the region is divided to obtain the local region to be tested and the corresponding standard local region. The difference between the local area to be tested and the standard local area is calculated to generate a regional difference feature vector, and then aggregated to obtain the regional contrast imbalance value. If the regional contrast imbalance value exceeds the preset imbalance judgment threshold, an abnormal image subset is identified.
[0008] Preferably, S3 includes: Obtain the defect contours extracted from a subset of abnormal images, and calculate the geometric features and spatial position offset vectors based on the defect contours; A local detection window is defined based on the spatial location offset vector, and local density anomaly data is extracted from the local detection window; A weld joint defect pattern description is generated by combining geometric features, spatial position offset vectors, and local density anomaly data. The solder joint defect pattern description is matched with historical fault records to locate the source of the fault in the component assembly process that caused the defect.
[0009] Preferably, S4 includes: Acquire optical image data of the solder joint area and component process flow code to generate a set of defect morphology features; Based on the defect morphology feature set and the standard operation specification text corresponding to the component process flow code, dynamic defect association rules are constructed. Calculate the feature matching degree between dynamic defect association rules and historical fault model library, and lock the target reference object when the feature matching degree is higher than a preset threshold; Analyze the spatial topology properties of the target reference object, and determine the specific problem type of solder joint position offset or poor contact based on the spatial topology properties.
[0010] Preferably, S5 includes: The solder joint position offset and poor contact status are obtained, and the chip coordinate deviation in the solder joint position offset and the solder paste printing thickness in the poor contact status are extracted by principal component analysis. Based on the chip placement coordinate deviation and solder paste printing thickness, the process database is queried to extract the process dependencies corresponding to the chip placement coordinate deviation and the reflow soldering temperature gradient corresponding to the solder paste printing thickness. If the reflow soldering temperature gradient exceeds the preset threshold, the support vector machine algorithm is used to classify the process dependencies in order to extract the assembly trajectory vector and problem location features. Based on the assembly trajectory vector and the problem location features, an abnormal triggering condition description for the component assembly process is generated to determine the specific process node where the problem occurs.
[0011] Preferably, it also includes S6, which involves reverse tracing of abnormal steps in the component assembly process using abnormal triggering condition descriptions and historical defect records, identifying the root cause step using matching priority rules, and obtaining the core control points of solder joint assembly problems, specifically including: Obtain descriptions of abnormal triggering conditions and historical defect records, and map the descriptions of abnormal triggering conditions to historical defect records to construct a defect feature matrix; A reverse tracing path set is generated based on the defect feature matrix, and the matching score of the reverse tracing path set is calculated to output the suspected root cause node sequence.
[0012] Preferably, S6 further includes: Cluster the suspected root cause node sequences to extract root cause link identifiers, and retrieve the key process variable set based on the root cause link identifiers; The key process variable set is filtered to identify the core control points for solder joint assembly problems.
[0013] Preferably, it also includes S7: adjusting the feature extraction parameters of the solder joint image scan based on the root cause identifier, optimizing the detection logic for pixel distribution deviation and regional contrast imbalance, and obtaining the solder joint anomaly judgment criteria, specifically including: Obtain the root cause identification in the production process, and classify and label the collected raw solder joint images according to the root cause identification; For the marked original solder joint image, the feature variables are adjusted by calling the preset scanning frequency, and pixel distribution data reflecting the surface morphology of the solder joint is extracted.
[0014] Preferably, S7 further includes: The distribution deviation between the solder joint area and the background area is calculated based on the pixel distribution data. If the distribution deviation exceeds the preset range, the gain value in the feature variables is corrected, and the imbalance state is identified based on the corrected gain value. To optimize the threshold weight in the detection logic for the imbalanced state, the solder joint anomaly judgment result is obtained through multi-dimensional feature fusion, and the solder joint anomaly judgment result is matched with the distribution deviation to determine the final solder joint anomaly judgment standard.
[0015] As can be seen from the above technical solution, the present invention has the following beneficial effects: This image-matching-based method for voltage cabinet component positioning and assembly quality inspection combines overall matching of assembly images with local solder joint feature analysis. It achieves precise positioning of component installation areas and spatial offsets, while further performing pixel-level segmentation and region comparison of solder joint images, effectively improving the accuracy of assembly quality inspection. By constructing solder joint defect patterns and combining them with process flow rules for matching analysis, it achieves accurate classification and judgment of problems such as solder joint positional offsets and poor contact. Furthermore, by using abnormal triggering condition descriptions and historical defect data to reverse-track the assembly process, it can quickly locate the specific process step where the problem occurred, avoiding the shortcomings of traditional inspection methods that only identify surface defects and cannot trace the root cause. Simultaneously, by adaptively adjusting the identification of root causes and feature extraction parameters, a dynamically optimized detection mechanism is formed, significantly improving the reliability of voltage cabinet component assembly quality inspection, the efficiency of problem location, and the level of intelligence in the production process. Attached Figure Description
[0016] Figure 1 This is a flowchart of the voltage cabinet component positioning and assembly quality inspection method of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0018] like Figure 1 As shown, the present invention provides a technical solution: a method for positioning and assembly quality inspection of voltage cabinet components based on image matching, comprising: S1. Collect images of the voltage cabinet assembly from the production line in real time. Based on the preset component standard template, perform overall matching of the images to determine the installation area and spatial position offset information of the voltage cabinet assembly in the image. Perform resolution scanning on the surface features and geometric contours of the solder points in the image. Extract the pixel distribution deviation and edge contour anomalies of the solder points through pixel-level segmentation technology to obtain a preliminary feature description set. S2. Based on the feature description set, analyze the color depth differences and texture inconsistencies in the solder joint images, and compare them with the preset solder joint standard template. If the regional comparison imbalance exceeds the preset threshold, it is judged as an abnormal solder joint image, and the abnormal image subset is determined. S3. For the subset of abnormal images, extract the defect shape features and spatial position offset, and combine them with local density anomaly data to generate a solder joint defect pattern description, which is used to locate potential problems in the component assembly process. S4. By describing the solder joint defect pattern, compare it with the preset component process flow code and standard operating procedure. If the matching degree of the defect association rule is higher than the preset threshold, then determine the specific problem type as solder joint position offset or poor contact. S5. Based on the determined solder joint position offset or poor contact problem, and combined with the process dependency relationship and problem location parameters in the process database, generate an abnormal trigger condition description for the component assembly process, and determine the specific process node where the problem occurred. S6. By describing the abnormal triggering conditions and recording historical defects, we trace the abnormal links in the component assembly process in reverse, use the matching priority rule to lock the root cause link identifier, and obtain the core control point of the solder joint assembly problem. S7. Based on the root cause identification, adjust the feature extraction parameters of the solder joint image scan, optimize the detection logic for pixel distribution deviation and regional contrast imbalance, and obtain the solder joint anomaly judgment criteria.
[0019] In this implementation, assembly images of voltage cabinet components are acquired using industrial cameras on the production line, and calibration parameters are used to map the spatial coordinates of the images to the actual physical coordinates. By introducing a standard component template library, image matching algorithms based on feature point matching (such as SIFT, ORB, or deep learning feature extraction networks) are used to align the acquired images as a whole, thereby determining the installation area and spatial offset of the voltage cabinet components.
[0020] In the solder joint detection stage, a high-resolution local scanning method is used to perform image enhancement processing on the solder joint area, including contrast stretching and edge enhancement filtering. Further, pixel-level segmentation algorithms (such as a semantic segmentation model based on U-Net or a method combining threshold segmentation and morphological processing) are used to extract the pixel distribution features of the solder joint area and calculate geometric parameters such as the continuity and curvature changes of the edge contours to form a feature description set.
[0021] Based on this feature description set, color depth information is extracted through color space transformation (such as RGB to HSV or Lab space), and texture analysis is performed by combining Gray-Level Co-occurrence Matrix (GLCM) or Local Binary Pattern (LBP). The actual solder joint image is compared with a standard template at the regional level to calculate the regional contrast imbalance index (such as Structural Similarity Index (SSIM) or Mean Square Error (MSE). When the index exceeds a set threshold, it is classified as an abnormal solder joint image.
[0022] For abnormal images, defect shape features are obtained through contour extraction algorithms (such as Canny edge detection and contour fitting), and a weld point defect pattern description vector is constructed by combining the weld point spatial coordinate offset and local pixel density distribution anomalies. This vector is further matched with a preset process flow coding system, which includes the operational features of different assembly stages and their corresponding defect type mapping relationships.
[0023] By using rule matching or machine learning-based classification models (such as decision trees or support vector machines), the defect type is determined to be solder joint misalignment or poor contact. Subsequently, by combining the process dependencies in the process database (such as the correlation matrix between preceding and subsequent processes) and the problem location parameters, an anomaly triggering condition description is generated. Then, by tracing back through historical defect records, a priority-weighted matching strategy is used to determine the most likely root process identifier.
[0024] Finally, based on the root cause identifier, key parameters in image processing, such as segmentation threshold, edge detection operator parameters, and region comparison weights, are dynamically adjusted to achieve adaptive optimization of the detection model, thereby forming an updated weld joint anomaly judgment standard.
[0025] S1 includes acquiring the assembly image of the voltage cabinet components and a preset component standard template, calculating the spatial mapping relationship data between the assembly image and the component standard template; analyzing the geometric deformation parameters based on the spatial mapping relationship data, quantifying the spatial position offset value of the component; using the spatial position offset value to correct and resample the points of interest, acquiring the surface features and geometric contour data of the solder joints; performing pixel-level segmentation on the surface features and geometric contour data of the solder joints to extract pixel distribution deviations and edge contour anomalies, generating a preliminary feature description set.
[0026] In the above implementation, firstly, assembly images of the voltage cabinet components and a preset component standard template are acquired. The assembly images are captured by an industrial camera set at a fixed position on the production line, with the camera resolution set to 1920×1080 to ensure sufficient pixel density in the solder joint area; the component standard template is derived from images of qualified products that have been manually calibrated, and the standard template is generated by averaging the results of multiple samplings to reduce the impact of random errors.
[0027] Subsequently, spatial mapping relationships between the assembly images and component standard templates are calculated. The specific process is as follows: First, both images are converted to grayscale, transforming the color images into single-channel grayscale images to eliminate color interference in matching. Then, a corner detection algorithm is used to extract key feature points from the images, with the number of feature points set to no less than 200 to ensure matching stability. Next, a correspondence is established between feature point descriptions and the matching method, and erroneous matching points are eliminated using a random sampling consistency method, with the erroneous matching elimination ratio controlled within 30% to ensure the reliability of the matching points. Based on the filtered matching point pairs, spatial mapping relationship data is calculated. This spatial mapping relationship is determined by a 4×4 transformation relationship, which reflects the positional and morphological changes between the images.
[0028] In the above scheme, the spatial mapping relationship data is analyzed to extract geometric deformation parameters. Specifically, the mapping relationship is decomposed to obtain the horizontal offset, vertical offset, rotation angle, and scale change ratio. The positional offset is calculated by averaging the coordinate differences of the matching points in the two images, in pixels; the rotation angle is calculated by the change in the angle between the lines connecting the matching points; and the scale change is calculated by the ratio of the distances between corresponding points. The criterion for determining the positional offset is derived from the production line's allowable error range, typically set to no more than 5 pixels. This value is determined by statistically analyzing the maximum offset value of 1000 qualified samples.
[0029] Based on the aforementioned spatial offset values, the points of interest (POIs) in the image are corrected. The specific steps are as follows: First, the image coordinate system is transformed inversely according to the offset values to restore the solder joint area to the standard template position. Then, resampling is performed on the corrected solder joint area. During resampling, a 4-neighbor interpolation method is used, with the interpolation range set to the surrounding four pixels to balance computational efficiency and image smoothness. The resampling area is a 64×64 pixel local image block cropped from the center of the solder joint. This size is calculated based on the average size of the solder joint to ensure complete coverage of the solder joint area.
[0030] After correction and resampling, surface features and geometric contour data are extracted from the solder joint area. Surface features are obtained by statistically analyzing pixel grayscale distribution, including average grayscale value, grayscale variance, and grayscale gradient variation amplitude. Grayscale variance reflects the surface roughness of the solder joint. Geometric contour data is obtained through edge detection using a dual-threshold edge detection strategy. The low threshold is set to 30, and the high threshold is set to 90. The thresholds are determined based on the statistical results of the grayscale distribution of 500 sample images, taking the stable range of their edge response distribution.
[0031] Furthermore, pixel-level segmentation processing is performed on the surface features and geometric contour data of the solder joints. Specifically: First, a segmentation threshold is set based on the grayscale distribution. This threshold is determined by adding or subtracting 10 from the mean grayscale value of the solder joint area in the standard template to accommodate illumination fluctuations. Then, the image is divided into solder joint areas and background areas, and connected component analysis is performed on the segmentation results to remove noise regions with an area less than 20 pixels. This area threshold is determined by statistically analyzing the distribution of noise points. Next, pixel density statistics are performed on the solder joint areas to calculate the change in the number of pixels per unit area, and this is compared with the corresponding area of the standard template to obtain the pixel distribution deviation.
[0032] Simultaneously, a continuity analysis is performed on the edge contour, specifically calculating the difference between the contour length and the theoretical contour length, as well as the change in contour curvature. When the contour break length exceeds 5 pixels, it is judged as an edge anomaly. This threshold is determined based on the minimum detectable size of weld joint fracture defects in actual production. Finally, the pixel distribution deviation, grayscale statistical features, and contour anomaly information are combined and organized according to a unified data structure to form a preliminary feature description set.
[0033] S2 includes acquiring the solder joint image to be detected and extracting color depth data and texture feature distribution data; dividing the region according to the color depth data and texture feature distribution data and a preset solder joint standard template to obtain the local region to be tested and the corresponding standard local region; calculating the difference between the local region to be tested and the standard local region to generate a region difference feature vector, and aggregating it to obtain the region contrast imbalance value; if the region contrast imbalance value exceeds the preset imbalance judgment threshold, an abnormal image subset is determined.
[0034] In the above implementation, the solder joint image to be detected is first acquired. The solder joint image is derived from a local area after spatial correction, and the image size is uniformly controlled at 64×64 pixels. This size is determined by statistically analyzing the circumscribed rectangles of no less than 500 qualified solder joints to ensure complete coverage of the main area of the solder joint and the inclusion of necessary edge information. After image acquisition, the image is preprocessed to convert the original three-channel image into a single brightness representation. Specifically, the brightness value of each pixel is obtained by weighted summation of the three channel values. The weights are set to 0.3, 0.59, and 0.11 based on human eye perception sensitivity, and these weights are determined by comprehensive color sensitivity experimental data.
[0035] During the color depth data extraction process, the brightness value of each pixel is statistically analyzed. First, the average brightness value of the entire solder joint image is calculated. This average value is obtained by summing the brightness values of all 4096 pixels and dividing by 4096. Simultaneously, the maximum and minimum brightness values are calculated. The maximum and minimum values are obtained by comparing them pixel by pixel, and the difference between them serves as the brightness distribution range, characterizing the difference in reflective intensity in the solder joint area. Furthermore, the image is divided into multiple local regions, and the average brightness value is calculated for each local region to obtain local color depth distribution data.
[0036] In the process of extracting texture feature distribution data, the grayscale image is traversed using a sliding window method. The window size is set to 5×5 pixels, which is obtained by statistically analyzing the minimum structural size of the solder joint surface texture to ensure that the window can cover the smallest texture unit. Pixels within each window are compared point by point, and the grayscale difference between adjacent pixels is calculated. All differences are accumulated to obtain the total grayscale change of that window. At the same time, the consistency of the grayscale change direction is statistically analyzed. The degree of consistency is determined by comparing the number of sign changes of the differences between consecutive pixels; the fewer the number of sign changes, the more uniform the texture. The statistical results of all windows in the entire image are accumulated and averaged to obtain the overall texture feature distribution data.
[0037] Subsequently, the image of the solder joint to be inspected is compared with a preset standard template for solder joints to be divided into regions. Specifically, the image is divided into several 8×8 pixel local regions based on the center of the solder joint. The division size is determined by combining the average diameter of the solder joint and the detail recognition accuracy, so that each solder joint is divided into 64 local regions. The standard template is divided in the same way to ensure that each local region to be inspected has a unique corresponding standard local region, and the two are completely consistent in spatial position.
[0038] During the region difference calculation process, color and texture differences are calculated separately for each pair of corresponding regions. Color difference is obtained by calculating the absolute value of the difference between the average brightness values of the two regions, which is the average of the brightness of 64 pixels within the region. Texture difference is obtained by calculating the difference between the total texture variation of the two regions, which reflects the change in local surface roughness. The color and texture differences are then numerically superimposed to obtain the difference feature value for a single region.
[0039] After calculating the differences in all local regions, the difference values for each region are weighted. The weight allocation is determined based on the functional importance of each region within the weld joint. The central region of the weld joint is assigned a weight of 2, which is determined by analyzing the impact of concentrated current areas on weld quality; the edge regions are assigned a weight of 1. Specifically, the difference value for each region is multiplied by its corresponding weight, and then summed. The summation is then divided by the total weights to obtain the normalized regional imbalance value.
[0040] In the anomaly detection process, an imbalance threshold is set to distinguish between normal and abnormal solder joints. This threshold is obtained by statistically analyzing the regional contrast imbalance values of no less than 1000 qualified solder joint samples. First, the maximum value among all samples is obtained as a baseline value. Then, a margin of 10 is added to this baseline value. This margin is determined by analyzing the maximum disturbance range caused by light fluctuations and equipment errors in the production environment, thus obtaining the final imbalance threshold. When the regional contrast imbalance value of the solder joint image to be detected is greater than this threshold, the solder joint image is determined to be abnormal and classified into the abnormal image subset; when the value does not exceed the threshold, it is determined to be a normal solder joint image.
[0041] S3 includes acquiring defect contours extracted from a subset of abnormal images, calculating geometric features and spatial offset vectors based on the defect contours, defining local detection windows based on the spatial offset vectors, and extracting local density anomaly data from the local detection windows, generating a solder joint defect pattern description by combining geometric features, spatial offset vectors, and local density anomaly data, and matching the solder joint defect pattern description with historical fault records to locate the fault source point in the component assembly process that caused the defect.
[0042] In the above implementation, defect contours are first extracted from each solder joint image in the subset of abnormal images. Specifically, the input solder joint images are converted to grayscale to retain only brightness information for each pixel, thus eliminating color interference. Then, edge detection is performed on the grayscale image, employing a two-stage filtering method. First, the brightness difference between each pixel and its neighboring pixels is calculated. Points with a difference greater than 30 are marked as candidate edge points; this value is obtained by statistically analyzing the differences between the real edges and the background in at least 500 abnormal solder joint images. Next, the candidate edge points are filtered again; points with a difference greater than 90 are identified as strong edge points, where 90 is derived from the stable upper limit range of edge intensity distribution. After these two stages of filtering, connectivity analysis is performed on all edge points. Edge points with a distance of 1 between adjacent pixels are grouped into the same set, and the number of pixels in each set is counted. Sets with fewer than 15 pixels are removed; this value is determined by statistically analyzing the upper limit of the number of pixels in noisy regions, thus obtaining the effective defect contours.
[0043] After obtaining the defect contours, geometric feature calculations are performed on each contour. Specifically: First, all pixels in the contour are traversed, and the horizontal and vertical coordinates of each pixel are recorded. The contour width is obtained by comparing the difference between the maximum and minimum values of all horizontal coordinates, and the contour height is obtained by comparing the difference between the maximum and minimum values of the vertical coordinates. Then, the number of pixels inside the contour is counted as the area value. Next, the contour boundary is tracked point by point, and the distance between adjacent boundary points is accumulated as 1 to obtain the boundary length value. Finally, the center position of the contour is calculated. The horizontal coordinate of the center is obtained by summing the horizontal coordinates of all pixels in the contour and dividing by the total number of pixels, and the vertical coordinate of the center is obtained by summing the vertical coordinates and dividing by the total number of pixels.
[0044] During the calculation of the spatial position offset vector, the obtained contour center position is compared with the standard solder joint center position. The standard solder joint center position is derived from the center point of the corresponding area in the standard template, which is obtained by averaging the pixel coordinates of all pixels in the solder joint area of the standard template. The difference between the two horizontal coordinates is used as the horizontal offset, and the difference between the vertical coordinates is used as the vertical offset, forming a spatial position offset value pair. For the judgment criterion of the offset, the maximum offset value of 8 is taken as the upper limit of reference by statistically analyzing the center offset of no less than 1000 qualified solder joints, and used for subsequent window adjustment judgment.
[0045] Based on the aforementioned spatial offset values, a local detection window is constructed using the defect contour center as a reference. The specific process is as follows: A 32×32 pixel square region is cropped from the image, centered on the contour center. This size is determined by statistically analyzing the defect's influence range, ensuring that the defect area and surrounding areas are fully included. When the horizontal or vertical offset exceeds 8, the window center is moved by an equal amount in the corresponding direction to align it with the actual defect area. This adjustment threshold is derived from the statistical results of the maximum offset of qualified samples.
[0046] Local density anomaly data is extracted within the local detection window. Specifically: First, the brightness of all pixels within the window area is statistically analyzed, and the average brightness value is calculated. This average value is obtained by summing the brightness of 1024 pixels within the window and dividing by 1024. Then, using this average brightness as a baseline, a segmentation threshold interval is defined with a fluctuation range of 15 pixels above and below it. This value of 15 is determined by statistically analyzing the brightness fluctuation range under different lighting conditions. Pixels with brightness above the upper limit of this interval are marked as bright areas, pixels below the lower limit are marked as dark areas, and the rest are designated as intermediate areas. The total number of pixels in bright and dark areas is counted, and their proportion to the total number of pixels in the window is calculated. Simultaneously, the same statistical results are obtained for the corresponding window area of the standard template, and the difference between the two proportions is used as the local density anomaly value.
[0047] Subsequently, the geometric features, spatial offset values, and local density anomaly data are integrated and processed. Specifically, the contour width, height, area, boundary length, lateral offset, longitudinal offset, and density anomaly values are arranged in a predetermined order to form a unified dataset. Each data item undergoes range unification processing, specifically by subtracting the minimum value from the historical samples from the current value and then dividing by the difference between the maximum and minimum values. The maximum and minimum values are derived from the statistical results of no less than 1000 historical samples, thus ensuring that all data fall within the range of 0 to 1.
[0048] During defect pattern matching, a data set corresponding to the corresponding structure is extracted from historical fault records, and the difference between each data set and the current data set is calculated item by item. The absolute value of each difference is taken and then summed to obtain the overall difference value. During the summation process, different weights are assigned to different features. The weight for spatial position offset is set to 2, determined by analyzing the impact of position offset on assembly quality; the weight for geometric dimension-related values is set to 1; and the weight for density anomaly values is set to 1.5, obtained through analysis of their contribution to defect identification accuracy. The final matching result is obtained by summing all weighted differences.
[0049] Finally, the above calculations are performed on all historical fault records one by one, and the record with the smallest difference value is selected as the matching result. The corresponding assembly link identifier in the record is read to determine the specific assembly link location that caused the current defect, thereby achieving precise location of the fault source.
[0050] S4 includes acquiring optical image data of the solder joint area and component process flow code to generate a defect morphology feature set; constructing dynamic defect association rules based on the defect morphology feature set and the standard operation specification text corresponding to the component process flow code; calculating the feature matching degree between the dynamic defect association rules and the historical fault model library, and locking the target reference object when the feature matching degree is higher than a preset threshold; parsing the spatial topology attributes of the target reference object, and determining the specific problem type of solder joint position offset or poor contact based on the spatial topology attributes.
[0051] In the above implementation, optical image data of the solder joint area is first acquired. The image originates from solder joint areas identified as abnormal in previous steps and is uniformly cropped to 64×64 pixels. This size is determined by statistically analyzing the actual size range of no less than 500 solder joints to ensure coverage of the main body of the solder joint and the edge transition area. After image acquisition, the brightness of each pixel is uniformly adjusted. Specifically, the average brightness value of the 4096 pixels in the entire image is calculated, and the difference between the brightness of each pixel and the average value is calculated. An overall offset method is used to concentrate the image brightness distribution in a stable range. This range is determined by analyzing the brightness fluctuation range under different lighting conditions and controlled within ±20 to reduce the influence of ambient light.
[0052] Subsequently, defect morphology features were extracted from the solder joint area. The specific process was as follows: First, the solder joint area was obtained through segmentation. The segmentation threshold was centered on the average brightness of the current image, with a fluctuation range of 15 points above and below it. This fluctuation value was determined by statistically analyzing the brightness variation range of different batches of images. Pixels with brightness above the upper limit and below the lower limit were distinguished, forming solder joint areas and non-solder joint areas. The area of each pixel in the solder joint area was statistically analyzed, directly obtained from the total number of pixels in the solder joint area. Then, the contour boundary was extracted. Boundary points with a brightness variation exceeding 30 between adjacent pixels were identified as contour points. This value of 30 was derived from the statistical results of the brightness difference between the boundary and the interior. All contour points were sorted and connected point by point. The path length with a distance of 1 between adjacent points was calculated, and the cumulative boundary length value was obtained.
[0053] During the brightness uniformity calculation, the brightness of all pixels within the solder joint area is traversed to obtain the maximum and minimum brightness values. The difference between these two values is used as the brightness distribution range to characterize the surface uniformity; a larger value indicates a higher degree of surface non-uniformity. For edge integrity analysis, continuity detection is performed on the contour path. When the distance between adjacent contour points is greater than 1, it is recorded as a breakpoint, and the number of breakpoints is counted. If the number of breakpoints exceeds 5, it is determined that there is a significant defect at the edge. This value of 5 is obtained by statistically analyzing the continuity of normal solder joint edges.
[0054] After obtaining the area, boundary length, brightness range, and number of fracture points, these are combined to form a defect morphology feature set. Subsequently, the component process flow code is obtained. This code is a 6-digit sequence, with each digit corresponding to an assembly process. This code is generated by the production system, and its rules are determined based on the process flow. The corresponding process is parsed bit by bit according to this code, and standard operating procedure data for the corresponding process is extracted from the database. This data includes the welding temperature range, duration range, and allowable positional offset range. The temperature range is determined through process experiments, for example, controlled between 240 and 260 degrees Celsius; the duration is controlled between 2 and 4 seconds; and the positional offset range is controlled to no more than 5 pixels. These values are jointly determined by equipment accuracy and product requirements.
[0055] In constructing dynamic defect association rules, defect morphology features are mapped to the aforementioned process parameters one by one. Specifically: when the area value is less than the standard area lower limit of 10, insufficient welding time is associated; when the brightness range is greater than 40, abnormal temperature fluctuation is associated, with the value 40 determined by statistically analyzing the upper limit of the brightness range of qualified weld points; when the boundary length is abnormally large and the number of break points exceeds 5, discontinuous welding is associated; when the position offset exceeds 5 pixels, assembly positioning error is associated. Each association is assigned a weight, with the weight for features related to position offset set to 2, the weight for features related to brightness set to 1.5, and the weight for features related to geometric dimensions set to 1. These weights are determined by analyzing the contribution of each feature to the accuracy of problem determination in historical data.
[0056] During feature matching, records matching the current process flow code are extracted from the historical fault model database, and each record is matched. Specifically, the current feature set is compared with the corresponding features in the historical records, the difference is calculated, and the absolute value is taken. Each difference is multiplied by its corresponding weight and then summed to obtain the overall matching value. The smaller the matching value, the higher the similarity.
[0057] During the matching process, a feature matching threshold is set. This threshold is obtained by statistically analyzing the distribution of matching values from at least 1000 historical records. First, several records with the smallest matching values are selected, and their upper limit is determined as a benchmark value. Then, a tolerance of 5 is added to this benchmark value. This tolerance value of 5 is determined by analyzing the impact of equipment errors and environmental fluctuations. When the current matching value is less than this threshold, a match is considered successful, and the record with the smallest matching value is selected as the target reference object.
[0058] Subsequently, spatial topology attribute parsing is performed on the target reference object. Specifically, the spatial relationship data between solder joints and adjacent components is extracted from historical records, including horizontal spacing, vertical spacing, and arrangement order information, where spacing is calculated using pixel distance. The spatial position data of the current solder joint is compared with this reference data. When all solder joints show a consistent offset in the same direction with similar offset amounts, it is determined to be a solder joint position offset problem; when the solder joint positions are basically consistent but there are abnormal brightness or concentrated boundary breaks in local areas, it is determined to be a poor contact problem.
[0059] S5 includes acquiring solder joint position offset and poor contact status; extracting the component coordinate deviation from the solder joint position offset and the solder paste printing thickness from the poor contact status using principal component analysis; querying the process database based on the component coordinate deviation and solder paste printing thickness to extract the process dependency relationship corresponding to the component coordinate deviation and the reflow soldering temperature gradient corresponding to the solder paste printing thickness; if the reflow soldering temperature gradient exceeds a preset threshold, using a support vector machine algorithm to classify the process dependency relationship to extract the assembly trajectory vector and problem location features; generating an abnormal triggering condition description for the component assembly process based on the assembly trajectory vector and the problem location features to determine the specific process node where the problem occurred.
[0060] In the above implementation, the solder joint position offset status and contact failure status are first obtained. The solder joint position offset status is obtained by calculating the center coordinates of the solder joint. Specifically, all pixel coordinates within the solder joint area are traversed, and the horizontal coordinates are accumulated and divided by the total number of pixels to obtain the center horizontal coordinate. The vertical coordinates are accumulated and divided by the total number of pixels to obtain the center vertical coordinate. At the same time, the center coordinates of the corresponding solder joint in the standard template are obtained. These coordinates are obtained by averaging the results of the same calculation on no less than 500 qualified solder joints in the standard sample. The difference between the current solder joint center coordinates and the standard center coordinates are calculated to obtain the horizontal offset value and the vertical offset value. The two together constitute the position offset data set.
[0061] For poor contact conditions, the brightness distribution and local density data of the solder joint area are used for characterization. Specifically, the brightness values of all pixels within the solder joint area are statistically analyzed, the average brightness is calculated, and the difference between the maximum and minimum brightness is calculated as the brightness fluctuation range. Simultaneously, the number of bright and low-brightness pixels within the solder joint area is statistically analyzed, with the distinction between bright and low-brightness pixels defined by a fluctuation of 15 points above and below the average brightness. This value is determined by statistically analyzing the brightness fluctuation range under different production environments. The brightness fluctuation range and the ratio of bright to low-brightness pixels are used as the raw data for poor contact conditions.
[0062] Principal component extraction (PCE) is performed based on the above data. Specifically, the horizontal and vertical offsets in the positional offset dataset are statistically analyzed, their average values are calculated, and the difference between each data point and the average value is calculated. By comparing the absolute values of all differences, the direction with the largest change is selected as the principal direction of change, and the value corresponding to this direction is taken as the patch coordinate deviation. This deviation reflects the most significant positional offset characteristic during assembly. For contact defect data, the brightness fluctuation range and the ratio of high and low brightness pixels are processed in the same way, and their change amplitudes are compared. The data with the most significant change is selected as the principal feature, and the solder paste printing thickness is obtained by mapping it to a table comparing the relationship between solder paste thickness and brightness in standard samples. This comparison relationship is calibrated using no fewer than 300 sets of experimental samples.
[0063] Subsequently, the process database is queried based on the component placement coordinate deviation and solder paste printing thickness. Specifically, the component placement coordinate deviation is compared with the assembly accuracy records in the process database one by one, historical records with similar deviation ranges are selected, and the corresponding process sequence relationship is extracted. The relationship is represented by the sequential dependence of each process. At the same time, based on the solder paste printing thickness, the temperature records of the reflow soldering process are retrieved from the database to obtain temperature data at multiple time points during the heating stage. The temperature difference between adjacent time points is calculated, accumulated, and the total temperature change is obtained. Then, it is divided by the number of time periods to obtain the average temperature change, i.e., the reflow soldering temperature gradient.
[0064] In the temperature gradient determination process, a threshold of 15 is set. This value is obtained by statistically analyzing temperature changes in no fewer than 500 batches of normal production data, using the maximum stable temperature change range as the benchmark. When the calculated temperature gradient is greater than 15, it is determined that there are abnormal fluctuations in the reflow soldering process.
[0065] Under the condition that the temperature gradient exceeds 15, the dependencies between processes are classified. Specifically, the sequence of processes is converted into a numerical sequence, with each process corresponding to a state value. This value is determined by statistically analyzing the frequency of anomalies occurring at that process in historical data. For example, if anomalies occur 20 times out of 100 records, the corresponding value is 20. All process values are arranged sequentially to form a sequence of data. Then, the difference between the current sequence and the sequences in the historical records is calculated one by one. The absolute value of the difference at each position is taken and accumulated to obtain the overall difference value. By comparing the difference values of all historical records, the group with the smallest difference is selected as the classification result.
[0066] After the classification results are determined, an assembly trajectory vector is extracted from the results. This vector consists of the numerical sequence corresponding to each process and is used to represent the change path of the component from the initial assembly to the current state. At the same time, problem location features are extracted, specifically identifying the process position with the greatest difference and the trend of numerical change before and after that position. The direction of change is obtained by comparing the numerical differences between adjacent processes.
[0067] Finally, an anomaly triggering condition description is generated based on the assembly trajectory vector and problem location features. Specifically, each process in the assembly path is analyzed one by one. When a process simultaneously meets the conditions of a positional offset exceeding 5 pixels and a temperature gradient exceeding 15, that process is determined to be an anomaly triggering node. The 5 pixels are determined by statistically analyzing the allowable accuracy range of the assembly equipment.
[0068] S6 includes obtaining descriptions of abnormal triggering conditions and historical defect records, mapping the descriptions of abnormal triggering conditions to historical defect records to construct a defect feature matrix; generating a reverse tracing path set based on the defect feature matrix, calculating the matching degree score of the reverse tracing path set to output a sequence of suspected root cause nodes; clustering the suspected root cause node sequence to extract root cause link identifiers, retrieving a set of key process variables based on the root cause link identifiers; and filtering the set of key process variables to obtain the core control points of the solder joint assembly problem.
[0069] In the above implementation, the description of the abnormal triggering condition is first obtained. The description of the abnormal triggering condition includes the specific process node number, the corresponding assembly sequence position, the position offset value, and the temperature change value. The process node number is derived from the production process coding system, the assembly sequence position is determined by the process sequence in the process database, the position offset value is derived from the pixel offset calculated in the previous step, and the temperature change value is derived from the temperature sampling data during the reflow soldering process.
[0070] Simultaneously, historical defect records are acquired, each containing at least 1000 labeled data entries. Each record includes the process node number, corresponding position offset, temperature change, and the finally confirmed fault node identifier. The historical records are then formatted uniformly to ensure that the field order in each record is completely consistent with the description of the anomaly triggering conditions, thereby guaranteeing consistency in subsequent calculations.
[0071] In the process of mapping and constructing the defect feature matrix, the description of the abnormal triggering conditions is first transformed into a set of numerical sequences, arranged in the order of node number, position offset value, and temperature change value. Then, each historical defect record is traversed, and the corresponding field in each record is extracted and compared item by item with the abnormal triggering condition sequence. Specifically: a consistency check is performed on the node numbers, marking identical nodes as 0 and different nodes as 1; the difference in position offset values is calculated and its absolute value is taken; the difference in temperature change values is calculated and its absolute value is taken. These three types of results are arranged in order to form a row of feature data. The same processing is performed on all historical records, ultimately forming a defect feature matrix composed of multiple rows of data, where the number of rows equals the number of historical records, and the number of columns equals the number of feature items.
[0072] During the generation of the reverse tracing path set, starting from the current process node in the exception triggering condition, all process paths preceding that node are retrieved from the process database. Specifically, the process is traced back level by level according to process dependencies, forming a path branch for each process node traced back, until the starting process node is reached. Each path is numbered, and the sequence information of all nodes in the path is recorded, thus forming a complete reverse tracing path set.
[0073] In the path matching degree calculation process, each path in the path set is matched node by node. Specifically, for each node in the path, the corresponding node's feature data is found in the defect feature matrix, and the difference is calculated with the feature data in the anomaly triggering conditions. The difference in node number is assigned a value of 0 or 1, the difference in position offset is directly taken as a value, and the difference in temperature is directly taken as a value. Then, weights are assigned to each difference, where the weight of node number difference is set to 2, which is determined by analyzing the impact of node consistency on positioning accuracy; the weight of position offset difference is set to 1; and the weight of temperature difference is set to 1.5, which is determined by statistically analyzing the impact of temperature anomalies on welding quality. The weighted differences are accumulated to obtain the matching degree score of the path.
[0074] The matching scores of all paths were sorted, and the top 10 paths with the lowest scores were selected as candidate paths. This number of 10 was determined after repeatedly verifying the positioning accuracy in historical data to balance computational efficiency and accuracy. The nodes with the highest frequency in these paths were extracted and sorted from highest to lowest frequency to form a sequence of suspected root nodes.
[0075] In the clustering process of suspected root cause node sequences, the characteristic differences between any two nodes are first calculated. Specifically, the characteristic data corresponding to each node are compared item by item, the difference in position offset and temperature are calculated, and these are accumulated to obtain the numerical difference between nodes. When the difference value is less than 8, the two nodes are classified into the same category. This value of 8 is determined by statistically analyzing the characteristic fluctuation range of the same fault source node in different records. Through a stepwise merging method, all nodes are divided into several categories.
[0076] After the categories are determined, the number of nodes in each category is counted, and the category with the most nodes is selected as the target category. Within this category, the node with the highest frequency of occurrence is selected as the root cause identifier. This identifier represents the process node most likely to cause the current defect.
[0077] Subsequently, based on the root cause identifier, the corresponding key process variables are retrieved from the process database. Specifically, the process segment corresponding to the process node is located, and all parameter data for that process are extracted from the database, including equipment operating parameters, ambient temperature parameters, and operational parameters, which are derived from real-time data collected during the production process.
[0078] During the screening of key process variables, the degree of anomalousness is calculated for each variable. Specifically, the range of variation of the variable in historical normal records is obtained by statistically analyzing the maximum and minimum values of the variable in at least 500 normal records. Then, the difference between the variable in the current anomalous state and the normal range is calculated. When the difference exceeds the upper limit of the normal range, the variable is determined to be an anomalous variable. The same screening process is performed on all variables, and all anomalous variables are retained. Finally, the set of anomalous variables obtained from the screening is used as the core control point for the solder joint assembly problem.
[0079] S7 includes acquiring the root cause identification in the production process and classifying and marking the acquired original solder joint images according to the root cause identification; for the marked original solder joint images, calling a preset scanning frequency to adjust feature variables and extracting pixel distribution data reflecting the surface morphology of the solder joints; calculating the distribution deviation between the solder joint area and the background area based on the pixel distribution data; if the distribution deviation exceeds a preset range, correcting the gain value in the feature variables and identifying the contrast imbalance state based on the corrected gain value; optimizing the threshold weight in the detection logic for the contrast imbalance state, obtaining the solder joint anomaly judgment result through multi-dimensional feature fusion, and matching the solder joint anomaly judgment result with the distribution deviation to determine the final solder joint anomaly judgment standard.
[0080] In the above implementation, the root cause identifier in the production process is first obtained. This identifier is the specific process node number determined in the preceding steps, and this number comes from the process flow coding table in the production system. Based on this identifier, the collected raw solder joint images are classified according to their respective processes. Specifically, the process information corresponding to each solder joint image is read one by one, images with the same process number are grouped into the same category, and a corresponding tag field is added to the image data, thereby forming an image set with process tags.
[0081] After classification and labeling, each type of image undergoes uniform preprocessing. Specifically, the image size is adjusted to 64×64 pixels, determined by statistically analyzing the effective area range of at least 500 solder joint images. Subsequently, the image brightness is normalized by calculating the average brightness of 4096 pixels and shifting the brightness of each pixel towards this average value to ensure that the overall brightness distribution is within a stable range, controlled within ±20, which is determined by statistically analyzing brightness fluctuations under different lighting conditions.
[0082] The image is then scanned using a feature variable adjusted by the scanning frequency. Specifically, the scanning interval is set to 2 pixels, meaning a sampling point is selected every 2 pixels in both the horizontal and vertical directions. This interval was determined after multiple comparative tests on detection accuracy and processing efficiency, ensuring that the number of sampling points is kept below 1024. The image is traversed row by row and column by column according to this scanning method, and the brightness value of each sampling point is recorded, forming a pixel distribution data sequence in spatial order.
[0083] After extracting the pixel distribution data, the solder joint area and the background area are divided. Specifically, the solder joint area is formed by extending 20 pixels outwards from the image center coordinates. This range is determined by statistically analyzing the maximum size of the solder joints and adding boundary redundancy. The remaining area is defined as the background area. The sampling points in both the solder joint area and the background area are statistically analyzed, and their average brightness values are calculated. The average value is obtained by summing the brightness values of all sampling points in the area and dividing by the number of sampling points. Then, the distribution deviation between the solder joint area and the background area is calculated, specifically the absolute value of the difference between their average brightness values. A distribution deviation threshold of 25 is set. This value is determined by statistically analyzing the maximum stable range of regional brightness differences among at least 800 normal solder joint samples, with a safety margin of 5 added. When the calculated distribution deviation is greater than 25, the current feature extraction is considered to have deviated.
[0084] If the distribution deviation exceeds 25, the gain value in the feature variables is adjusted. Specifically, based on the current gain value, it is adjusted incrementally by 10 increments. The adjustment direction is determined by the direction of the distribution deviation; that is, when the brightness of the solder joint area is significantly higher than the background area, the gain value is decreased, and when it is lower than the background area, the gain value is increased. This 10 adjustment ratio is determined through multiple rounds of testing to ensure the stability of the adjustment process. After each adjustment, the scanning and distribution deviation calculation steps are re-executed until the distribution deviation falls back to within 25.
[0085] After adjusting the gain value, the contrast imbalance state within the solder joint area is identified. Specifically, the solder joint area is divided into several 8×8 pixel sub-regions. This division method is determined based on the solder joint size and local feature analysis requirements. The average brightness value of each sub-region is calculated, and the brightness difference between adjacent sub-regions is calculated. When the difference exceeds 15, it is judged as a local imbalance. This value of 15 is determined by statistically analyzing the local brightness difference distribution of normal solder joints. The number of local imbalances in all sub-regions is counted. When the number exceeds one-third of the total number of sub-regions, it is judged as an overall contrast imbalance state.
[0086] To address the identified contrast imbalance, the threshold weights in the detection logic are optimized. Specifically, weights are assigned to each feature involved in the judgment, with the distribution deviation weight set to 2 (determined by analyzing its impact on anomaly detection accuracy), the local brightness difference weight set to 1.5, and the edge continuity weight set to 1. Each feature value is multiplied by its corresponding weight and then summed to obtain the comprehensive judgment value.
[0087] During the comprehensive judgment process, this value is compared with a preset judgment interval. The judgment interval is determined by statistically analyzing the comprehensive value distribution of no less than 1000 samples, with its upper limit being the maximum value among normal samples, plus 5 as the judgment boundary. When the comprehensive value exceeds this upper limit, it is judged as an abnormal solder joint; otherwise, it is judged as a normal solder joint.
[0088] Finally, the consistency between the solder joint anomaly judgment results and the distribution deviation results is verified. Specifically: when both are judged as anomalies, the current combination of feature parameters is used as the valid judgment standard; when there is a discrepancy, the weights are fine-tuned, with an adjustment range of 5. This value is determined through multiple rounds of verification to be the smallest adjustment unit that does not affect overall stability, and the above calculation process is repeated until the judgment results are consistent. A stable solder joint anomaly judgment standard is thus obtained, which serves as a unified judgment basis for subsequent inspection processes.
[0089] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for positioning and assembly quality inspection of voltage cabinet components based on image matching, characterized in that, include: S1. Collect images of the voltage cabinet assembly from the production line in real time. Based on the preset component standard template, perform overall matching of the images to determine the installation area and spatial position offset information of the voltage cabinet assembly in the image. Perform resolution scanning on the surface features and geometric contours of the solder points in the image. Extract the pixel distribution deviation and edge contour anomalies of the solder points through pixel-level segmentation technology to obtain a preliminary feature description set. S2. Based on the feature description set, analyze the color depth differences and texture inconsistencies in the solder joint images, and compare them with the preset solder joint standard template. If the regional comparison imbalance exceeds the preset threshold, it is judged as an abnormal solder joint image, and the abnormal image subset is determined. S3. For the subset of abnormal images, extract the defect shape features and spatial position offset, and combine them with local density anomaly data to generate a solder joint defect pattern description, which is used to locate potential problems in the component assembly process. S4. By describing the solder joint defect pattern, compare it with the preset component process flow code and standard operating procedure. If the matching degree of the defect association rule is higher than the preset threshold, then determine the specific problem type as solder joint position offset or poor contact. S5. Based on the determined solder joint position offset or poor contact problem, and combined with the process dependency relationship and problem location parameters in the process database, generate an abnormal trigger condition description for the component assembly process, and determine the specific process node where the problem occurred.
2. The method for positioning and assembly quality inspection of voltage cabinet components based on image matching according to claim 1, characterized in that: S1 includes: Obtain the assembly image of the voltage cabinet components and the preset component standard template, and calculate the spatial mapping relationship data between the assembly image and the component standard template; Based on the spatial mapping relationship data, the geometric deformation parameters are analyzed, and the spatial position offset of the component is quantified. The spatial position offset values are used to correct and resample the points of interest to obtain the surface features and geometric contour data of the weld joints. The surface features and geometric contour data of the weld points are segmented at the pixel level to extract pixel distribution deviations and edge contour anomalies, generating a preliminary feature description set.
3. The method for positioning and assembly quality inspection of voltage cabinet components based on image matching according to claim 1, characterized in that: S2 includes: Acquire images of the solder joints to be inspected and extract color depth data and texture feature distribution data; Based on color depth data and texture feature distribution data, combined with a preset solder joint standard template, the region is divided to obtain the local region to be tested and the corresponding standard local region. The difference between the local region to be tested and the standard local region is calculated to generate a regional difference feature vector, and then aggregated to obtain the regional contrast imbalance value. If the regional contrast imbalance value exceeds the preset imbalance judgment threshold, an abnormal image subset is identified.
4. The method for positioning and assembly quality inspection of voltage cabinet components based on image matching according to claim 1, characterized in that: S3 includes: Obtain the defect contours extracted from a subset of abnormal images, and calculate the geometric features and spatial position offset vectors based on the defect contours; A local detection window is defined based on the spatial location offset vector, and local density anomaly data is extracted from the local detection window; A weld joint defect pattern description is generated by combining geometric features, spatial position offset vectors, and local density anomaly data. The solder joint defect pattern description is matched with historical fault records to locate the source of the fault in the component assembly process that caused the defect.
5. The method for positioning and assembly quality inspection of voltage cabinet components based on image matching according to claim 1, characterized in that: S4 includes: Acquire optical image data of the solder joint area and component process flow code to generate a set of defect morphology features; Based on the defect morphology feature set and the standard operation specification text corresponding to the component process flow code, dynamic defect association rules are constructed. Calculate the feature matching degree between dynamic defect association rules and historical fault model library, and lock the target reference object when the feature matching degree is higher than a preset threshold; Analyze the spatial topology properties of the target reference object, and determine the specific problem type of solder joint position offset or poor contact based on the spatial topology properties.
6. The method for positioning and assembly quality inspection of voltage cabinet components based on image matching according to claim 1, characterized in that: S5 includes: The solder joint position offset and poor contact status are obtained, and the chip coordinate deviation in the solder joint position offset and the solder paste printing thickness in the poor contact status are extracted by principal component analysis. Based on the chip placement coordinate deviation and solder paste printing thickness, the process database is queried to extract the process dependencies corresponding to the chip placement coordinate deviation and the reflow soldering temperature gradient corresponding to the solder paste printing thickness. If the reflow soldering temperature gradient exceeds the preset threshold, the support vector machine algorithm is used to classify the process dependencies in order to extract the assembly trajectory vector and problem location features. Based on the assembly trajectory vector and the problem location features, an abnormal triggering condition description for the component assembly process is generated to determine the specific process node where the problem occurs.
7. The method for positioning and assembly quality inspection of voltage cabinet components based on image matching according to claim 1, characterized in that, It also includes S6, which uses descriptions of abnormal triggering conditions and historical defect records to trace abnormal steps in the component assembly process, uses matching priority rules to identify the root cause step, and obtains the core control points of solder joint assembly problems, specifically including: Obtain descriptions of abnormal triggering conditions and historical defect records, and map the descriptions of abnormal triggering conditions to historical defect records to construct a defect feature matrix; A reverse tracing path set is generated based on the defect feature matrix, and the matching score of the reverse tracing path set is calculated to output the suspected root cause node sequence.
8. The method for positioning and assembly quality inspection of voltage cabinet components based on image matching according to claim 7, characterized in that: S6 further includes: Cluster the suspected root cause node sequences to extract root cause link identifiers, and retrieve the key process variable set based on the root cause link identifiers; The key process variable set is filtered to identify the core control points for solder joint assembly problems.
9. The method for positioning and assembly quality inspection of voltage cabinet components based on image matching according to claim 7, characterized in that, It also includes S7, which adjusts the feature extraction parameters of solder joint image scanning based on the root cause identification, optimizes the detection logic for pixel distribution deviation and regional contrast imbalance, and obtains the solder joint anomaly judgment criteria, specifically including: Obtain the root cause identification in the production process, and classify and label the collected raw solder joint images according to the root cause identification; For the marked original solder joint image, the feature variables are adjusted by calling the preset scanning frequency, and pixel distribution data reflecting the surface morphology of the solder joint is extracted.
10. The method for positioning and assembly quality inspection of voltage cabinet components based on image matching according to claim 9, characterized in that: The S7 also includes: The distribution deviation between the solder joint area and the background area is calculated based on the pixel distribution data. If the distribution deviation exceeds the preset range, the gain value in the feature variables is corrected, and the imbalance state is identified based on the corrected gain value. To optimize the threshold weight in the detection logic for the imbalanced state, the solder joint anomaly judgment result is obtained through multi-dimensional feature fusion, and the solder joint anomaly judgment result is matched with the distribution deviation to determine the final solder joint anomaly judgment standard.