A metal composite surface defect intelligent detection method based on machine vision

By combining low-rank sparse matrix decoupling with multidimensional statistical geometric feature fusion analysis, the problem of detecting weak defect signals under high reflectivity interference on the surface of metal composite materials was solved. This enabled accurate quantitative assessment of defects and reduced the false judgment rate, thereby improving the reliability and accuracy of the detection system.

CN121767364BActive Publication Date: 2026-06-02JIANGSU LONGQI METAL COMPOSITE NEW MATERIALS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610255548.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-03-04
Publication Date
2026-06-02
Estimated Expiration
2046-03-04

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively decouple high-reflection interference from weak defect signals on the surface of metal composite materials, resulting in a high misjudgment rate for detection systems in complex industrial environments and an inability to accurately and quantitatively assess the physical damage properties of defects.

Method used

We employ a low-rank sparse matrix decoupling and multidimensional statistical geometric feature fusion analysis. By using a robust principal component analysis algorithm, we decompose the observation matrix into a low-rank matrix and a sparse matrix. Combined with a gray-level co-occurrence matrix and an adaptive decision model, we can quantitatively describe the local regional characteristics and texture complexity of the surface of metal composite materials, and evaluate the degree of weakening of the material structure and the stress concentration factor caused by defects.

Benefits of technology

It enables precise removal of weak defects and quantitative assessment of physical damage properties in strong reflection environments, reduces the false judgment rate, improves the reliability and accuracy of the detection system, and provides in-depth analytical capabilities from surface imaging to physical failure analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121767364B_ABST
    Figure CN121767364B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of image analysis, in particular to a metal composite material surface defect intelligent detection method based on machine vision, which comprises the following steps: acquiring an original image and converting the original image into an observation matrix; decomposing the observation matrix into a low-rank matrix and a sparse matrix through a robust principal component analysis algorithm; establishing a background statistical model by using a kernel norm to constrain the low-rank matrix and using a one norm to constrain the sparse matrix; positioning a defect area in the sparse matrix and extracting a gray level co-occurrence matrix feature vector; performing connected domain analysis on the sparse matrix, calculating geometric morphological parameters and evaluating a stress concentration coefficient; and establishing an adaptive decision model to perform fusion discrimination to determine physical damage. Through low-rank sparse matrix decoupling and multi-dimensional statistical geometric feature fusion analysis, the application realizes accurate stripping of weak defects and quantitative evaluation of physical damage attributes under a complex background.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image analysis technology, specifically to an intelligent detection method for surface defects in metal composite materials based on machine vision. Background Technology

[0002] Metal composite materials play a core supporting role in high-end manufacturing fields such as aerospace, nuclear energy, and precision electronics. Due to the excellent properties of combining multiple components, forging, lamination, and heat treatment during processing can easily cause discontinuities in physical properties, such as microcracks, folds, indentations, and inclusions.

[0003] In existing technologies, automated detection of metal composite material surfaces primarily relies on traditional image processing methods. These methods typically utilize histogram equalization for global enhancement and combine Fourier transform with frequency-domain notch filtering to suppress periodic textures. Simultaneously, statistical measures are extracted using the gray-level co-occurrence matrix, or multi-scale denoising is performed using wavelet transform, aiming to highlight defect features against complex backgrounds. However, metal composite material surfaces exhibit extremely high reflectivity and anisotropic textures. Traditional image processing methods often fail to effectively decouple background and defect signals when faced with strong glare, macroscopic curvature fluctuations, and subtle contrast impairments. Due to the lack of matrix-based analysis of the deep statistical structure of the image, existing technologies struggle to quantitatively assess the stress concentration coefficient and material cross-sectional attenuation caused by defects, resulting in a high false positive rate in complex industrial environments.

[0004] How to solve the problem of anisotropic texture interference and high-reflectivity glare noise masking weak defect signals on the surface of metal composite materials through mathematical analysis and reconstruction of deep image features, and achieve accurate quantitative assessment of the physical damage properties of defects, is a technical bottleneck that urgently needs to be overcome in the field of image analysis.

[0005] To address this, a machine vision-based intelligent detection method for surface defects in metal composite materials is proposed. Summary of the Invention

[0006] The purpose of this invention is to provide an intelligent detection method for surface defects of metal composite materials based on machine vision. By decoupling low-rank sparse matrices and fusing analysis of multidimensional statistical geometric features, it can achieve accurate identification of weak defects and quantitative evaluation of physical damage properties in complex backgrounds.

[0007] To achieve the above objectives, the present invention provides the following technical solution:

[0008] A machine vision-based intelligent detection method for surface defects in metal composite materials includes:

[0009] Acquire the original image of the surface of the metal composite material; convert the original image into an observation matrix; decompose the observation matrix into a low-rank matrix and a sparse matrix using a robust principal component analysis algorithm; establish a background statistical model by constraining the low-rank matrix using the nuclear norm; and constrain the sparse matrix using the first norm.

