A method for intelligent identification of microcracks in weld defects based on intelligent visual recognition technology

By employing an intelligent visual recognition method that integrates multi-dimensional feature fusion and continuous temporal dynamic tracking, and combining a thermal diffusion model to verify the physical temperature rise characteristics of abnormal areas, this method solves the problems of missed detection and false detection in traditional methods for detecting microcracks in welds, and achieves high-precision identification of microcracks in welds.

CN120765605BActive Publication Date: 2026-03-06JUXIN ELECTRONICS TECH MEIZHOU CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510909001.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2026-03-06
Estimated Expiration
2045-07-02

AI Technical Summary

Technical Problem

When detecting microcracks in circuits, existing technologies, such as traditional convolutional neural networks, have limited observation range and insufficient low-level feature extraction capabilities, resulting in high rates of missed and false detections. Furthermore, they struggle to distinguish between defects and background noise and lack dynamic calibration mechanisms.

Method used

An intelligent visual recognition method using multi-dimensional feature fusion and continuous temporal dynamic tracking is adopted. Image details are enhanced by two-dimensional discrete cosine transform, and the physical temperature rise characteristics of abnormal areas are verified by combining a thermal diffusion model. A thermal diffusion model of solder joints is constructed to analyze temperature rise distribution data, thereby reducing the false detection rate and improving detection accuracy.

Benefits of technology

It significantly improves the detection accuracy of microcracks in poor welds, reduces the false detection rate, and ensures the accuracy and scientific nature of the final judgment results through multi-dimensional feature fusion and continuous time-series dynamic tracking and analysis mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120765605B_ABST
    Figure CN120765605B_ABST
Patent Text Reader

Abstract

This application relates to an intelligent method for identifying microcracks in weld joints based on intelligent visual recognition technology. The method includes: acquiring an initial RGB image of the weld joint to be detected; performing a two-dimensional discrete cosine transform and an inverse two-dimensional discrete cosine transform on the initial RGB image to obtain an enhanced image; fusing the enhanced image with the R channel of the initial RGB image to form a dual-channel feature map; calculating the phase consistency of the dual-channel feature map and obtaining suspected candidate regions for microcracks in weld joints using an adaptive threshold segmentation method; acquiring a continuous temporal sequence of RGB images of the weld joint and performing anomaly detection to obtain a set of abnormal regions; constructing a heat diffusion model for the weld joint, inputting the geometric parameters and environmental parameters from the set of abnormal regions into the heat diffusion model to obtain the final identification result of the microcracks in weld joints. This application significantly improves the detection accuracy of microcracks in weld joints and reduces the false detection rate through multi-dimensional feature fusion and continuous temporal dynamic tracking, resulting in a more accurate final identification result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial testing technology, specifically to an intelligent method for identifying microcracks in weld lines based on intelligent visual recognition technology. Background Technology

[0002] The intelligent identification method for poor solder joints and microcracks is a technical solution based on intelligent visual recognition technology. It uses an industrial camera to collect images of solder joints in circuits and applies algorithms such as image processing, feature extraction, and machine learning to automatically detect solder joints that simultaneously contain poor solder joints (poor contact) and microcracks (tiny cracks, usually less than 0.1 mm in size).

[0003] Currently, traditional convolutional neural networks are prone to missing detections of minute cracks in circuits due to limited observation range or insufficient low-level feature extraction capabilities. In industrial scenarios, solder joint areas may be subject to interference such as reflections, flux residues, and circuit board textures, making it difficult for existing algorithms to effectively distinguish between defects and background noise, resulting in a high false detection rate. Factors such as changes in illumination intensity, camera viewpoint shifts, or differences in solder joint morphology can cause shifts in image feature distribution, and existing algorithms lack dynamic calibration mechanisms, requiring manual parameter readjustment or model retraining. Summary of the Invention

[0004] To address the problems existing in the prior art, this application aims to provide an intelligent method for identifying microcracks in weld lines based on intelligent visual recognition technology. This method significantly improves the detection accuracy and reduces the false detection rate of microcracks in weld lines through multi-dimensional feature fusion and continuous temporal dynamic tracking. Furthermore, by combining a thermal diffusion model to verify the physical temperature rise characteristics of abnormal areas, the final identification result is more accurate.

[0005] The present application describes a method for intelligently identifying microcracks in weld lines based on intelligent visual recognition technology, comprising the following steps:

[0006] S1. Acquire the initial RGB image of the solder joint to be detected, perform two-dimensional discrete cosine transform and inverse two-dimensional discrete cosine transform on the initial RGB image to obtain an enhanced image, and fuse the enhanced image with the R channel of the initial RGB image to form a dual-channel feature map;

[0007] S2. Calculate the phase consistency of the dual-channel feature map to obtain edge position information, extract texture feature information by combining local binary mode, and obtain the suspected candidate region of the poor weld microcrack by using an adaptive threshold segmentation method.

[0008] S3. Collect RGB image sequences of solder joints in a continuous time sequence, perform cross-frame position tracking on the suspected candidate regions in adjacent frames to form associated regions, calculate the optical flow features of the associated regions, and fuse them with the edge position information and the texture feature information to form a multi-dimensional feature vector, and perform anomaly detection to obtain an abnormal region set.

[0009] S4. Construct a solder joint heat diffusion model. Input the geometric parameters and environmental parameters in the abnormal region set into the solder joint heat diffusion model to obtain the temperature rise distribution data of each abnormal region under welding and power-on conditions. Analyze the temperature rise distribution data to obtain the final judgment result of the false weld microcrack.

[0010] Preferably, step S1 specifically includes:

[0011] A color image is acquired of the solder joint to be inspected to obtain an initial RGB image including the solder joint and the surrounding area. The brightness of each pixel in the initial RGB image is calculated to generate a brightness channel image of the same size as the initial RGB image.

[0012] The brightness channel image is transformed from the spatial domain to the frequency domain by two-dimensional discrete cosine transform to obtain a frequency domain coefficient matrix including low-frequency and high-frequency components.

[0013] The high-frequency components in the frequency domain coefficient matrix are subjected to bandpass filtering to obtain the filtered frequency domain coefficient matrix. The filtered frequency domain coefficient matrix is ​​then transformed from the frequency domain to the spatial domain by inverse two-dimensional discrete cosine transform to obtain the enhanced image.

[0014] The low-frequency component represents the global structural features of the image, while the high-frequency component represents the local detail features of the image.

[0015] Preferably, step S1 further includes:

[0016] The weight of the enhanced image is set to α1, and the weight of the R channel in the initial RGB image is set to α2, satisfying α1+α2=1;

[0017] According to the set weights, the weighted sum of each pixel at the corresponding position of the R channel in the enhanced image and the initial RGB image is calculated to obtain the gray value of each pixel.

[0018] The grayscale values ​​of each pixel are arranged point by point according to the spatial position of the enhanced image to obtain a single-channel grayscale image after pixel-level weighted fusion.

[0019] Using the single-channel grayscale image as the first channel image and the R channel of the initial RGB image as the second channel image, the first channel image and the second channel image are combined using a tensor stacking method to form a dual-channel feature map.