[0010] Candidate defect regions are located in a sparse matrix; a gray-level co-occurrence matrix is ​​calculated for each candidate defect region; statistical feature vectors of four dimensions—contrast, second moment of angle, entropy, and correlation—are extracted from the gray-level co-occurrence matrix to quantify the gray-level spatial relationship and texture complexity of local regions on the surface of the metal composite material; connected component analysis is performed on the sparse matrix; the aspect ratio, roundness, maximum axial length, and compactness of the defect target are calculated; the edge smoothness and shape proportion of the defect target are analyzed to assess the weakening effect of the defect target on the cross-section of the metal composite material structure and the stress concentration factor.

[0011] An adaptive decision-making model based on a background statistical model is established; statistical feature vectors are fused with geometric morphological attributes for discrimination; the discreteness and periodicity of the target within a local window are combined to determine whether the abnormal components in the sparse matrix are physical damages; and the final quality inspection conclusion is output.

[0012] Preferably, the step of converting the original image into an observation matrix includes:

[0013] A contrast-limited adaptive histogram equalization algorithm is used to divide the original image into multiple non-overlapping sub-regions. The defect manifestation degree of each pixel is calculated, and the size of the enhancement window is dynamically adjusted to smoothly transition concentrated gray values. The processed sub-regions are re-stitched using an interpolation algorithm to obtain a target enhanced image with smooth edges and optimized contrast. Multi-level wavelet decomposition is performed on the target enhanced image to obtain low-frequency approximate components and high-frequency detail components. An adaptive threshold selection strategy is applied to the high-frequency detail components to suppress Gaussian noise on the metal surface while preserving the abrupt signal of the crack edge. The denoised image data is mapped to a preset numerical range to construct an observation matrix that conforms to a statistically consistent distribution.

[0014] Preferably, the steps of decomposing the observation matrix into a low-rank matrix and a sparse matrix include: setting the linear weighted sum of the nuclear norm of the low-rank matrix and the first norm of the sparse matrix as the minimization objective function; setting the sum of corresponding elements of the low-rank matrix and the sparse matrix equal to the corresponding elements of the observation matrix as a constraint condition for minimizing the objective function; applying the augmented Lagrange multiplier algorithm to perform iterative calculations of the minimization objective function in alternating directions, provided that the linear constraint equations are satisfied; during the iteration process, using the singular value thresholding operator to perform singular value shrinkage processing on the low-rank matrix; using the soft thresholding shrinkage operator to perform element-level thresholding processing on the sparse matrix; stopping the calculation and outputting the separated low-rank matrix and sparse matrix respectively when the iterative calculation meets the preset convergence accuracy criterion.

[0015] Preferably, the steps for establishing the background statistical model include: calculating the mean, standard deviation, and gradient weight information of the gray level of the low-rank matrix within a local sliding window to characterize the normal fiber flow texture features of the metal composite material surface; using historical observation data to estimate the probability density of the low-rank matrix to determine the gray level fluctuation range and spatial distribution pattern of the normal surface texture; and correcting the statistical parameters of the low-rank components in real time according to the fluctuations in the production process to form a three-dimensional reference plane that dynamically points to the ideal smooth surface, serving as a comparison benchmark for judging abnormal components.

[0016] Preferably, the specific steps for quantifying the gray-level spatial relationship and texture complexity of local areas on the surface of a metal composite material include: within the candidate defect area, statistically analyzing the probability distribution of pixel gray-level pairs with preset pixel intervals and preset directions to generate a gray-level co-occurrence matrix in four directions; evaluating the uniformity of local gray-level distribution by calculating the angular second moment of the gray-level co-occurrence matrix, and determining the difference between the high-energy state of the normal surface and the low-energy state at the defect; calculating the entropy value of the gray-level co-occurrence matrix to measure the randomness of local image information, and using the local entropy value caused by the defect to increase the quantification of texture complexity; and calculating the contrast and correlation of the gray-level co-occurrence matrix to describe the gray-level difference between pixels and the linear relationship of spatial gray levels, reflecting the directional consistency of the surface texture.

[0017] Preferably, the specific steps for performing connected component analysis on a sparse matrix include:

[0018] Density clustering algorithm is used to spatially aggregate pixels with high heterogeneity scores in a sparse matrix, dividing pixels that meet the density distribution requirements into different pixel clusters. An eight-connected-domain labeling algorithm is applied to the pixel clusters to identify and extract candidate boundaries for each independent defect target, constructing the geometric bounding rectangle of the defect target. A local reference plane is constructed through least-squares surface fitting, and the vertical residual between the pixel gray value and the reference plane in each connected region is calculated. The geometric residual is used to eliminate shadow interference caused by macroscopic curvature fluctuations of the metal surface. Based on the extracted defect connected domains, aspect ratio, roundness, maximum axial length, and compactness are calculated, mapping image features into physical parameters for evaluating the degree of weakening of the material structure cross-section and stress concentration factor by defects.

[0019] Preferably, the specific steps for fusion discrimination based on the adaptive decision model include:

[0020] By performing multi-directional line segment analysis on local windows, the dispersion of candidate defect targets and the least squares surface fitting error are calculated. When the dispersion exceeds a preset threshold and the fitting error exceeds a preset tolerance, anomaly components are identified in the candidate region. The periodicity perpendicular to the extension direction of the anomaly components is calculated. When the periodicity is lower than a preset background texture distribution threshold, it is determined that the anomaly components have disrupted the regular texture distribution of the metal surface, thus eliminating interference from normal processing traces. Spatial coordinate overlap verification is performed on two-dimensional image features and three-dimensional spatial features. When two-dimensional grayscale contrast anomalies and three-dimensional depth abrupt changes coincide in spatial coordinate positions, they are determined to be physical damage. Background statistical model parameters established by extracting low-rank matrices are used to correct the preset thresholds in local anomaly identification and texture consistency verification in real time based on the fluctuation of surface roughness of metal composite materials.

[0021] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0022] 1. This invention utilizes a robust principal component analysis algorithm to decompose the original observation matrix into a low-rank matrix representing a structurally similar background and a sparse matrix representing random damage components, constrained by the nuclear norm and the first norm. This processing method fundamentally separates background texture from defect signals at the underlying data structure level, enabling the system to accurately capture sub-pixel-level weak signal features such as microcracks and weak contrast indentations even under strong reflection interference. Simultaneously, the introduction of gradient weight information effectively protects the edge structure of defects, avoiding the loss of details during reconstruction and providing a high-quality sparse feature source for subsequent quantitative analysis.

[0023] 2. This invention extracts statistical quantities such as grayscale mean, standard deviation, and gradient distribution from low-rank matrices to construct a statistical library capable of dynamically characterizing normal surface texture features, and generates a three-dimensional reference plane pointing to an ideal smooth surface. This statistical distribution-based modeling method enables the system to adaptively correct the judgment criteria based on real-time production process fine-tuning, effectively eliminating false alarms caused by shadow interference due to the geometric shape of metal forgings and surface roughness fluctuations. This leap from "static detection" to "self-evolving background modeling" ensures the high reliability and consistency of the detection system during long-term online operation.

[0024] 3. This invention, by calculating the contrast and entropy values ​​of the gray-level co-occurrence matrix, can quantify the pathological complexity of local textures and accurately distinguish between normal grinding marks and microscopic damage. Combining geometric parameters such as aspect ratio, roundness, and compactness, this invention further classifies the physical properties of defects and can quantify the degree of damage weakening the material cross-section and stress concentration factor. Furthermore, the coordinate overlap verification logic of two-dimensional image contrast and three-dimensional depth abrupt changes provides a deterministic basis for judging interlayer delamination and deep-hole defects in laminated metal materials, thus providing modern high-end equipment manufacturing with in-depth analytical capabilities ranging from "surface imaging" to "physical failure analysis." Attached Figure Description

[0025] Figure 1 This is a flowchart of a machine vision-based intelligent detection method for surface defects in metal composite materials proposed in this invention.

[0026] Figure 2 This is a flowchart illustrating the intelligent detection method for surface defects in metal composite materials based on machine vision proposed in this invention.

[0027] Figure 3 The flowchart shows the fusion discrimination process for the adaptive decision-making model proposed in this invention. Detailed Implementation

[0028] 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.

[0029] Example 1

[0030] Please see Figures 1 to 3 This invention provides a machine vision-based intelligent detection method for surface defects in metal composite materials, the technical solution of which is as follows:

[0031] A machine vision-based intelligent detection method for surface defects in metal composite materials, such as... Figures 1-2 As shown, it includes:

[0032] Acquire the original image of the surface of the metal composite material; convert the original image into an observation matrix; decompose the observation matrix into a low-rank matrix and a sparse matrix using a robust principal component analysis algorithm; establish a background statistical model by constraining the low-rank matrix using the nuclear norm; and constrain the sparse matrix using the first norm.

[0033] Candidate defect regions are located in a sparse matrix; a gray-level co-occurrence matrix is ​​calculated for each candidate defect region; statistical feature vectors of four dimensions—contrast, second moment of angle, entropy, and correlation—are extracted from the gray-level co-occurrence matrix to quantify the gray-level spatial relationship and texture complexity of local regions on the surface of the metal composite material; connected component analysis is performed on the sparse matrix; the aspect ratio, roundness, maximum axial length, and compactness of the defect target are calculated; the edge smoothness and shape proportion of the defect target are analyzed to assess the weakening effect of the defect target on the cross-section of the metal composite material structure and the stress concentration factor.

[0034] An adaptive decision-making model based on a background statistical model is established; statistical feature vectors are fused with geometric morphological attributes for discrimination; the discreteness and periodicity of the target within a local window are combined to determine whether the abnormal components in the sparse matrix are physical damages; and the final quality inspection conclusion is output.

[0035] Furthermore, the steps to transform the original image into an observation matrix include:

[0036] A contrast-limited adaptive histogram equalization algorithm is used to divide the original image into multiple non-overlapping sub-regions. The defect manifestation degree of each pixel is calculated, and the size of the enhancement window is dynamically adjusted to smoothly transition concentrated gray values. The processed sub-regions are re-stitched using an interpolation algorithm to obtain a target enhanced image with smooth edges and optimized contrast. Multi-level wavelet decomposition is performed on the target enhanced image to obtain low-frequency approximate components and high-frequency detail components. An adaptive threshold selection strategy is applied to the high-frequency detail components to suppress Gaussian noise on the metal surface while preserving the abrupt signal of the crack edge. The denoised image data is mapped to a preset numerical range to construct an observation matrix that conforms to a statistically consistent distribution.