[0020] Preferably, step S2 specifically includes:

[0021] The dual-channel feature map is convolved by a multi-scale, multi-directional Gabor filter to obtain complex responses at different scales and directions, and the local energy is calculated based on the complex responses to obtain a phase consistency map.

[0022] Non-maximum suppression is applied to the phase consistency map, and binarization is performed using a preset phase consistency threshold to obtain an edge position binary map. Solder joint edge position information is then extracted from the edge position binary map.

[0023] Define a neighborhood around each pixel, compare the gray values ​​of pixels in the neighborhood with the center pixel, and calculate the local binary mode value.

[0024] The local binary pattern values ​​are uniformly filtered to retain valid texture points and generate a local binary pattern feature map;

[0025] The local binary pattern feature map is statistically analyzed using a histogram, divided into multiple intervals, and the frequency distribution of each interval is calculated to obtain the texture feature vector.

[0026] Preferably, step S2 further includes:

[0027] The dual-channel feature map is divided into several non-overlapping sub-regions. The mean gray level, standard deviation, and texture complexity based on the texture feature vector are calculated for each sub-region. An adaptive threshold for each sub-region is also calculated.

[0028] Combining the phase consistency map, the local binary mode feature map, and the adaptive threshold, the dual-channel feature map is subjected to multi-feature fusion binarization segmentation to obtain a defect candidate binary map. The defect candidate binary map is then subjected to noise removal and small hole filling to finally obtain the suspected candidate region of the weld microcrack.

[0029] Preferably, step S3 specifically includes:

[0030] A continuous time-series RGB image sequence of the solder joint surface is acquired, and grayscale conversion and Gaussian filtering methods are used to preprocess the continuous time-series RGB image sequence to obtain a grayscale image sequence;

[0031] The suspected candidate regions are matched against adjacent frames to calculate the region overlap and establish cross-frame correspondence to obtain the candidate region trajectory.

[0032] The adjacent frames covered by the candidate region trajectory are obtained. The grayscale image sequence is used as input. The dense optical flow estimation algorithm is used to calculate the displacement of each pixel in the connected region corresponding to the same candidate region trajectory in the adjacent frames to obtain the pixel displacement field.

[0033] The optical flow feature vector is obtained by statistically analyzing the average amplitude and direction distribution of all optical flow vectors in the pixel displacement field.

[0034] Preferably, step S3 further includes:

[0035] The edge pixel ratio of the suspected candidate region is extracted from the binary map of the edge location, the region texture complexity is calculated by combining the local binary mode feature map, and the optical flow feature vector is fused to form a multi-dimensional feature vector containing edge structure, texture attributes and temporal motion information.

[0036] The multidimensional feature vector is input into the isolated forest algorithm to calculate the anomaly score of the candidate region trajectory, and a set of anomaly scores arranged in frame order is generated for each of the suspected candidate region trajectories to form an anomaly score sequence.

[0037] Calculate the standard deviation of anomaly score sequences for the same suspected candidate region trajectory in multiple consecutive frames;

[0038] If the calculated standard deviation is less than the preset standard deviation threshold, it indicates that the abnormal situation occurs stably in multiple frames, is determined to be a real defect, and all regions determined to be real defects are collected to form an abnormal region set.

[0039] If the calculated standard deviation is greater than or equal to the preset standard deviation threshold, it indicates that the abnormal situation does not occur stably in multiple frames and is judged as a non-real defect.

[0040] Preferably, step S4 specifically includes:

[0041] The physical property data of the solder joint material are obtained, including the thermal conductivity, density, specific heat capacity and coefficient of thermal expansion of the solder joint material. The geometric feature data of the solder joints in the abnormal region set are extracted, including the solder joint area, solder joint perimeter, solder joint thickness and three-dimensional coordinates of the solder joint.

[0042] Collect environmental parameter data of the welding environment, including ambient temperature, convective heat transfer coefficient and emissivity, and calculate heat dissipation condition data;

[0043] Based on the Fourier heat conduction equation, the three-dimensional space of the weld joint is discretized using the finite element method, and the heat conduction process, heat convection process and heat radiation process are defined to construct a heat diffusion model of the weld joint for simulating temperature changes under welding and energized conditions.

[0044] The physical property data, weld point geometric feature data, environmental parameter data, and heat dissipation condition data of each abnormal region in the abnormal region set are input into the weld point thermal diffusion model to obtain the temperature rise distribution data of each abnormal region under welding and power-on conditions.

[0045] Preferably, step S4 further includes:

[0046] Set a temperature rise threshold, obtain the temperature rise value in the temperature rise distribution data of each abnormal region, and combine the geometric feature data of the solder joint corresponding to the abnormal region and the binary map of the edge position to analyze each abnormal region in the abnormal region set.

[0047] If the area of ​​the solder joint is greater than 2mm 2 If the following conditions are met: the solder joint thickness is <0.3mm, the temperature rise value is ≥ the temperature rise threshold, and the length of the edge fracture in the binary image of the edge position is >30% of the solder joint perimeter, then it is determined that there is a microcrack in the weld in the abnormal area.

[0048] If the area of ​​the solder joint is greater than 2mm 2 If any one of the following conditions is not met: solder joint thickness < 0.3 mm, temperature rise value ≥ the temperature rise threshold, or the length of edge fracture in the binary image of the edge position > 30% of the solder joint perimeter, then it is determined that there are no microcracks in the abnormal area.

[0049] Preferably, step S4 further includes:

[0050] By integrating data visualization technology with structured text, a visualized discrimination report is generated, which includes a three-dimensional coordinate annotation map of abnormal areas, geometric feature data of weld points, chromatogram of temperature rise distribution, edge fracture analysis map, and discrimination results of microcracks in cold welds.

[0051] The intelligent identification method for microcracks in weld defects based on intelligent visual recognition technology described in this application has the following advantages:

[0052] This application presents an intelligent method for identifying microcracks in weld joints based on intelligent visual recognition technology. This method enhances image details through two-dimensional discrete cosine transform and inverse transform, and combines the R-channel information of the initial RGB image to form a dual-channel feature map. This preserves the texture enhancement information of the image while integrating the original features of the color channels, providing richer input data for subsequent analysis. By extracting phase consistency edge features, texture features, and optical flow features, and fusing them into a multi-dimensional feature vector, the complementary nature of multi-dimensional information reduces the limitations of single features and significantly improves the accuracy of identifying microcracks in weld joints. Through cross-frame position tracking and optical flow feature calculation of continuous temporal images, combined with suspected candidate regions detected in a single frame, it can effectively distinguish between real microcracks and single-frame noise interference. The dynamic analysis mechanism significantly reduces the probability of false detection. Furthermore, by introducing a weld joint thermal diffusion model and inputting the geometric and environmental parameters of the abnormal region into the model, and by analyzing the temperature rise distribution data, the authenticity of the abnormal region is verified from a physical mechanism perspective, making the final identification result more scientifically based. The intelligent identification method for microcracks in welds based on intelligent visual recognition technology significantly improves the detection accuracy of microcracks in welds and reduces the false detection rate through multi-dimensional feature fusion and continuous time-series dynamic tracking. At the same time, it combines a thermal diffusion model to verify the physical temperature rise characteristics of abnormal areas, making the final identification results more accurate. Attached Figure Description