[0037] Calculating the defect severity of each pixel involves using a nonlinear mapping ratio between the grayscale standard deviation and the local mean of pixels within a local window to characterize the discrete anomalies of the local region. When the defect severity exceeds a preset sensitivity threshold, the size of the enhancement window is reduced to strengthen micro-edge extraction; conversely, the window size is increased to suppress background texture. This method, by adaptively adjusting the enhancement window size, effectively solves the image quality degradation problem caused by uneven surface illumination and specular reflection in metal composite materials. While suppressing background texture noise interference, it significantly improves the contrast and recognition accuracy of micro-crack edges.

[0038] An adaptive threshold selection strategy is applied to the high-frequency detail components. Specifically, the BayesShrink threshold estimation model is used to adaptively estimate the noise variance for each wavelet subband. While filtering out Gaussian noise on the metal surface, a nonlinear shrinkage operator is used to retain high-frequency components with abrupt signal characteristics, such as crack edges. This strategy, through refined multi-scale adaptive denoising, effectively suppresses anisotropic high-frequency noise on the metal surface while accurately preserving physically meaningful defect abrupt signals. It mathematically solves the bottleneck problem of edge blurring in traditional denoising processes, laying a robust data foundation for the accurate removal of weak-contrast defects under complex textures.

[0039] Mapping the denoised image data to a preset numerical range means mapping the image gray levels to a floating-point range between [0, 1] through linear normalization or logarithmic compression transformation, so that the numerical distribution of the observation matrix meets the statistical convergence requirements of low-rank matrix and sparse matrix decomposition, thereby ensuring the computational stability of the singular value threshold operator in the subsequent robust principal component analysis process.

[0040] This embodiment effectively addresses the image quality degradation caused by uneven surface illumination and specular reflection in metal composite materials by introducing contrast enhancement dynamically guided by the degree of local defect manifestation, significantly enhancing the contrast of micro-crack edges. Multi-scale denoising is performed using a BayesShrink threshold estimation model, suppressing anisotropic high-frequency noise while accurately preserving physically meaningful defect abrupt change signals. Finally, numerical interval normalization mapping mathematically ensures the statistical convergence and singular value operation stability of the observation matrix in subsequent robust principal component analysis, laying a robust data foundation for the removal of small-sized, low-contrast defects in complex textures.

[0041] Further, the steps for decomposing the observation matrix into a low-rank matrix and a sparse matrix include: setting the linear weighted sum of the nuclear norm of the low-rank matrix and the first norm of the sparse matrix as the minimization objective function; setting the sum of corresponding elements of the low-rank matrix and the sparse matrix equal to the corresponding elements of the observation matrix as a constraint condition for minimizing the objective function; applying the augmented Lagrange multiplier algorithm to iteratively calculate the minimization objective function in alternating directions, provided that the linear constraint equation is satisfied; during the iteration process, using the singular value thresholding operator to perform singular value shrinkage processing on the low-rank matrix; using the soft thresholding shrinkage operator to perform element-level thresholding processing on the sparse matrix; stopping the calculation and outputting the separated low-rank matrix and sparse matrix respectively when the iterative calculation meets the preset convergence accuracy criterion.

[0042] The objective function is defined as the linear weighted sum of the kernel norm of the low-rank matrix and the 1-norm of the sparse matrix, where the weight coefficients λ of the sparse matrix are set according to the dimension of the observation matrix. , where M and N are the number of rows and columns of the observation matrix, respectively.

[0043] The singular value shrinkage processing of the low-rank matrix using the singular value thresholding operator refers to performing singular value decomposition on the matrix during the iteration process, subtracting the step size factor from all singular values, and taking the maximum value with zero, thereby forcing the matrix to achieve a low-rank structure to extract the statistically consistent background of the material surface. The element-level thresholding processing of the sparse matrix using the soft thresholding operator involves using a nonlinear shrinkage function to threshold-filter matrix elements, reducing background noise below the weight threshold to zero, thereby extracting outliers that deviate from the background distribution into the sparse matrix.

[0044] The iterative calculation satisfies the preset convergence accuracy standard, which means that the relative residual norm of the sum of the low-rank matrix and the sparse matrix generated by two adjacent iterations is calculated relative to the observation matrix; when the relative residual norm is less than the preset convergence tolerance, the algorithm is determined to have reached a balanced state and the decoupling result is output.

[0045] This embodiment ensures the computational robustness and convergence speed of the robust principal component analysis algorithm when decoupling high-dimensional metal images by clearly defining the mathematical relationship between the weighting coefficients and the convergence criteria. Utilizing the synergistic effect of precise singular value shrinkage and soft thresholding operators, it achieves complete suppression of the anisotropic texture background on the surface of metal composite materials. This allows weak cracks and foreign matter features hidden beneath strong textures to be sparsely and faithfully extracted, providing a clean feature data source for subsequent quantitative physical assessment.