[0053] Figure 1 This is a flowchart of a method for intelligently identifying microcracks in welds based on intelligent visual recognition technology, as described in this application. Detailed Implementation

[0054] like Figure 1 As shown, the intelligent identification method for microcracks in weld lines based on intelligent visual recognition technology described in this application includes the following steps:

[0055] S1. Acquire the initial RGB image of the solder joint to be inspected, perform two-dimensional discrete cosine transform and inverse two-dimensional discrete cosine transform on the initial RGB image to obtain an enhanced image, and fuse the enhanced image with the R channel of the initial RGB image to form a dual-channel feature map; RGB image is an image mode that presents rich colors by superimposing the red, green and blue color channels.

[0056] S2. Calculate the phase consistency of the dual-channel feature map to obtain edge position information, extract texture feature information by combining local binary mode, and obtain the suspected candidate region of the poor weld microcrack by using an adaptive threshold segmentation method.

[0057] S3. Collect RGB image sequences of solder joints in a continuous time sequence, perform cross-frame position tracking on suspected candidate regions in adjacent frames to form associated regions, calculate the optical flow features of associated regions, and fuse them with edge position information and texture feature information into a multi-dimensional feature vector to perform anomaly detection and obtain an abnormal region set.

[0058] S4. Construct a weld joint heat diffusion model. Input the geometric parameters and environmental parameters in the abnormal region set into the weld joint heat diffusion model to obtain the temperature rise distribution data of each abnormal region under welding and power-on conditions. Analyze the temperature rise distribution data to obtain the final judgment result of the false weld microcrack.

[0059] A cold solder joint with microcracks is a welding defect that combines the characteristics of both a cold solder joint and microcracks. Specifically, a cold solder joint refers to a solder joint where only a small amount of solder is present, appearing connected but the metal is not completely fused. This results in problems such as high contact resistance and low mechanical strength, causing the circuit to be in an unstable state of intermittent continuity. Microcracks, on the other hand, refer to tiny cracks that exist inside or on the surface of the material, which may be caused by stress concentration, thermal fatigue, material defects, etc. In welding, cold solder joints and microcracks can coexist. For example, an initial poor solder joint may be caused by improper welding process. In subsequent processes, due to factors such as temperature changes and mechanical stress, microcracks may be further induced at or near the cold solder joint, thus forming a cold solder joint with microcracks.

[0060] Furthermore, in this embodiment, step S1 specifically includes:

[0061] A color image is acquired of the solder joint to be inspected to obtain an initial RGB image including the solder joint and the surrounding area. The brightness of each pixel in the initial RGB image is calculated to generate a brightness channel image of the same size as the initial RGB image.

[0062] The luminance channel image is transformed from the spatial domain to the frequency domain by using two-dimensional discrete cosine transform to obtain a frequency domain coefficient matrix that includes low-frequency and high-frequency components.

[0063] The high-frequency components in the frequency domain coefficient matrix are subjected to bandpass filtering to obtain the filtered frequency domain coefficient matrix. The filtered frequency domain coefficient matrix is ​​then transformed from the frequency domain to the spatial domain by inverse two-dimensional discrete cosine transform to obtain the enhanced image. The bandpass filtering process filters the high-frequency components by using bandpass filtering rules to retain high-frequency signals that can reflect defects and suppress background noise and irrelevant low-frequency information. The bandpass filtering rules are based on the frequency filtering range defined by the typical size of the solder joint defect.

[0064] Among them, the low-frequency components represent the global structural features of the image; the high-frequency components represent the local detail features of the image.

[0065] Global structural features include overall brightness distribution, the outline of large uniform areas (such as the basic shape of the solder joint), and the main structure with slowly changing pixel values, reflecting the basic framework and global shape of the image.

[0066] Local detail features include edge contours (e.g., the boundary between solder joints and the substrate), texture details (e.g., the micro-textures on the metal surface), microcracks (e.g., pixel abrupt change regions at defects), and local structures with abrupt changes in pixel values, reflecting subtle differences and local abrupt changes in the image.

[0067] Furthermore, in this embodiment, step S1 further includes:

[0068] Set the weight of the enhanced image to α1, and the weight of the R channel in the initial RGB image to α2, satisfying α1+α2=1; the value of α1 is 60%~80%, and the value of α2 is 20%~40%, which must satisfy α1+α2=1;

[0069] Based on the set weights, the weighted sum of each pixel at the corresponding position of the R channel in the enhanced image and the initial RGB image is calculated to obtain the gray value of each pixel.

[0070] The grayscale values ​​of each pixel are arranged point by point according to the spatial location of the enhanced image to obtain a single-channel grayscale image after pixel-level weighted fusion.

[0071] Using a single-channel grayscale image as the first channel image and the R channel of the initial RGB image as the second channel image, the first channel image and the second channel image are combined by tensor stacking to form a dual-channel feature map.

[0072] Step S1 is illustrated below:

[0073] Color images of the solder joints to be inspected are acquired to obtain an initial RGB image with a size of 300×300 pixels, covering the solder joints and surrounding areas;

[0074] The brightness of each pixel is calculated according to the brightness calculation rules (formula: Y=0.299R+0.587G+0.114B), generating a brightness channel image of the same 300×300 pixels;

[0075] Perform a two-dimensional discrete cosine transform on the luminance channel image to transform it from the spatial domain (an intuitive image of pixel arrangement) to the frequency domain (characteristics described by frequency coefficients), resulting in a frequency domain coefficient matrix containing low-frequency and high-frequency components.

[0076] Low-frequency components: correspond to the global structure of the image (e.g., the overall outline of the solder joint, a large area of ​​uniform brightness, and slowly changing pixel values);

[0077] High-frequency components: correspond to local details in the image (e.g., pixel abrupt changes at the interface between solder joints and substrate, microcracks, and sharp changes in pixel values).

[0078] Based on the typical size of solder joint defects, define bandpass filtering rules (i.e., filter frequency range f1 to f2, for example f1 = 10, f2 = 30);

[0079] Suppress irrelevant low frequencies below f1 (which belong to the global structure and do not require enhancement) and background noise above f2 (which are meaningless interference) to obtain the filtered frequency domain coefficient matrix.

[0080] The filtered frequency domain coefficient matrix is ​​subjected to an inverse two-dimensional discrete cosine transform to convert it from the frequency domain back to the spatial domain, resulting in an enhanced image. Because only the high-frequency signals related to the microcracks are retained and noise and irrelevant low frequencies are suppressed, the local details such as microcracks and edge contours in the enhanced image are highlighted and enhanced, making them easier to identify.

[0081] Set the weight of the enhanced image α1 = 70%, and the weight of the R channel in the initial RGB image α2 = 30%, satisfying α1 + α2 = 1;

[0082] For the R channels of the enhanced image and the initial RGB image, a weighted sum is calculated pixel by pixel. For example, if the brightness value of a pixel in the enhanced image is 150 and the corresponding pixel value in the R channel is 100, then the grayscale value after fusion is 150×0.7+100×0.3=135, resulting in a single-channel grayscale image of 300×300 pixels. This grayscale image is used as the first channel, and the R channel of the initial RGB image is used as the second channel. Through tensor stacking (channel dimension splicing), a dual-channel feature map (size 300×300×2) is formed for subsequent defect detection analysis.

[0083] Furthermore, in this embodiment, step S2 specifically includes:

[0084] By convolving the dual-channel feature map with a multi-scale, multi-directional Gabor filter, complex responses at different scales and directions are obtained. Local energy is then calculated based on the complex responses to obtain a phase consistency map. The Gabor filter is essentially a bandpass filter, with its scale corresponding to the "feature size" (small scale is sensitive to fine textures, large scale is sensitive to wide edges), and its direction corresponding to the "feature orientation" (the possible extension angle of the covered defects). The complex response simultaneously preserves both amplitude (energy strength) and phase (signal alignment). The phase consistency map is obtained by calculating the local energy based on the complex response.

[0085] Phase consistency is based on the idea that "signals with phase alignment at multiple scales / directions are more likely to be true features." Defect edges, microcracks, and other structures will produce phase-synchronized responses in Gabor filtering at multiple scales / directions. After local energy superposition, these true features are highlighted and random noise (noise phase is random and energy is dispersed) is suppressed.

[0086] Non-maximum suppression is applied to the phase consistency map, and binarization is performed using a preset phase consistency threshold to obtain a binary map of edge positions. The edge position information of the solder joint is extracted from the binary map of edge positions. Here, the edge is the region of local maximum gradient. Non-maximum suppression compares the response values ​​of a pixel with its gradient direction neighboring points, retaining only the peak points and eliminating the "pseudo-response" around the edge, making the edge thinner to a single pixel width, thus improving the subsequent positioning accuracy. The edge of the solder joint is an important spatial constraint for defects (defects usually appear at the solder joint boundary or at internal texture anomalies). Extracting the edge position can narrow the effective range of subsequent defect detection and reduce irrelevant calculations.

[0087] For each pixel, a neighborhood is defined as the center. The gray values ​​of the pixels in the neighborhood are compared with those of the center pixel to calculate the local binary mode value. The method for calculating the local binary mode value is as follows: a neighborhood (e.g., a common 3×3 neighborhood) is defined with the target pixel as the center. The gray value of each pixel in the neighborhood is compared with that of the center pixel. If the gray value of a neighboring pixel is greater than that of the center pixel, the position is marked as 1; otherwise, it is marked as 0. These 0s and 1s are arranged into a binary number in a fixed order (e.g., clockwise or counterclockwise). The binary number is then converted to decimal. The resulting value is the local binary mode value of the center pixel.

[0088] Uniform filtering is performed on local binary pattern values ​​to retain valid texture points and generate local binary pattern feature maps;

[0089] Histogram statistics are performed on the local binary pattern feature map to divide it into multiple intervals, and the frequency distribution of each interval is calculated to obtain the texture feature vector.

[0090] Furthermore, in this embodiment, step S2 also includes:

[0091] The dual-channel feature map is divided into several non-overlapping sub-regions. The mean gray level, standard deviation, and texture complexity based on the texture feature vector are calculated for each sub-region. An adaptive threshold is also calculated for each sub-region. The brightness (mean gray level, standard deviation) and texture (complexity) of different sub-regions vary (defective areas are usually darker / brighter and have more complex textures). The adaptive threshold is dynamically adjusted according to the features of the sub-region itself. Compared with the global threshold, it can better adapt to local differences and avoid missed / false detections caused by uneven lighting and different regional characteristics.

[0092] By combining phase consistency map, local binary pattern feature map and adaptive threshold, multi-feature fusion binarization segmentation is performed on dual-channel feature map to obtain defect candidate binary map. Then, noise removal and small hole filling are performed on the defect candidate binary map to finally obtain the suspected candidate region of poor weld microcrack. Among them, morphological opening operation is used to remove noise from the defect candidate binary map, while morphological closing operation is used to fill small holes.

[0093] Step S2 is illustrated below:

[0094] Setting Gabor filter parameters:

[0095] Scale: Set to 3 scales (λ = 4, 8, 16 pixels) to cover fine cracks (small scale) to wide cracks (large scale);

[0096] Direction: Set to 4 directions (θ = 0°, 45°, 90°, 135°) to cover the possible extension directions of weld defects;

[0097] Other parameters: Gaussian standard deviation Ellipticity γ = 0.5, phase shift ψ = 0;

[0098] Where λ refers to the wavelength of the Gabor filter, that is, the period of the cosine function in the filter;

[0099] Using the multi-scale, multi-directional Gabor filter described above, the dual-channel feature map is convolved pixel by pixel to obtain the complex response (including amplitude and phase information) at each scale and direction.

[0100] For each pixel, the complex response of multiple scales and directions is substituted into the phase consistency formula (e.g., Kovesi algorithm) to calculate the local energy and phase consistency value, and generate a phase consistency map (e.g., the output size is still 500×600 pixels, the higher the value, the more likely it is to be a defect edge).

[0101] Iterate through each pixel in the phase consistency map, compare its phase consistency value with the "gradient direction adjacent pixels", retain only the local maximum value, and refine the edges to change the edges from "wide strips" to "single pixel lines".

[0102] Set the phase consistency threshold to 0.4, set the pixels with "phase consistency value ≥ 0.4" in the phase consistency map to 255 (white, edge), and set the pixels with "phase consistency value < 0.4" to 0 (black, background) to obtain the binary map of edge positions;

[0103] From the binary image of the edge location, select continuous edge pixels that surround the main body of the solder joint and mark them as the edge contour of the solder joint;

[0104] For each pixel, a 3×3 neighborhood is defined. For each pixel in the dual-channel feature map, the gray values ​​of its 3×3 neighborhood pixels are compared with those of the center pixel.

[0105] If the gray level of a neighboring pixel is greater than that of the center pixel, it is recorded as 1;

[0106] If the gray level of a neighboring pixel is less than or equal to that of the center pixel, it is recorded as 0.

[0107] Concatenate the 0 / 1 results of the 8 neighboring pixels in a clockwise order (e.g., starting from the top left corner) into a binary number (e.g., 10100110), then convert it to decimal to obtain the LBP value (range 0-255) of the center pixel.

[0108] For each LBP value, count its "0-1 transition count":

[0109] If the number of transitions is ≤2, it is determined to be a uniform mode (preserved, corresponding to the real texture);

[0110] If the number of transitions is greater than 2, it is determined to be a non-uniform mode (filtered, corresponding to noise);

[0111] Retain pixels in the uniform pattern to generate a local binary pattern feature map (500×600 pixels);