[0046] Furthermore, the steps for establishing the background statistical model include: calculating the mean, standard deviation, and gradient weight information of the grayscale of the low-rank matrix within a local sliding window to characterize the normal fiber flow texture features of the metal composite material surface; using historical observation data to estimate the probability density of the low-rank matrix to determine the grayscale fluctuation range and spatial distribution pattern of the normal surface texture; and correcting the statistical parameters of the low-rank components in real time according to the fluctuations in the production process to form a three-dimensional reference plane that dynamically points to the ideal smooth surface, serving as a benchmark for judging abnormal components.

[0047] The calculation of gradient weight information refers to extracting the gradient magnitude of the low-rank matrix in the horizontal and vertical directions using the Sobel operator, and calculating the local energy weight by combining the gradient direction histogram, in order to quantitatively describe the directional fiber flow texture background. The estimation of the probability density of the low-rank matrix using historical observation data specifically involves fitting the gray-level distribution of defect-free samples using a Gaussian mixture model, determining the confidence interval of the gray-level fluctuation range through maximum likelihood estimation, and then constructing the statistical distribution law of normal texture. The real-time correction of the statistical parameters of the low-rank components based on fluctuations in the production process refers to establishing a parameter update mechanism under a sliding time window; when a preset number of consecutive detection frames show that the mean deviation of the low-rank matrix exceeds a preset threshold, an incremental update of the statistical parameters is triggered, and the three-dimensional reference plane is refitted to offset the surface roughness baseline evolution caused by tool wear.

[0048] This scheme achieves a precise mathematical description of anisotropic fiber texture background by introducing gradient direction energy weights and a Gaussian mixture model. An augmented dynamic correction mechanism is used to solve the reference failure problem caused by manufacturing process drift, enabling the system to adaptively generate a 3D reference plane that highly matches the current surface quality. This dynamic reference significantly reduces the misjudgment rate caused by background fluctuations, ensuring extremely high robustness in judging minute anomalies under complex processing environments.

[0049] Furthermore, the specific steps for quantifying the gray-level spatial relationships and texture complexity of local regions on the surface of metal composite materials include: within the candidate defect region, statistically analyzing the probability distribution of pixel gray-level pairs with preset pixel intervals and preset directions to generate gray-level co-occurrence matrices in four directions; evaluating the uniformity of local gray-level distribution by calculating the angular second moment of the gray-level co-occurrence matrix, and determining the difference between the high-energy state of the normal surface and the low-energy state at the defect location; calculating the entropy value of the gray-level co-occurrence matrix to measure the randomness of local image information, and using the local entropy value caused by defect generation to increase the quantification of texture complexity; and calculating the contrast and correlation of the gray-level co-occurrence matrix to describe the gray-level differences between pixels and the linear relationship of spatial gray levels, reflecting the directional consistency of surface texture.

[0050] The four directions refer to searching for neighboring pixels with preset pixel intervals at 0°, 45°, 90°, and 135°, respectively, based on the current pixel, to cover the main texture direction and diagonal fiber distribution on the surface of the metal composite material. Before constructing the gray-level co-occurrence matrix, the gray levels of the candidate defect regions are compressed to 16 or 32 levels with equal spacing to improve the computational stability of the statistical probability distribution and suppress background noise interference.

[0051] The method of quantifying texture complexity by utilizing the increase in local entropy caused by defects specifically involves establishing a threshold for judging the increase in local entropy. When the entropy value of a local region deviates from the mean of the background statistical model by more than a preset multiple of the standard deviation, it is determined that there is an irregular texture mutation in that region. The method of reflecting the directional consistency of surface texture refers to calculating the range and coefficient of variation of the correlation values ​​in four directions. When the decrease in the correlation value in the main texture direction exceeds three times the standard deviation of the corresponding direction in the background statistical model, and the correlation in the four directions tends to be isotropically distributed, it is determined that the originally directional fiber flow texture has been destroyed by irregular physical damage.

[0052] This embodiment transforms a general numerical comparison into a rigorous statistical discrimination process by introducing an energy attenuation coefficient determination model and a directional verification logic based on standard deviation multiples. By quantitatively analyzing the coefficients of variation of the correlation in four directions, the system can accurately capture the directional collapse of normal fiber texture at the microscale, effectively distinguishing between regular machining marks and randomly occurring microcrack damage. This description method based on statistical consistency deviation greatly enhances the determinism and reproducibility of image analysis algorithms for defect determination in complex backgrounds.

[0053] Furthermore, the specific steps for performing connected component analysis on a sparse matrix include:

[0054] Density clustering algorithm is used to spatially aggregate pixels with high heterogeneity scores in a sparse matrix, dividing pixels that meet the density distribution requirements into different pixel clusters. An eight-connected-domain labeling algorithm is applied to the pixel clusters to identify and extract candidate boundaries for each independent defect target, constructing the geometric bounding rectangle of the defect target. A local reference plane is constructed through least-squares surface fitting, and the vertical residual between the pixel gray value and the reference plane in each connected region is calculated. The geometric residual is used to eliminate shadow interference caused by macroscopic curvature fluctuations of the metal surface. Based on the extracted defect connected domains, aspect ratio, roundness, maximum axial length, and compactness are calculated, mapping image features into physical parameters for evaluating the degree of weakening of the material structure cross-section and stress concentration factor by defects.