[0112] For the local binary mode feature map, a histogram of LBP values ​​is plotted, and the histogram is divided into 16 intervals (e.g., 0-15, 16-31…240-255). The frequency distribution of each interval is calculated (e.g., the local binary mode values ​​in interval 0-15 account for 12% of the total pixels), and a texture feature vector (a one-dimensional array of length 16, quantizing the global texture mode) is obtained.

[0113] The dual-channel feature map is divided into several 8×8 pixel sub-regions (the calculation result is rounded up, resulting in a total of 500 / 8×600 / 8=4688 sub-regions);

[0114] For each sub-region, calculate:

[0115] Gray-scale mean (the average brightness of all pixels within a sub-region);

[0116] Standard deviation (the degree of fluctuation in brightness within a sub-region);

[0117] Texture complexity (based on texture feature vectors, calculated using "entropy": Entropy = -∑p) i log2p i p i (representing the frequency of each interval in the texture feature vector);

[0118] For each sub-region, an adaptive threshold is calculated using the formula (e.g., T = mean + k × standard value, where k is adjusted according to texture complexity) by combining "grayscale mean + standard deviation + texture complexity". The threshold varies for different sub-regions to adapt to local features.

[0119] By combining the phase consistency map (edge ​​features, constraining the defect location), the local binary mode feature map (texture features, distinguishing defects from background textures) and the sub-region adaptive threshold (brightness features, adapting to local illumination), the dual-channel feature map is judged pixel by pixel: pixels that meet the conditions of "significant edge + abnormal texture + brightness exceeding the threshold" are marked as 255 (defect), otherwise they are marked as 0 (background), thus obtaining the candidate binary map of defects.

[0120] Noise removal: Perform morphological opening operation on the candidate binary image of defects (with the structuring element set to a 3×3 rectangle), first perform erosion (to eliminate isolated small noise points), and then perform dilation (to restore the defect contour);

[0121] Filling holes: Perform morphological closing operation (with the structuring element set to a 3×3 rectangle), first dilate (to fill small holes inside the defect), then erode (to maintain the size of the defect);

[0122] Finally, the suspected candidate areas for poor weld microcracks are obtained (e.g., white areas are suspected defects).

[0123] Furthermore, in this embodiment, step S3 specifically includes:

[0124] A continuous time-series RGB image sequence of the solder joint surface is acquired, and grayscale conversion and Gaussian filtering methods are used to preprocess the continuous time-series RGB image sequence to obtain a grayscale image sequence;

[0125] For suspected candidate regions, perform adjacent frame matching, calculate the region overlap, and establish cross-frame correspondence to obtain the candidate region trajectory; adjacent frame matching is performed between two consecutive frames of the image, using region overlap (e.g., intersection-over-union ratio). Determine the cross-frame correspondence of the same candidate region (if the overlap is higher than the threshold, such as 0.5, it is determined to be the same region);

[0126] Connect the positions of the same candidate region in consecutive frames in chronological order to form the candidate region trajectory (describe the temporal movement / positional change of the defect region);

[0127] Trajectory analysis can be used to analyze the stability of defect areas across multiple frames, distinguishing between real defects (stable location) and noise (random location).

[0128] The algorithm obtains adjacent frames covered by the candidate region trajectory, uses grayscale image sequences as input, and employs a dense optical flow estimation algorithm to calculate the displacement of each pixel within the connected region corresponding to the same candidate region trajectory in adjacent frames, thus obtaining the pixel displacement field. Dense optical flow calculates the displacement of each pixel in the image (unlike sparse optical flow, which only calculates feature points), and can reflect the region motion in more detail (e.g., the minute deformation of microcracks). The pixel displacement field outputs a two-dimensional displacement vector for each pixel.

[0129] The optical flow feature vector is obtained by statistically analyzing the average amplitude and direction distribution of all optical flow vectors in the pixel displacement field.

[0130] Furthermore, in this embodiment, step S3 also includes:

[0131] The edge pixel percentage of potential candidate regions is extracted from the binary image of the edge location. The region texture complexity is calculated by combining this with the local binary mode feature map, and an optical flow feature vector is fused to form a multi-dimensional feature vector containing edge structure, texture attributes, and temporal motion information. The optical flow feature vector includes:

[0132] Average amplitude: reflects the overall motion intensity of the area (actual defects may produce small but stable amplitudes due to thermal deformation and vibration);

[0133] Directional distribution: Histogram of statistical displacement directions (the movement direction of real defects is often consistent, such as unidirectional displacement caused by thermal expansion);

[0134] By supplementing the texture and edge features of static images with motion features, the accuracy of defect identification is improved (the motion pattern of the cold solder joint area is different from that of the normal solder joint).

[0135] The edge pixel ratio represents the "number of edge pixels / total number of pixels in the region" within the candidate area. Real defect edges are more complex and have a higher ratio.

[0136] Texture complexity is represented by the texture entropy (reflecting the diversity of texture patterns) calculated using local binary pattern feature maps. The texture entropy of defective regions is usually greater than that of normal regions.

[0137] Multidimensional fusion combines static features (edges, textures) with temporal features (optical flow) to construct a more comprehensive defect description;

[0138] The multidimensional feature vector is input into the isolated forest algorithm to calculate the anomaly score of the candidate region trajectory. A set of anomaly scores arranged in frame order is generated for each suspected candidate region trajectory to form an anomaly score sequence. Among them, the isolated forest is an unsupervised anomaly detection algorithm that isolates anomaly points by constructing random trees (the features of defective regions are very different from those of normal regions and are easy to isolate).

[0139] Anomaly score indicates that the higher the score, the more likely the region is to be an anomaly (defect). After being arranged in frame order, the stability of defects in time sequence can be analyzed.

[0140] Calculate the standard deviation of anomaly score sequences for the same suspected candidate region trajectory in multiple consecutive frames;

[0141] If the calculated standard deviation is less than the preset standard deviation threshold, it indicates that the abnormal situation occurs stably in multiple frames, is determined to be a real defect, and all regions determined to be real defects are collected to form an abnormal region set.

[0142] If the calculated standard deviation is greater than or equal to the preset standard deviation threshold, it indicates that the abnormal situation does not occur stably in multiple frames and is judged as a non-real defect.

[0143] Step S3 is illustrated below:

[0144] Acquire 20 consecutive frames of RGB images of the weld joint surface (frame rate 10fps; due to welding thermal deformation, vibration, etc., defects will have slight motion / texture changes in the time sequence).

[0145] Based on the edge location binary map, local binary pattern feature map, and suspected candidate regions obtained in step S2 (for example, there are 5 suspected regions in a certain frame, denoted as R1-R5);

[0146] For 20 consecutive frames of RGB images, a weighted average method (Y = 0.299R + 0.587G + 0.114B) is used to convert them into grayscale images, resulting in a grayscale image sequence (20 frames, with the same size as the original image, for example, 500×600 pixels).

[0147] For each frame of grayscale image, a 3×3 Gaussian kernel (standard deviation σ = 1) is used for filtering to suppress noise (e.g., sensor random noise, ambient light flicker), resulting in a denoised grayscale image sequence;

[0148] For two consecutive frames (e.g., frame t and frame t+1), calculate the overlap (cross-over-union ratio) of the suspected candidate regions Ri, i = 1, 2, 3, 4, 5;