[0055] The calculation of pixel anomaly scores involves assigning each pixel a score representing its deviation from background consistency by calculating a weighted sum of the target dispersion, periodicity, and surface fitting error. A density-based noise spatial clustering algorithm is then used to group pixels with scores exceeding a preset threshold into different clusters within their spatial neighborhood. This method, through weighted quantization of multidimensional anomaly features and spatial integration of density clustering, achieves robust extraction of background consistency deviation points, effectively eliminating false alarms caused by macroscopic curvature fluctuations on metal surfaces and non-uniform lighting, and significantly improving the sensitivity and reliability of detecting minute defects on complex, irregularly shaped components.

[0056] The method of eliminating interference by using geometric residuals refers to calculating the root mean square error between the pixel gray value and the least square fitting reference plane in each connected region. When the local residual distribution in the region conforms to the Gaussian distribution and the amplitude is lower than the preset geometric fluctuation threshold, the region is determined to be a shadow caused by macroscopic curvature fluctuation and is removed. Only abnormal physical damage regions with residual absolute values ​​exceeding three times the standard deviation are retained.

[0057] The mapping of image features to physical parameters refers to establishing a correlation model between defect geometric parameters and material mechanical properties. Specifically, it involves using the roundness and compactness of defects to assess the stress concentration factor caused by edge irregularities. Lower roundness or compactness corresponds to a higher risk of stress concentration. The ratio of the maximum axial length to the width of the material cross-section is used to assess the effectiveness of defects in weakening the cross-section of the material structure.

[0058] This embodiment effectively solves the problem of false shadows caused by macroscopic curvature fluctuations in large-size metal composite forgings by introducing a geometric verification mechanism based on residual root mean square error, ensuring that the detection system focuses only on actual physical damage. This analysis path based on the synergistic effect of density clustering and surface fitting significantly improves the accuracy of qualitative and quantitative assessment of surface defects in complex irregular components, providing precise data support for ensuring the safe operation of critical equipment.

[0059] Furthermore, such as Figure 3 As shown, the specific steps for fusion discrimination based on the adaptive decision model include:

[0060] By performing multi-directional line segment analysis on local windows, the dispersion of candidate defect targets and the least squares surface fitting error are calculated. When the dispersion exceeds a preset threshold and the fitting error exceeds a preset tolerance, anomaly components are identified in the candidate region. The periodicity perpendicular to the extension direction of the anomaly components is calculated. When the periodicity is lower than a preset background texture distribution threshold, it is determined that the anomaly components have disrupted the regular texture distribution of the metal surface, thus eliminating interference from normal processing traces. Spatial coordinate overlap verification is performed on two-dimensional image features and three-dimensional spatial features. When two-dimensional grayscale contrast anomalies and three-dimensional depth abrupt changes coincide in spatial coordinate positions, they are determined to be physical damage. Background statistical model parameters established by extracting low-rank matrices are used to correct the preset thresholds in local anomaly identification and texture consistency verification in real time based on the fluctuation of surface roughness of metal composite materials.

[0061] The multi-directional line segment analysis performed on the local window specifically involves rotating the sampled line segments within the candidate region with a preset step size and calculating the pixel grayscale variance along the line segment direction. By analyzing the distribution characteristics of the variance in different directions, the dispersion degree P, which characterizes the target anomaly, is extracted. The determination that an abnormal component exists in the candidate region is based on the following: when the dispersion degree P exceeds a preset threshold and the least squares fitting error is significantly greater than the mean residual of the background statistical model, it is preliminarily determined to be an anomaly.

[0062] The periodicity R is calculated by calculating the single-peak autocorrelation function of the abnormal component in the vertical direction or analyzing its high-energy bright spot distribution in the frequency domain spectrum. When the periodicity R is lower than the preset background texture distribution threshold, it is determined that the periodicity of the region is disrupted, thus confirming it as a defect rather than a normal surface processing texture.

[0063] The spatial coordinate overlap verification refers to the joint calibration of the pixel coordinate system of the two-dimensional image and the point cloud coordinate system of the three-dimensional contour scanner to establish a unified spatial mapping relationship. When the centroid coordinates of the two-dimensional gray-scale contrast abnormal area and the projection coordinates of the three-dimensional depth abrupt change area overlap within the preset Euclidean distance neighborhood, it is judged as severe surface physical damage.

[0064] This embodiment achieves in-depth analysis of the complex texture background on the surface of metal composite materials by introducing multi-directional line segment analysis and autocorrelation periodic verification logic, effectively distinguishing between normal processing marks and pathological damage. Utilizing 2D and 3D spatial coordinate overlap verification eliminates false alarms caused by the limitations of single optical imaging, greatly improving the accuracy of determining severe damage such as interlayer delamination and deep holes. This dynamic threshold evolution mechanism driven by background model parameters ensures that the detection system maintains extremely high detection sensitivity and technical robustness even when surface roughness is fine-tuned.