[0149] For example, the threshold IoU th =0.5, if IoU≥IoU th =0.5, then it is determined to be a cross-frame correspondence within the same region;

[0150] By matching each of the 20 frames of images, the positions of the same suspected region Ri in consecutive frames are connected in chronological order to obtain the candidate region trajectory of Ri. For example, the trajectory of R1 is... Describe its motion path in time series;

[0151] For adjacent frames (e.g., frames t and t+1) covered by the candidate region trajectory Ri, the denoised grayscale image sequence is used as input, and a dense optical flow algorithm (e.g., Farneback algorithm) is used to calculate the displacement of each pixel in the connected region corresponding to the trajectory (to obtain the (u,v) vector, where u represents the horizontal displacement and v represents the vertical displacement), and to generate the pixel displacement field.

[0152] For the pixel displacement field, the average amplitude and direction distribution of all optical flow vectors are statistically analyzed, and the average amplitude and direction distribution frequencies are combined to obtain the optical flow feature vector (e.g., a vector of length 9: 1 average amplitude + 8 direction frequencies).

[0153] For each suspected candidate region Ri, extract:

[0154] Edge pixel percentage: Calculate the "number of edge pixels / total number of pixels in the region" within Ri from the binary map of the edge location (e.g., the edge percentage of R1 is 0.35);

[0155] Texture complexity: Calculate the texture entropy within Ri from the local binary pattern feature map (e.g., the texture entropy of R1 is 1.2, the larger the entropy, the more complex the texture).

[0156] Optical flow feature vector: For example, the optical flow feature vector of R1 is [0.8,0.1,0.05,0,0,0,0,0.05], which includes the average amplitude and directional distribution;

[0157] The above three elements are combined to form a multidimensional feature vector (for example, the feature vector of R1 is [0.35, 1.2, 0.8, 0.1, 0.05, 0, 0, 0, 0.05]).

[0158] Input the multidimensional feature vectors of all suspected regions into the isolated forest algorithm (preset number of trees is 100, anomaly detection threshold is 0.8) to calculate the anomaly score of each candidate region trajectory (the higher the score, the more likely it is to be a real defect).

[0159] For the 20-frame trajectory of R1, the anomaly score sequence is obtained as [0.85, 0.87, 0.86, ..., 0.84], indicating that the scores are stable across multiple frames;

[0160] Calculate the standard deviation of the outlier score sequence. For example, the standard deviation of R1 is σ = 0.015, with a preset standard deviation threshold σ. th =0.05;

[0161] If σ < σ th =0.05, then the suspected region R1 is determined to be a real defect (abnormally stable occurrence);

[0162] If σ≥σ th=0.05, then the suspected area R1 is judged as a non-real defect (abnormal fluctuation is large, which is an anomaly caused by noise);

[0163] Collect all regions identified as real defects to form an abnormal region set.

[0164] Furthermore, in this embodiment, step S4 specifically includes:

[0165] Acquire the physical property data of the solder joint material, including the thermal conductivity, density, specific heat capacity and coefficient of thermal expansion of the solder joint material; extract the geometric feature data of the solder joint from the set of abnormal regions, including the area, perimeter and thickness of the solder joint and the three-dimensional coordinates of the solder joint.

[0166] Environmental parameter data for the welding environment were collected, including ambient temperature, convective heat transfer coefficient, and emissivity, and heat dissipation conditions were calculated. Ambient temperature was collected using a temperature sensor, the convective heat transfer coefficient was calculated from wind speed data collected by an anemometer, and emissivity was collected using a radiation meter. Based on Newton's law of cooling and similarity theory, combined with the wind speed data V (unit: m / s) collected by the anemometer, the empirical formula h = C1V was used. C2 Calculate the convective heat transfer coefficient h (unit: W / (m²)). 2 ·K), C1 and C2 are empirical constants related to the shape of the solder joint and the environmental medium, which can be obtained by consulting relevant engineering manuals; for the calculation of heat dissipation condition data, the heat dissipation condition data are obtained by comprehensively calculating based on environmental structural parameters, including the relative position and distance between the solder joint and surrounding objects and surface emissivity, based on the Stefan-Boltzmann law and the angle coefficient theory, combined with convective heat transfer.

[0167] Based on Fourier's heat conduction equation, the three-dimensional space of the weld joint is discretized using the finite element method, and the heat conduction, convection, and radiation processes are defined to construct a heat diffusion model of the weld joint to simulate temperature changes during welding and under energized conditions. Specifically, the heat conduction process is defined based on Fourier's law, which states that in a heat-conducting object, the amount of heat passing through a given cross-section per unit time is proportional to the rate of temperature change perpendicular to that interface and the cross-sectional area. Its mathematical expression is: Where q represents heat flux density (heat passing through a unit area per unit time), and k represents the thermal conductivity of the solder joint material. T represents the temperature gradient; by discretizing the three-dimensional space of the solder joint into multiple computational units, the direction and magnitude of heat transfer between adjacent units due to the temperature difference are calculated according to the above formula, thereby simulating the heat conduction process inside the solder joint material.

[0168] Thermal convection is defined according to Newton's law of cooling, which states that the heat flux density of convective heat transfer is directly proportional to the temperature difference between the surface of the object and the surrounding fluid, expressed as q = h(T). S -T ∞ ), where q represents heat flux density, h represents convective heat transfer coefficient, and T S T represents the surface temperature of the solder joint. ∞ The ambient temperature is represented by the above formula. Based on the calculated convective heat transfer coefficient and the temperature data of the solder joint surface and the environment, the heat exchange between the solder joint surface and the surrounding environment is calculated using the above formula to simulate the heat convection process.

[0169] Thermal radiation is defined based on the Stefan-Boltzmann law, which states that the radiant energy radiated per unit surface area of ​​an object into the surrounding space is proportional to the fourth power of its surface thermodynamic temperature, mathematically expressed as q = εσT. 4 Where q represents heat flux density, ε represents emissivity of the solder joint surface, σ represents Stefan-Boltzmann constant, and T represents thermodynamic temperature of the object surface; combining the emissivity of the solder joint surface and the influence of environmental radiation, the energy exchange between the solder joint and the surrounding environment due to thermal radiation is calculated using the above formula, thereby simulating the thermal radiation process;

[0170] The physical property data, weld point geometric feature data, environmental parameter data, and heat dissipation condition data of each abnormal region in the abnormal region set are input into the weld point thermal diffusion model to obtain the temperature rise distribution data of each abnormal region under welding and power-on conditions.

[0171] Furthermore, in this embodiment, step S4 also includes:

[0172] Set a temperature rise threshold, obtain the temperature rise value in the temperature rise distribution data of each abnormal area, and combine the geometric feature data of the solder joints and the binary map of the edge position corresponding to the abnormal area to analyze each abnormal area in the abnormal area set.

[0173] If the area of ​​the solder joint is greater than 2mm 2 If the following conditions are met: the solder joint thickness is <0.3mm, the temperature rise value is ≥ the temperature rise threshold, and the length of the edge fracture in the binary image of the edge position is >30% of the solder joint perimeter, then it is determined that there is a microcrack in the weld in the abnormal area.