[0065] This invention achieves low-level mathematical decoupling between complex backgrounds and defect signals on the surface of metallic composite materials through robust principal component analysis (PCA) algorithms, and effectively suppresses anisotropic texture interference by utilizing kernel norm and L1 norm constraints. Through multidimensional quantization of gray-level co-occurrence matrices and geometric morphological parameters, it achieves a technological leap from single-pixel analysis to physical damage attribute assessment. Combined with adaptive decision-making logic based on a background statistical model, it significantly improves detection sensitivity in high-reflectivity environments, providing highly reliable quality conclusions for ensuring the safe operation of critical equipment.

[0066] Example 2

[0067] In the quality inspection scenario of high-pressure turbine blade forgings for aero-engines, this embodiment provides a defect detection implementation method based on image analysis technology. Considering the regular grinding texture and high reflectivity of the surface of this type of metal composite forging, the detection system first acquires the original image of the blade surface using an aerospace-specific industrial camera. To eliminate glare interference caused by uneven illumination of the blade surface, the system uses a contrast-limited adaptive histogram equalization algorithm to divide the original image into multiple non-overlapping sub-regions. The system calculates the degree of defect manifestation based on the ratio of the grayscale standard deviation to the mean of pixels within a local window, dynamically reducing the enhancement window size to strengthen the edge contrast of micro-cracks. The processed image undergoes multi-scale wavelet denoising using a BayesShrink threshold estimation model, preserving the abrupt change signal at the crack edge while suppressing anisotropic high-frequency noise. Finally, it is linearly mapped to a floating-point range between zero and one to construct the observation matrix.

[0068] During the image feature stripping stage, the system applies the augmented Lagrange multiplier algorithm to perform robust principal component analysis, where the weight coefficients of the sparse matrix are set to the reciprocal of the maximum number of rows and columns of the observation matrix. A singular value thresholding operator is used to shrink the low-rank matrix, extracting the stable fiber flow texture background from the blade surface; simultaneously, a soft thresholding shrinkage operator is used to extract weak defect signals deviating from the background distribution into the sparse matrix. When the relative residual norm between two adjacent iterations is less than the preset tolerance, the system outputs the decoupled matrix data.

[0069] In the statistical and geometric quantization stage, the system calculates the gray-level mean and gradient weights for the low-rank matrix, and uses a Gaussian mixture model to fit the distribution of defect-free samples, forming a dynamically pointing 3D reference plane benchmark to the ideal surface. For candidate defect regions in the sparse matrix, gray-level co-occurrence matrices are calculated in the 0°, 45°, 90°, and 135° directions. If the increase in local entropy exceeds a preset multiple of the background standard deviation, and the decrease in correlation value in the main texture direction exceeds three times the standard deviation, the original directional texture is determined to be destroyed.

[0070] During the defect nature assessment phase, the system uses density clustering to aggregate pixels with high heterogeneity scores and calculates the root mean square error within connected regions using least-squares surface fitting. If the absolute value of the residual exceeds three times the standard deviation, the shadows caused by macroscopic curvature fluctuations are excluded, retaining the true physical damage. By calculating the roundness, compactness, and maximum axial length ratio of the defect target, the system can quantitatively assess the degree of weakening of the blade structure cross-section by the defect and the resulting stress concentration risk.

[0071] In the final decision-making stage, the system performs multi-directional line segment analysis and autocorrelation period verification. When an abnormal contrast area in the 2D image is found to overlap with a depth abrupt change detected by the 3D contour scanner in the spatial coordinate neighborhood, it is confirmed as severe surface damage. The system will adjust the judgment threshold in real time based on the subtle fluctuations in the blade surface roughness to ensure that it can still output highly reliable quality conclusions even when the tool wears or the ambient light changes.