[0174] If the area of ​​the solder joint is greater than 2mm 2 If any one of the following conditions is not met: solder joint thickness < 0.3 mm, temperature rise value ≥ temperature rise threshold, or the length of edge fracture in the binary image of the edge position > 30% of the solder joint perimeter, then the abnormal area is judged to have no microcracks in the weld.

[0175] Furthermore, in this embodiment, step S4 also includes:

[0176] By integrating data visualization technology with structured text, a visualized discrimination report is generated, including a three-dimensional coordinate annotation map of abnormal areas, geometric feature data of weld points, chromatogram of temperature rise distribution, edge fracture analysis map, and discrimination results of microcracks in cold welds.

[0177] Step S4 example is as follows:

[0178] Obtain the actual defect areas determined in step S3, such as R1 and R3, taking R1 as an example;

[0179] Obtain the physical property data of the solder joint material from the material specifications or product introduction. For example, the thermal conductivity of the solder joint material k = 100 W / (m·K) and the density ρ = 8000 kg / m³. 3 Specific heat capacity c = 450 J / (kg·K), coefficient of thermal expansion α p =20×10 -6 K -1 ;

[0180] From the edge binary map of step S2 and the abnormal region of step S3, extract the geometric feature data of the solder joints in the abnormal region set. For example, the area of ​​the solder joint A in R1 is 3 mm. 2 The weld joint perimeter L = 5mm, the weld joint thickness d = 0.25mm, the weld joint three-dimensional coordinates (x, y, z) = (10, 20, 1)mm, and the edge fracture length Y = 2mm;

[0181] Collect environmental parameter data of the welding environment, such as ambient temperature T. ∞ =25℃, wind speed V=2m / s, using the formula [Where C1 = 5, C2 = 0.6 (obtainable from engineering manuals)] The calculated convective heat transfer coefficient h = 20 W / (m²) 2 K), emissivity ε = 0.8;

[0182] Based on Stefan Boltzmann's law:

[0183] Where, σ f =5.67×10 -8 W / (m 2 ·K 4 ), representing the Stefan-Boltzmann constant; T S This represents the thermodynamic temperature of the solder joint surface, calculated using a thermal diffusion model, for example, T. S =333K; T sur Represents the ambient thermodynamic temperature, denoted by T. ∞ =25℃ conversion to obtain T sur =298K;

[0184] q was calculatedrad =120W / m 2 Combining convective heat dissipation (Newton's law of cooling) and radiative heat dissipation, the total heat flux q under the heat dissipation conditions is calculated. Z =q conv +q rad , where q conv =h·(T) S -T ∞ = 700W / m 2 ;

[0185] Therefore q z =820W / m 2 ;

[0186] Based on the Fourier heat conduction equation, the three-dimensional space of R1 (e.g., size 2mm×1.5mm×0.25mm) is discretized into 10×10×5 hexahedral elements using the finite element method, transforming the continuous heat conduction problem into heat transfer calculation of discrete elements.

[0187] Define the heat conduction process. Describe the heat transfer inside the solder joint due to the temperature difference, for example, unit temperature T1 = 50℃, T2 = 40℃, and the heat flow is from T1 to T2;

[0188] Define the heat convection process, and input the calculated convective heat transfer coefficient h = 20 W / (m²). 2 ·K), heat convection heat flux density q conv =h·(T) S -T ∞ This describes the heat exchange between the solder joint surface and the environment, such as T. S =60℃, heat flows from the solder joint to the environment;

[0189] Define the thermal radiation process, input emissivity ε = 0.8, σ f =5.67×10 -8 , Describe the radiative heat transfer between the solder joint surface and the surrounding environment, for example, T. S =60℃, radiant heat flows from the solder joint to the environment;

[0190] Input the above physical property data, weld joint geometric feature data, environmental parameter data and heat dissipation condition data into the weld joint thermal diffusion model (e.g., finite element software such as ANSYS, COMSOL, etc.) to simulate the temperature change under welding and power-on conditions, and obtain the temperature rise distribution data of R1. For example, the maximum temperature rise ΔT = 15℃ is obtained.

[0191] Preset temperature rise threshold ΔT th =10℃, satisfying ΔT≥ΔT th ;

[0192] Solder joint area A = 3mm 2 >2mm 2 Solder joint thickness d = 0.25mm < 0.3mm, ΔT ≥ ΔT th In the binary image of the edge location, the edge fracture length Y = 2mm > 30% of the weld perimeter = 1.5mm, which satisfies the condition. Therefore, it is determined that there is a microcrack in the weld in R1.

[0193] By integrating data visualization technologies (such as Matplotlib and ParaView) with structured text, reports are generated that include:

[0194] Anomaly region 3D coordinate annotation diagram: Mark the position of R1 in 3D space as (10,20,1)mm;

[0195] Solder joint geometric feature data: area 3mm 2 Circumference 5mm, thickness 0.25mm;

[0196] Temperature rise distribution chromatogram: The temperature rise difference within R1 is shown using a color gradient (maximum temperature rise 15℃);

[0197] Edge fracture analysis diagram: Mark the edge fracture location (2mm in length, accounting for 40% of the perimeter);

[0198] Result of identifying microcracks in poor welds: R1 is determined to have microcracks in its poor welds;

[0199] The final output includes a visual discrimination report containing the above content and data.

[0200] In the description of this application, it should be understood that the orientation or positional relationship indicated by directional terms such as "front, back, up, down, left, right", "horizontal, vertical, horizontal" and "top, bottom" is usually based on the orientation or positional relationship shown in the accompanying drawings, and is only for the convenience of describing this application and simplifying the description. Unless otherwise stated, these directional terms do not indicate or imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation on the scope of protection of this application.

[0201] For those skilled in the art, various other corresponding changes and modifications can be made based on the technical solutions and concepts described above, and all such changes and modifications should fall within the protection scope of the claims of this application.

Claims