[0072] 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 machine vision-based intelligent detection method for surface defects in metal composite materials, characterized in that, include: Acquire the original image of the surface of the metal composite material; convert the original image into an observation matrix; decompose the observation matrix into a low-rank matrix and a sparse matrix using a robust principal component analysis algorithm; establish a background statistical model by constraining the low-rank matrix using the nuclear norm; and constrain the sparse matrix using the first norm. Locate candidate defect regions in a sparse matrix; For each candidate defect region, a gray-level co-occurrence matrix is ​​calculated; statistical feature vectors with four dimensions—contrast, second moment of angle, entropy, and correlation—are extracted from the gray-level co-occurrence matrix to quantitatively describe the gray-level spatial relationship and texture complexity of local regions on the surface of the metal composite material. Perform connected component analysis on the sparse matrix; calculate the aspect ratio, roundness, maximum axial length, and compactness of the defective target; Analyze the edge smoothness and shape proportion of the defect target to assess the degree of weakening of the cross section and stress concentration factor of the defect target on the metal composite structure. The specific steps for performing connected component analysis on a sparse matrix include: Density clustering algorithm is used to spatially aggregate pixels with high heterogeneity scores in a sparse matrix, dividing pixels that meet the density distribution requirements into different pixel clusters. An eight-connected-domain labeling algorithm is applied to the pixel clusters to identify and extract candidate boundaries for each independent defect target, constructing the geometric bounding rectangle of the defect target. A local reference plane is constructed through least-squares surface fitting, and the vertical residual between the pixel gray value and the reference plane in each connected region is calculated. The geometric residual is used to eliminate shadow interference caused by macroscopic curvature fluctuations of the metal surface. Based on the extracted defect connected domains, aspect ratio, roundness, maximum axial length, and compactness are calculated, mapping image features to physical parameters for evaluating the degree of weakening of the material structure cross-section and stress concentration factor by defects. An adaptive decision-making model based on a background statistical model is established. The specific steps for fusion discrimination based on the adaptive decision-making model include: performing multi-directional line segment analysis on a local window to calculate the dispersion of candidate defect targets and the least-squares surface fitting error; when the dispersion exceeds a preset threshold and the fitting error exceeds a preset tolerance, anomaly components are identified in the candidate region; the periodicity perpendicular to the extension direction of the anomaly components is calculated; when the periodicity is lower than a preset background texture distribution threshold, it is determined that the anomaly components have disrupted the regular texture distribution of the metal surface, excluding interference from normal processing traces; spatial coordinate overlap verification is performed on two-dimensional image features and three-dimensional spatial features; when two-dimensional grayscale contrast anomalies and three-dimensional depth abrupt changes coincide in spatial coordinate positions, it is determined to be physical damage; background statistical model parameters established by extracting low-rank matrices are used to correct preset thresholds in local anomaly identification and texture consistency verification in real time based on the fluctuation of surface roughness of metal composite materials; statistical feature vectors and geometric morphological attributes are fused for discrimination; the dispersion and periodicity of targets within the local window are combined to determine whether the anomaly components in the sparse matrix are physical damage; and the final quality inspection conclusion is output.

2. The intelligent detection method for surface defects of metal composite materials based on machine vision according to claim 1, characterized in that, The steps to convert the original image into an observation matrix include: A contrast-limited adaptive histogram equalization algorithm is used to divide the original image into multiple non-overlapping sub-regions. The defect manifestation degree of each pixel is calculated, and the size of the enhancement window is dynamically adjusted to smoothly transition concentrated gray values. The processed sub-regions are re-stitched using an interpolation algorithm to obtain a target enhanced image with smooth edges and optimized contrast. Multi-level wavelet decomposition is performed on the target enhanced image to obtain low-frequency approximate components and high-frequency detail components. An adaptive threshold selection strategy is applied to the high-frequency detail components to suppress Gaussian noise on the metal surface while preserving the abrupt signal of the crack edge. The denoised image data is mapped to a preset numerical range to construct an observation matrix that conforms to a statistically consistent distribution.

3. The intelligent detection method for surface defects of metal composite materials based on machine vision according to claim 1, characterized in that, The steps for decomposing the observation matrix into a low-rank matrix and a sparse matrix include: setting the linear weighted sum of the kernel norm of the low-rank matrix and the first norm of the sparse matrix as the minimization objective function; setting the sum of corresponding elements of the low-rank matrix and the sparse matrix equal to the corresponding elements of the observation matrix as a constraint condition for minimizing the objective function; applying the augmented Lagrange multiplier algorithm to iteratively calculate the minimization objective function in alternating directions, provided that the linear constraint equation is satisfied; during the iteration process, using the singular value thresholding operator to perform singular value shrinkage on the low-rank matrix; using the soft thresholding operator to perform element-level thresholding on the sparse matrix; stopping the calculation when the iterative calculation meets the preset convergence accuracy criterion and outputting the separated low-rank matrix and sparse matrix respectively.

4. The intelligent detection method for surface defects of metal composite materials based on machine vision according to claim 1, characterized in that, The steps for establishing a background statistical model include: calculating the mean, standard deviation, and gradient weight information of the grayscale of the low-rank matrix within a local sliding window to characterize the normal fiber flow texture features of the metal composite material surface; using historical observation data to estimate the probability density of the low-rank matrix to determine the grayscale fluctuation range and spatial distribution pattern of the normal surface texture; and correcting the statistical parameters of the low-rank components in real time according to the fluctuations in the production process to form a three-dimensional reference plane that dynamically points to the ideal smooth surface, serving as a benchmark for judging abnormal components.

5. The intelligent detection method for surface defects of metal composite materials based on machine vision according to claim 1, characterized in that, The specific steps for quantifying the gray-level spatial relationships and texture complexity of local regions on the surface of a metal composite material include: within a candidate defect region, statistically analyzing the probability distribution of pixel gray-level pairs with preset pixel intervals and preset directions to generate a gray-level co-occurrence matrix in four directions; evaluating the uniformity of local gray-level distribution by calculating the angular second moment of the gray-level co-occurrence matrix, and determining the difference between the high-energy state of the normal surface and the low-energy state at the defect location; calculating the entropy value of the gray-level co-occurrence matrix to measure the randomness of local image information, and using the local entropy value caused by the defect to increase the quantification of texture complexity; and calculating the contrast and correlation of the gray-level co-occurrence matrix to describe the gray-level difference between pixels and the linear relationship of spatial gray levels.

Citation Information

Patent Citations

  • Industrial product surface defect image analysis method for few-sample scene

    CN121391886A

  • Titanium alloy ring piece surface microcrack defect detection system based on machine vision

    CN121504929A