1. A virtual welding micro-crack intelligent identification method based on intelligent visual recognition technology, characterized in that, The method comprises the following steps: S1, collecting an initial RGB image of a welding point to be detected, performing two-dimensional discrete cosine transformation and inverse two-dimensional discrete cosine transformation on the initial RGB image to obtain an enhanced image, and fusing the enhanced image with an R channel of the initial RGB image to form a double-channel feature map; S2, calculating phase consistency of the double-channel feature map to obtain welding point edge position information, extracting texture feature information in combination with a local binary pattern, and obtaining a suspected candidate area of a virtual welding micro-crack through an adaptive threshold segmentation method; specifically as follows: convolving the double-channel feature map through a multi-scale and multi-direction Gabor filter to obtain complex responses under different scales and directions, and calculating local energy according to the complex responses to obtain a phase consistency map; performing non-maximum suppression on the phase consistency map, and performing binarization processing through a preset phase consistency threshold to obtain an edge position binary map, and extracting welding point edge position information from the edge position binary map; defining a neighborhood centering on each pixel and comparing gray values of pixel points in the neighborhood with a center pixel to calculate a local binary pattern value; performing uniformity screening on the local binary pattern value, retaining effective texture points, and generating a local binary pattern feature map; performing histogram statistics on the local binary pattern feature map, dividing into multiple intervals, and calculating frequency distribution of each interval to obtain a texture feature vector; dividing the double-channel feature map into a plurality of non-overlapping sub-regions, calculating gray mean value, standard deviation and texture complexity based on the texture feature vector of each sub-region, and calculating an adaptive threshold value of each sub-region; combining the phase consistency map, the local binary pattern feature map and the adaptive threshold value, performing multi-feature fusion binarization segmentation on the double-channel feature map to obtain a defect candidate binary map, and removing noise and filling small holes in the defect candidate binary map to finally obtain a suspected candidate area of a virtual welding micro-crack; S3, collecting a sequence of RGB images of a welding point in a continuous time sequence, tracking the suspected candidate area across frames in adjacent frames to form a correlation area, calculating a light flow feature vector of the correlation area, and fusing the welding point edge position information and the texture feature information into a multi-dimensional feature vector for abnormality detection to obtain an abnormal area set; S4, discretizing a welding point in three-dimensional space by using a finite element method according to a Fourier heat conduction equation, defining a heat conduction process, a heat convection process and a heat radiation process, and constructing a welding point heat diffusion model for simulating temperature changes under a welding and energized state; obtaining physical property data of a welding point material, the physical property data including thermal conductivity, density, specific heat capacity and thermal expansion coefficient of the welding point material, extracting welding point geometric feature data of the abnormal area set, the welding point geometric feature data including welding point area, welding point perimeter, welding point thickness and welding point three-dimensional coordinates; collecting environmental parameter data of a welding environment, the environmental parameter data including environmental temperature, convective heat transfer coefficient and emissivity, and calculating to obtain heat dissipation condition data; The physical property data, the welding spot geometric feature data, the environmental parameter data and the heat dissipation condition data of each abnormal area in the abnormal area set are input into the welding spot heat diffusion model, to obtain temperature rise distribution data of each abnormal area under the welding and power-on state, and the temperature rise distribution data is analyzed to obtain a final discrimination result of the virtual welding micro-crack.

2. The method according to claim 1, wherein, The step S1 specifically comprises: A color image of the welding spot to be detected is collected to obtain an initial RGB image including the welding spot and the surrounding area of the welding spot, and the brightness of each pixel point of the initial RGB image is calculated to generate a brightness channel image with the same size as the initial RGB image; The brightness channel image is converted from the spatial domain to the frequency domain by two-dimensional discrete cosine transformation to obtain a frequency domain coefficient matrix including low-frequency components and high-frequency components; The high-frequency components in the frequency domain coefficient matrix are subjected to band-pass filtering to obtain a filtered frequency domain coefficient matrix, and the filtered frequency domain coefficient matrix is converted from the frequency domain to the spatial domain by inverse two-dimensional discrete cosine transformation to obtain an enhanced image; The low-frequency components represent the global structural features of the image, and the high-frequency components represent the local detailed features of the image.

3. The method according to claim 2, wherein, The step S1 further comprises: Setting the weight of the enhanced image as , and the weight of the R channel in the initial RGB image as , satisfying ; The gray values of each pixel point are calculated by weighting and summing each pixel at the corresponding position in the R channel of the enhanced image and the initial RGB image according to the set weight; The gray values of each pixel point are arranged point by point according to the spatial position of the enhanced image to obtain a single-channel gray image after pixel-level weighted fusion; The single-channel gray image is taken as a first channel image, the R channel of the initial RGB image is taken as a second channel image, and the first channel image and the second channel image are combined by a tensor stacking method to form a double-channel feature map.

4. The method according to claim 3, wherein, The step S3 specifically comprises: A continuous time sequence RGB image sequence of the welding spot surface is collected, and a gray scale conversion and Gaussian filtering method is used to pre-process the continuous time sequence RGB image sequence to obtain a gray scale image sequence; Adjacent frame matching is performed on the suspected candidate area, the area overlap degree is calculated, and a cross-frame corresponding relationship is established to obtain a candidate area trajectory; The adjacent frames covered by the candidate area trajectory are obtained, the gray scale image sequence is taken as input, and a dense optical flow estimation algorithm is used to calculate the displacement of each pixel point in the connected area corresponding to the same candidate area trajectory in adjacent frames to obtain a pixel displacement field; The average amplitude and direction distribution of all optical flow vectors in the pixel displacement field are calculated to obtain an optical flow feature vector.

5. The method according to claim 4, wherein, The step S3 further comprises: The edge pixel proportion of the suspected candidate area is extracted from the edge position binary image, the area texture complexity is calculated in combination with the local binary pattern feature map, and the optical flow feature vector is fused to form a multi-dimensional feature vector containing edge structure, texture attribute and time sequence motion information; The multi-dimensional feature vector is input into an isolation forest algorithm to calculate the abnormal score of the candidate area trajectory, and a group of abnormal scores arranged in frame sequence is generated for each candidate area trajectory to form an abnormal score sequence; A standard deviation of the abnormal score sequence of the same candidate region track of continuous multiple frames is calculated; If the calculated standard deviation is less than a preset standard deviation threshold, it indicates that the abnormal situation stably occurs in multiple frames, and is determined as a real defect. All regions determined as real defects are collected to form an abnormal region set; If the calculated standard deviation is greater than or equal to the preset standard deviation threshold, it indicates that the abnormal situation does not stably occur in multiple frames, and is determined as a non-real defect.

6. The method according to claim 5, wherein the method is characterized by, The step S4 further comprises: A temperature rise threshold is set, a temperature rise value in the temperature rise distribution data of each abnormal region is obtained, and the abnormal region set is analyzed in combination with the solder joint geometric feature data corresponding to the abnormal region and the edge position binary graph. If the soldering point area > 2mm 2 If the soldering point thickness < 0.3mm, the temperature rise value ≥ the temperature rise threshold value, and the length of edge fracture in the edge position binary image > 30% of the soldering point circumference are all satisfied, it is judged that the abnormal area has a virtual soldering micro-crack. If any one of the following conditions is not satisfied: the solder joint area > 2 mm 2 If any one of the following conditions is not satisfied: the solder joint thickness < 0.3 mm, the temperature rise value ≥ the temperature rise threshold value, and the length of edge break in the edge position binary image > 30% of the solder joint circumference, the abnormal region is determined to have no virtual solder micro-cracks.

7. The method according to claim 1, wherein the method is characterized by, The step S4 further comprises: a method of integrating data visualization technology and structured text to generate a visual discrimination report including an abnormal region three-dimensional coordinate labeling diagram, solder joint geometric feature data, a temperature rise distribution chromatogram, an edge fracture analysis diagram, and a virtual welding micro-crack discrimination result.

Citation Information

Patent Citations

  • Image enhancement and feature extraction method for automatic welding

    CN115147448A

  • Titanium alloy product defect detection method based on image video technology

    CN118710643A