Modified metal surface defect detection method and device and medium
By acquiring multi-angle reflection image sequences and material property databases of modified metal surfaces, a defect-sensitive parameter set is generated for collaborative feature enhancement and joint detection. This solves the problem of insufficient defect features in traditional detection methods and achieves high-precision defect detection of modified metal surfaces.
Patent Information
- Application Number
- CN202511418850.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-02-03
AI Technical Summary
Traditional detection methods fail to fully combine the characteristics of modified metal materials and optical reflection features, making it difficult to comprehensively capture the spatial geometric and physical properties of defects. They are also susceptible to interference from surface textures and environmental noise, leading to misjudgment or missed detection of defects, and thus cannot meet the requirements for high-precision detection.
By acquiring multi-angle reflection image sequences of modified metal surfaces under multispectral light source illumination, and combining them with a pre-set modified metal material property database, a defect-sensitive parameter set is generated. Collaborative feature enhancement and joint anomaly detection are then performed to identify potential defect areas and conduct morphological quantitative analysis.
It enables accurate identification of defects on modified metal surfaces, improves the comprehensiveness and reliability of detection results, reduces misjudgment, amplifies weak feature signals in defect areas, and enhances the identifiability of defect features.
Smart Images

Figure CN121453774A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection, and in particular to a method, apparatus and medium for detecting defects on modified metal surfaces. Background Technology
[0002] Modified metal materials, due to their excellent mechanical properties and surface characteristics, are widely used in critical fields such as aerospace and high-end manufacturing. Surface defects directly affect the structural safety and service life of products; therefore, surface defect detection is a crucial step in ensuring the quality of modified metal products. The microstructure and macroscopic physical properties of modified metal surfaces significantly influence their optical reflection behavior. Traditional detection methods do not fully integrate the correlation between the inherent properties of the material and optical reflection characteristics, resulting in a lack of specificity in the extraction of defect-sensitive features. Furthermore, different defect types exhibit different optical behaviors at different incident angles, making it difficult for existing technologies to comprehensively capture the spatial geometric and physical properties of defects. These technologies are also susceptible to interference from surface textures and environmental noise, leading to misjudgments or missed detections, and failing to meet the demands of high-precision detection. Summary of the Invention
[0003] In view of this, the present invention provides a method, apparatus and medium for detecting defects on modified metal surfaces.
[0004] The technical solution of this invention is implemented as follows: In a first aspect, embodiments of the present invention provide a method for detecting defects on modified metal surfaces. The method includes: acquiring a multi-angle reflection image sequence of a modified metal surface under multi-spectral light source illumination, wherein the multi-angle reflection image sequence includes surface texture images under illumination at different incident angles and corresponding spectral reflectance distribution information; generating a defect-sensitive parameter set based on a preset modified metal material characteristic database and the spectral reflectance distribution information of the multi-angle reflection image sequence, wherein the defect-sensitive parameter set is used to characterize the differences in spectral response characteristics corresponding to different defect types; performing collaborative feature enhancement on the multi-angle reflection image sequence and the defect-sensitive parameter set, strengthening the feature contrast between defect regions and normal regions through weight allocation to obtain an enhanced defect feature set; performing joint anomaly detection in the spatial and spectral domains on the enhanced defect feature set to identify potential defect regions on the modified metal surface and generate defect region feature descriptors; and performing defect morphological quantitative analysis based on the defect region feature descriptors to determine the type, location, and severity level of defects on the modified metal surface.
[0005] Secondly, embodiments of the present invention provide a defect detection device, including a memory and a processor. The memory stores a computer program that can run on the processor, and the processor executes the program to implement the steps in the above-described method.
[0006] Thirdly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described above.
[0007] The modified metal surface defect detection method provided by this invention acquires a multi-angle reflection image sequence of the modified metal surface under multi-spectral light source illumination. It can simultaneously collect surface texture images and spectral reflectance distribution information at different incident angles, providing a multi-dimensional data foundation including spatial geometric features and physical property features for defect detection. This effectively compensates for the lack of defect feature information in traditional single-angle or single-spectrum detection. Based on a pre-set modified metal material property database, and combined with spectral reflectance distribution information, a defect-sensitive parameter set is generated. This allows for the targeted extraction of spectral response characteristic difference parameters corresponding to different defect types, enabling subsequent feature processing to focus on the essential differences between defects and normal areas, avoiding interference from irrelevant information. The method also supports multi-angle reflection... Collaborative feature enhancement is performed on the radiometric image sequence and the defect-sensitive parameter set. By assigning weights to strengthen the feature contrast between defective and normal regions, the weak feature signals of defective regions can be amplified, improving the identifiability of defect features. Joint anomaly detection in the spatial and spectral domains is performed on the enhanced defect feature set. This allows for comprehensive analysis of the spatial morphological features and spectral response features of defects, reducing the misjudgment problems that are prone to occur in single-domain detection, accurately identifying potential defective regions, and generating defect region feature descriptors containing multi-dimensional information. Based on the defect region feature descriptors, morphological quantitative analysis of defects is performed, enabling accurate determination of defects on modified metal surfaces from multiple aspects such as defect type, location, and severity level, improving the comprehensiveness and reliability of defect detection results. Attached Figure Description
[0008] Figure 1 This is a schematic diagram illustrating the implementation process of a modified metal surface defect detection method provided in an embodiment of the present invention.
[0009] Figure 2 This is a schematic diagram of the hardware entity of a defect detection device provided in an embodiment of the present invention. Detailed Implementation
[0010] This invention provides a method for detecting defects on modified metal surfaces, which can be executed by a processor of a defect detection device. The defect detection device can refer to a server, desktop computer, or other device with data processing capabilities.
[0011] Figure 1 This is a schematic diagram illustrating the implementation process of a modified metal surface defect detection method provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the method includes: Step S100: Obtain a multi-angle reflection image sequence of the modified metal surface under multi-spectral light source illumination. The multi-angle reflection image sequence includes surface texture images under light source illumination at different incident angles and corresponding spectral reflectance distribution information.
[0012] Multispectral light sources are light sources capable of emitting light in multiple different spectral bands. By illuminating modified metal surfaces with multispectral light sources, the reflection information of the metal surface under different spectral bands can be obtained. Multi-angle reflection image sequences are a series of images obtained by photographing the modified metal surface at different incident angles. These images not only contain the texture information of the metal surface but also record the distribution of the corresponding spectral reflectance. Surface texture images reflect the microscopic and macroscopic structural features of the metal surface, while the spectral reflectance distribution information reflects the metal's ability to reflect light in different spectral bands.
[0013] Step S200: Based on the preset modified metal material property database and combined with the spectral reflectance distribution information of the multi-angle reflection image sequence, a defect-sensitive parameter set is generated. The defect-sensitive parameter set is used to characterize the differences in spectral response characteristics corresponding to different defect types.
[0014] The pre-built modified metal material property database is a pre-established database containing information on the properties of various modified metals. It stores information such as the microstructural parameters, macroscopic physical parameters, and corresponding spectral reflectance characteristics of different types of modified metals. The spectral reflectance distribution information is the reflectance distribution of the metal surface in different spectral bands recorded in a multi-angle reflectance image sequence. The defect-sensitive parameter set is a set of parameters that can sensitively reflect the differences in the spectral response characteristics of different defect types. These parameters allow for more accurate identification and differentiation of different types of defects.
[0015] In an exemplary implementation, step S200 may include the following steps S210 to S260: Step S210: Retrieve the microstructure parameters and macrophysical parameters corresponding to the target metal type from the modified metal material property database. The microstructure parameters include the spatial distribution map of dislocation density and the precipitate size gradient data, while the macrophysical parameters include the stress field distribution characteristics and the temperature field response coefficient.
[0016] The modified metal material property database stores a large amount of material property information for different types of modified metals. The target metal type refers to the specific modified metal type that needs to be inspected for defects. Microstructure parameters reflect the characteristics of the metal's internal microstructure. The dislocation density spatial distribution map describes the spatial distribution of dislocation density within the metal. Dislocations are defects in metal crystals, and their density distribution affects the metal's mechanical properties and spectral response characteristics. Precipitation size gradient data records the variation in the size of precipitates at different locations within the metal; the presence of precipitates also affects the metal's properties. Macroscopic physical parameters describe the metal's physical properties at a macroscopic level. Stress field distribution characteristics reflect the distribution of stress within the metal; the presence of stress leads to deformation and changes in the spectral response. The temperature field response coefficient represents the metal's response characteristics to temperature changes; temperature changes also affect the metal's spectral reflectance.
[0017] Step S220: Perform band-based analysis on the spectral reflectance distribution information of the multi-angle reflectance image sequence, and extract the characteristic band reflectance data at each incident angle based on the characteristic absorption peak position of the modified metal. The characteristic bands include multiple continuous spectral intervals that are sensitive to defect response.
[0018] Band-wise analysis refers to the analysis and processing of spectral reflectance distribution information from multi-angle reflectance image sequences according to different spectral bands. The characteristic absorption peak positions of modified metals refer to the locations where the metal's ability to absorb light is strongest within a specific spectral band; these positions are usually related to the metal's chemical composition and microstructure. Characteristic bands refer to multiple continuous spectral ranges containing defect-sensitive regions; within these ranges, defects on the metal surface can significantly affect spectral reflectance.
[0019] When performing band-specific analysis, the positions of the characteristic absorption peaks of the modified metal are first determined. This can be done by analyzing the spectral reflectance data of a large number of known modified metal samples to identify the positions of these characteristic absorption peaks. Then, based on these peak positions, the characteristic bands are determined. For the spectral reflectance distribution information of multi-angle reflectance image sequences, the data is divided according to the characteristic bands, and the reflectance data for each incident angle is extracted. For example, spectral analysis software can be used to process the spectral reflectance data, and the reflectance values for the corresponding bands can be extracted based on a preset characteristic band range.
[0020] Step S230: Calculate the integral difference between the characteristic band reflectance data and the standard spectral reflectance curve in the corresponding band interval, and construct a three-dimensional spectral integral difference matrix. The row dimension of the matrix corresponds to the incident angle, the column dimension corresponds to the spectral band, and the depth dimension corresponds to the band type.
[0021] The characteristic band reflectance data are the characteristic band reflectance data extracted in step S220 at each incident angle. The standard spectral reflectance curve is a pre-defined curve representing the spectral reflectance characteristics of a normal modified metal surface. The integral difference refers to the difference in the integral area between the characteristic band reflectance data and the standard spectral reflectance curve within the corresponding band interval. The three-dimensional spectral integral difference matrix is a three-dimensional matrix used to store integral difference information, where the row dimension corresponds to different incident angles, the column dimension corresponds to different spectral bands, and the depth dimension corresponds to different band types.
[0022] In an exemplary implementation, step S230 may include the following steps S231 to S236: Step S231: The standard spectral reflectance curve is calibrated using a temperature compensation model and a humidity compensation model. The influence of temperature and humidity fluctuations on the standard curve is eliminated based on the environmental response model of the target metal, and the calibrated standard spectral curve is obtained.
[0023] Temperature compensation and humidity compensation models are pre-established models used to compensate for the effects of temperature and humidity on spectral reflectance. The environmental response model of the target metal describes the variation of its spectral reflectance characteristics under different temperature and humidity environments. The standard spectral reflectance curve is measured under ideal environmental conditions, but in actual measurements, temperature and humidity fluctuate, affecting spectral reflectance. Calibrating the standard spectral reflectance curve using temperature and humidity compensation models eliminates the influence of temperature and humidity fluctuations, resulting in a more accurate calibrated standard spectral curve.
[0024] During calibration, the temperature and humidity information of the current measurement environment are first acquired. This information is then input into temperature and humidity compensation models to calculate the impact of temperature and humidity fluctuations on the standard spectral reflectance curve. Finally, these impacts are subtracted from the standard spectral reflectance curve to obtain the calibration standard spectral reflectance curve. For example, the temperature compensation model can be a linear regression model, obtained by fitting a large amount of spectral reflectance data measured at different temperatures. The current temperature information is input into this model to calculate the effect of temperature on spectral reflectance, and then the standard spectral reflectance curve is adjusted accordingly.
[0025] Step S232: Based on the characteristic absorption peak wavelength position of the modified metal, divide the effective integration interval of each characteristic band, determine the start and end wavelengths of integration for each band, and ensure that the effective integration interval covers the characteristic absorption band corresponding to the defect type.
[0026] The characteristic absorption peak wavelength of a modified metal refers to the wavelength at which the metal absorbs light most strongly within a specific spectral band. The effective integration interval refers to the integration range within the characteristic band that effectively reflects defect information. The start and end wavelengths of integration for each band refer to the beginning and end wavelengths of the effective integration interval. The characteristic absorption bands corresponding to different defect types refer to the bands in which different types of defects exhibit significant absorption phenomena within specific spectral bands.
[0027] When defining the effective integration interval, the approximate range of each characteristic band is determined based on the wavelength positions of the characteristic absorption peaks of the modified metal. Then, the characteristic absorption bands corresponding to different defect types are further analyzed, and the effective integration interval is set to cover these characteristic absorption bands. For example, by performing spectral analysis on a large number of modified metal samples with different defect types, the characteristic absorption bands corresponding to each defect type are identified. Then, within the characteristic bands, the effective integration interval encompassing these characteristic absorption bands is determined, and its start and end wavelengths are identified.
[0028] Step S233: Calculate the difference in the integral area between the measured reflectance curve and the calibration standard spectral curve in the corresponding integral interval at each incident angle to obtain the single-band integral difference value. The integral area is obtained by accumulating the reflectance values of continuous bands.
[0029] The measured reflectance curve refers to the reflectance curve of the characteristic band actually measured at each incident angle. The calibration standard spectral curve is the calibrated standard spectral curve obtained in step S231. The corresponding integration interval refers to the effective integration interval of each characteristic band determined in step S232. The single-band integration difference value refers to the difference in the integration area between the measured reflectance curve and the calibration standard spectral curve within the corresponding integration interval. The integration area is obtained by accumulating the reflectance values of continuous bands, that is, by summing the reflectance values within the integration interval.
[0030] When calculating the integral area difference, the range of the corresponding integration interval is first determined. Then, the reflectance values of the measured reflectance curve and the calibration standard spectral curve within this integration interval are accumulated to obtain their integral areas. Finally, the difference between the two integral areas is calculated to obtain the single-band integral difference value. For example, a numerical integration algorithm, such as the trapezoidal integration method, can be used to integrate the reflectance values of the measured reflectance curve and the calibration standard spectral curve within the integration interval. The integration interval is divided into multiple smaller intervals, and the area under the curve in each smaller interval is approximated by the area of a trapezoid. Then, the areas of all smaller intervals are added together to obtain the integral area.
[0031] Step S234: Arrange the single-band integral difference values into an initial three-dimensional integral difference matrix according to the three-dimensional order of incident angle, spectral band and band type. The matrix elements represent the degree of integral area deviation for a specific angle, band and type.
[0032] Incident angle, spectral band, and band type are three distinct dimensions used to describe the distribution of single-band integral difference values. The initial three-dimensional integral difference matrix is a three-dimensional matrix used to store single-band integral difference values, where each element represents the degree of integral area deviation under a specific angle, band, and type.
[0033] When arranging the initial three-dimensional integral difference matrix, first determine that the row dimension, column dimension, and depth dimension of the matrix correspond to the incident angle, spectral band, and band type, respectively. Then, fill the matrix with the single-band integral difference value corresponding to each incident angle, spectral band, and band type in three-dimensional order. For example, if there are N incident angles, M spectral bands, and K band types, the size of the matrix is N×M×K. Fill the corresponding position of the matrix with the single-band integral difference value for each combination. The larger the value of the matrix element, the greater the degree of deviation of the integral area under that specific angle, band, and type.
[0034] Step S235: Perform adaptive threshold denoising on the initial three-dimensional integral difference matrix. By identifying abnormal jump elements in the matrix and replacing them with neighborhood mean values, noise interference is eliminated and effective difference signals caused by defects are preserved.
[0035] Adaptive threshold denoising is a denoising method that automatically adjusts the threshold based on the characteristics of the matrix itself. Abnormal jump elements refer to elements in the initial 3D integral difference matrix whose values show significant jumps compared to their surrounding elements; these elements may be caused by noise interference. The neighborhood mean is the average value of the neighboring elements of the abnormal jump element. The effective difference signal refers to the integral difference signal caused by defects, which needs to be preserved during the denoising process.
[0036] In adaptive thresholding denoising, an adaptive threshold is first determined. This threshold can be determined by calculating the statistical characteristics of the matrix elements, such as the mean and standard deviation. Then, the initial three-dimensional integral difference matrix is traversed to identify anomalous transition elements. For each anomalous transition element, its neighborhood mean is calculated, and the value of the anomalous transition element is replaced with the neighborhood mean.
[0037] Step S236: Map the elements of each dimension of the matrix to a unified numerical range through a cross-dimensional normalization algorithm, so that the differences in different angles, bands and types have horizontal comparability, and construct a three-dimensional spectral integral difference matrix.
[0038] Cross-dimensional normalization is an algorithm used to map the elements of a matrix to a unified numerical range. Differences from different angles, bands, and types may have different numerical ranges in the initial three-dimensional integral difference matrix. Cross-dimensional normalization makes these differences comparable laterally. The three-dimensional spectral integral difference matrix is a normalized matrix where the numerical ranges of the elements in each dimension are unified, facilitating subsequent analysis and processing. When performing cross-dimensional normalization, a unified numerical range is first determined, for example, [0,1]. Then, the cross-dimensional normalization algorithm is used to map the elements of each dimension of the initial three-dimensional integral difference matrix. A linear normalization method can be used: for each element in the matrix, subtract the minimum value of that dimension, and then divide by the difference between the maximum and minimum values of that dimension to obtain the normalized element value.
[0039] Step S240: Based on the spatial distribution map of dislocation density in the microstructure parameters, the three-dimensional spectral integral difference matrix is weighted and corrected. The spectral difference characteristics of the high-stress region are enhanced by the dislocation density gradient, and the dislocation correction difference matrix is obtained.
[0040] The spatial distribution map of dislocation density in the microstructure parameters describes the spatial distribution of dislocation density within the metal. The dislocation density gradient refers to the rate of change of dislocation density in space; high-stress regions typically correspond to higher dislocation density gradients. The three-dimensional spectral integral difference matrix, constructed in step S236, reflects the spectral integral differences under different angles, bands, and types. The dislocation correction difference matrix, obtained after weighted correction, enhances the spectral difference characteristics of high-stress regions, allowing for a more accurate reflection of defects on the metal surface.
[0041] In an exemplary implementation, step S240 may include the following steps S241 to S245: Step S241: Convert the spatial distribution map of dislocation density into a dislocation density gradient distribution map using a spatial mapping algorithm. The spatial resolution of the dislocation density gradient distribution map is consistent with the image resolution of the multi-angle reflection image sequence.
[0042] Dislocation density gradient maps describe the spatial distribution of the rate of change of dislocation density. Spatial resolution refers to the size of the smallest resolvable spatial unit in an image or spectrum. Maintaining the spatial resolution of the dislocation density gradient map consistent with the image resolution of the multi-angle reflectance image sequence ensures an accurate spatial correspondence between the dislocation density distribution and spectral difference features.
[0043] When performing spatial mapping, the spatial mapping algorithm is first determined. Numerical calculation methods such as the finite difference method can be used to process the spatial distribution map of dislocation density, calculate the rate of change of dislocation density in each direction, and obtain the dislocation density gradient distribution map. For example, for each pixel in the spatial distribution map of dislocation density, the rate of change of dislocation density in the horizontal and vertical directions is calculated, and these rates of change are combined into a dislocation density gradient vector. Then, the magnitude of the dislocation density gradient vector is used as the dislocation density gradient value of that pixel to generate the dislocation density gradient distribution map.
[0044] Step S242: Register the spatial dimension of the dislocation density gradient distribution map with the three-dimensional spectral integral difference matrix by feature point matching, so that the dislocation density distribution and spectral difference features correspond one-to-one in spatial location.
[0045] Feature point matching is a method for registering the spatial dimensions of a dislocation density gradient map with a three-dimensional spectral integral difference matrix. By finding and matching feature points in both the dislocation density gradient map and the three-dimensional spectral integral difference matrix, a one-to-one spatial correspondence between the two can be achieved.
[0046] When performing feature point matching, feature points are first extracted from the dislocation density gradient distribution map and the three-dimensional spectral integral difference matrix. Corner detection algorithms, such as the Harris corner detection algorithm, can be used to extract corners as feature points from the dislocation density gradient distribution map. For the three-dimensional spectral integral difference matrix, it can be projected onto a two-dimensional plane, and then feature points can be extracted using the same corner detection algorithm. Then, feature point matching algorithms, such as SIFT (Scale Invariant Feature Transform) or SURF (Accelerated Robust Feature Transform), are used to match the feature points in the dislocation density gradient distribution map and the three-dimensional spectral integral difference matrix. Based on the matching results, transformations such as translation, rotation, and scaling are applied to the dislocation density gradient distribution map or the three-dimensional spectral integral difference matrix to ensure spatial dimensional registration, resulting in a one-to-one correspondence between the dislocation density distribution and the spectral difference features in spatial location.
[0047] Step S243: Calculate the spatial weight coefficients based on the dislocation density gradient. The higher the dislocation density gradient, the larger the weight coefficient. The weight coefficients are generated through the nonlinear mapping of the dislocation density gradient.
[0048] The dislocation density gradient refers to the rate of change of dislocation density in space. Spatial weighting coefficients are used to weight and correct the three-dimensional spectral integral difference matrix. Regions with higher dislocation density gradients indicate higher stress concentration and potentially more defects, thus warranting larger weighting coefficients. Nonlinear mapping refers to the process of converting dislocation density gradient values into weighting coefficients through a nonlinear function.
[0049] When calculating spatial weighting coefficients, the nonlinear mapping function is first determined. Nonlinear functions such as exponential or logarithmic functions can be used, taking the dislocation density gradient values as input, and calculating the corresponding weighting coefficients through this function. For example, the exponential function w=e k·g Where w is the weighting coefficient, g is the dislocation density gradient value, and k is a preset constant. For each pixel in the dislocation density gradient distribution map, its dislocation density gradient value is substituted into the nonlinear mapping function to calculate the corresponding weighting coefficient.
[0050] Step S244: Perform element-wise weighting operations on the spatial weighting coefficients and the three-dimensional spectral integral difference matrix to enhance the spectral difference values in high-weight regions and suppress background noise interference in low-weight regions; perform gradient enhancement processing on the weighted matrix by calculating the spatial gradient values of matrix elements and superimposing them on the original matrix to highlight the integral difference gradient change characteristics of the defect edge region.
[0051] Element-wise weighting refers to multiplying the spatial weight coefficients by each element of the three-dimensional spectral integral difference matrix. This operation enhances the spectral difference values in high-weight regions, as these regions correspond to higher dislocation density gradients and potentially more defects, while suppressing background noise interference in low-weight regions. Gradient enhancement involves processing the weighted matrix by calculating the spatial gradient values of its elements and superimposing them onto the original matrix, thus highlighting the integral difference gradient changes in defect edge regions.
[0052] During element-wise weighted calculations, each element in the three-dimensional spectral integral difference matrix is multiplied by its corresponding spatial weight coefficient to obtain the weighted element value. For gradient enhancement, gradient calculation algorithms, such as the Sobel or Prewitt operators, are used to calculate the spatial gradient values of the weighted matrix elements. Then, the calculated gradient values are superimposed onto the original matrix to highlight the integral difference gradient variation characteristics of the defect edge region.
[0053] Step S245: Optimize the gradient-enhanced matrix using an adaptive smoothing algorithm to eliminate local artifacts introduced during the weighting process and generate a dislocation correction difference matrix.
[0054] Adaptive smoothing algorithms are algorithms that automatically adjust smoothing parameters based on the characteristics of the matrix itself. Local artifacts refer to local anomalies introduced during weighted and gradient enhancement processes due to computational errors or noise. The dislocation correction difference matrix is a matrix obtained after optimization using an adaptive smoothing algorithm, eliminating local artifacts and more accurately reflecting the defects on the metal surface. During optimization, adaptive smoothing algorithms such as Gaussian smoothing or bilateral filtering can be used to process the gradient-enhanced matrix. For example, using Gaussian smoothing, the size of the Gaussian kernel is automatically adjusted based on the local variance of the matrix elements to smooth the matrix. For each element in the matrix, a suitable Gaussian kernel size is determined based on the variance of its surrounding elements, and then convolution is performed using this Gaussian kernel to obtain the smoothed element values.
[0055] Step S250: Couple the dislocation correction difference matrix with the stress field distribution characteristics in the macroscopic physical parameters to form a model. Correct the spectral response deviation caused by the elastic deformation of the material through the stress field sensitive factor to generate the stress correction difference matrix.
[0056] The dislocation correction difference matrix, generated in step S245, reflects the influence of dislocation density on spectral differences. The stress field distribution characteristics in the macroscopic physical parameters describe the distribution of stress within the metal. Coupled modeling refers to combining the dislocation correction difference matrix with the stress field distribution characteristics, considering their interaction. The stress field sensitivity factor is used to correct spectral response deviations caused by elastic deformation of the material. Under stress, the material undergoes elastic deformation, which leads to deviations in the spectral response; these deviations can be corrected using the stress field sensitivity factor. The stress correction difference matrix, obtained after coupled modeling and correction, more accurately reflects the defects on the metal surface.
[0057] In coupled modeling, the dislocation correction difference matrix is first spatially matched with the stress field distribution characteristics. This can be achieved through methods such as coordinate mapping, ensuring a one-to-one spatial correspondence between elements in the dislocation correction difference matrix and stress field distribution characteristics. Then, the stress field sensitivity factor is calculated based on the stress field distribution characteristics. The stress field sensitivity factor can be calculated based on factors such as the magnitude and direction of the stress. Finally, each element in the dislocation correction difference matrix is multiplied by its corresponding stress field sensitivity factor to obtain the corrected element value, thus generating the stress correction difference matrix. For example, for a specific element in the dislocation correction difference matrix, the stress field sensitivity factor is calculated based on its corresponding stress field distribution; multiplying the element's value by the stress field sensitivity factor yields the stress-corrected element value.
[0058] Step S260: Integrate the band response characteristics and angle dependence in the stress correction difference matrix, extract key response parameters through feature dimensionality reduction technology, and generate a set of defect-sensitive parameters including band weight coefficients, angle sensitivity factors, and physical field correction coefficients.
[0059] The band response characteristics in the stress-corrected difference matrix refer to the response of different spectral bands in the matrix, while the angle dependence refers to the response under different incident angles. Band weight coefficients reflect the importance of different spectral bands in defect detection, angle sensitivity factors reflect the influence of different incident angles on defect detection, and physical field correction coefficients are used to correct the influence of the physical field on the spectral response. The defect-sensitive parameter set is a set of parameters that can sensitively reflect the differences in spectral response characteristics of different defect types.
[0060] When fusing band response characteristics and angle dependence, the elements in the stress correction difference matrix are rearranged and analyzed according to band and angle. Then, feature reduction techniques, such as Principal Component Analysis (PCA) or Linear Discriminant Analysis (LDA), are used to process the fused data and extract key response parameters. For example, using PCA, the covariance matrix of the data is calculated, and the eigenvalues and eigenvectors of the covariance matrix are solved. The principal components with the largest eigenvalues are selected as key response parameters. Based on these key response parameters, band weighting coefficients, angle sensitivity factors, and physical field correction coefficients are calculated. For example, by analyzing the contribution of key response parameters at different bands and angles, the band weighting coefficients and angle sensitivity factors are determined; based on the influence of the physical field on the spectral response, the physical field correction coefficients are determined. Finally, these coefficients are combined into a set of defect-sensitive parameters.
[0061] Step S300: Perform collaborative feature enhancement on the multi-angle reflection image sequence and the defect-sensitive parameter set, and enhance the feature contrast between the defect area and the normal area through weight allocation to obtain an enhanced defect feature set.
[0062] The multi-angle reflection image sequence contains texture images and spectral reflectance distribution information of the modified metal surface under different incident angles. The defect-sensitive parameter set is a set of parameters generated in step S260, including band weight coefficients, angle sensitivity factors, and physical field correction coefficients. Collaborative feature enhancement refers to comprehensively considering the multi-angle reflection image sequence and the defect-sensitive parameter set, and through reasonable weight allocation, strengthening the feature contrast between defective and normal areas, making defects more obvious. The enhanced defect feature set is the feature set obtained after collaborative feature enhancement processing, which is more conducive to subsequent defect detection and recognition.
[0063] In an exemplary implementation, step S300 may include the following steps S310 to S360: Step S310: Divide the multi-angle reflection image sequence into image block units with overlapping edges according to spatial topological relationships. The overlapping edge parts retain the transition features of adjacent image blocks so that the defect area is not segmented during the block division process.
[0064] Spatial topology refers to the spatial positions and connections between pixels in an image. An image block unit is a small patch of an image obtained by dividing a multi-angle reflection image sequence according to certain rules. Edge overlap refers to the overlapping area between adjacent image blocks. Preserving the transition features between adjacent image blocks can make the transition between image blocks more natural and avoid segmenting defective areas during the block division process.
[0065] When dividing an image into blocks, the size and shape of the blocks are determined based on the spatial topological relationships of the multi-angle reflection image sequence. For example, the image can be divided into square or rectangular blocks. Simultaneously, the edge overlap size is set to ensure a certain overlap between adjacent blocks. During the division process, care should be taken to ensure that defective regions are contained as completely as possible within one or more image blocks, avoiding the segmentation of defective regions. For example, for an image containing defects, by appropriately selecting the size and overlap of the image blocks, the defective regions can be completely contained within a single image block or multiple adjacent image blocks.
[0066] Step S320: Extract band weight coefficients, angle sensitivity factors and physical field correction coefficients from the defect-sensitive parameter set, establish the spatial mapping relationship between parameters and image block units, and obtain the parameter-image block association distribution.
[0067] The defect-sensitive parameter set is a set of parameters generated in step S260, including band weighting coefficients, angle sensitivity factors, and physical field correction coefficients. Band weighting coefficients reflect the importance of different spectral bands in defect detection, angle sensitivity factors reflect the influence of different incident angles on defect detection, and physical field correction coefficients are used to correct the influence of the physical field on the spectral response. Spatial mapping refers to establishing a spatial correspondence between the band weighting coefficients, angle sensitivity factors, and physical field correction coefficients and image block units. The parameter-image block association distribution is a distribution describing the association between parameters and image block units. When extracting parameters, the band weighting coefficients, angle sensitivity factors, and physical field correction coefficients are extracted from the defect-sensitive parameter set. Then, based on the spatial location, spectral band, incident angle, and other information of the image block units, a spatial mapping relationship between the parameters and the image block units is established. For example, for each image block unit, based on its corresponding spectral band and incident angle, appropriate values are selected from the band weighting coefficients and angle sensitivity factors, and associated with that image block unit. Simultaneously, based on the physical field environment where the image patch unit is located, corresponding values are selected from the physical field correction coefficients and associated with that image patch unit. In this way, the parameter-image patch association distribution is obtained.
[0068] Step S330: Extract the texture distribution features and spectral response features of each image block unit. The texture distribution features include regional gray-level co-occurrence matrix features and gradient direction distribution features. The spectral response features include multi-band reflectance difference features and spectral curve morphology features.
[0069] Image block units are small image patches obtained in step S310. Texture distribution features describe the distribution of texture within the image block unit. The regional gray-level co-occurrence matrix (GMM) feature is a statistical feature used to describe image texture, reflecting the spatial distribution of gray values in the image. Gradient direction distribution features describe the distribution of gradient directions in the image, reflecting the directional information of texture. Spectral response features describe the response of the image block unit in different spectral bands. Multi-band reflectance difference features reflect the differences in reflectance under different spectral bands. Spectral curve morphology features describe the shape and characteristics of the spectral curve. When extracting texture distribution features, for each image block unit, its regional gray-level co-occurrence matrix is calculated. The regional gray-level co-occurrence matrix is a two-dimensional matrix that records the frequency of occurrence of different gray value pairs in the image at a certain distance and direction. Based on the regional gray-level co-occurrence matrix, a series of statistical features, such as contrast, correlation, energy, and homogeneity, can be calculated. Simultaneously, gradient calculation algorithms, such as the Sobel operator or the Prewitt operator, are used to calculate the gradient direction distribution features of the image block unit. When extracting spectral response features, the reflectance data of image block units in different spectral bands are analyzed to calculate the multi-band reflectance difference features, such as the difference or ratio of reflectance in different bands. At the same time, the spectral curves are fitted and analyzed to extract the morphological features of the spectral curves, such as the peak value, valley value, and slope of the curve.
[0070] Step S340: Construct a dynamic weight calculation model based on the physical field correction coefficients in the defect-sensitive parameter set, and calculate the dynamic weight value of each image block unit by combining the dislocation density distribution and stress field distribution characteristics, so that regions with relatively high dislocation density gradients can obtain higher weight allocation.
[0071] The physical field correction coefficients in the defect-sensitive parameter set are used to correct the influence of the physical field on the spectral response. The dynamic weight calculation model is a model that calculates the dynamic weight values of each image block unit based on the physical field correction coefficients, dislocation density distribution, and stress field distribution characteristics. The dislocation density distribution describes the spatial distribution of dislocation density within the metal, while the stress field distribution characteristics describe the distribution of stress within the metal. The dynamic weight values reflect the importance of each image block unit in defect detection; regions with relatively high dislocation density gradients usually correspond to more defects and therefore should receive higher weight allocations.
[0072] In an exemplary implementation, step S340 may include the following steps S341 to S346: Step S341: Analyze the physical field correction coefficients in the defect-sensitive parameter set, and separate the dislocation density correction component and the stress field correction component. The dislocation density correction component characterizes the degree of influence of the dislocation concentration region on the spectral reflectance characteristics, and the stress field correction component characterizes the modulation effect of stress distribution on reflectance.
[0073] The physical field correction coefficient for the defect-sensitive parameter set is a coefficient that comprehensively considers the influence of the physical field on the spectral response. The dislocation density correction component is the part of the physical field correction coefficient used to correct the influence of dislocation density on spectral reflectance characteristics, reflecting the degree of influence of dislocation concentration regions on spectral reflectance characteristics. The stress field correction component is the part of the physical field correction coefficient used to correct the influence of the stress field on reflectivity, reflecting the modulation effect of stress distribution on reflectivity.
[0074] Step S342: Adjust the spatial scale of the separated dislocation density correction component and stress field correction component, and make them consistent with the spatial size of the image block unit through interpolation, so that the physical field parameters correspond to the image block unit block by block, and each image block unit corresponds to a set of dislocation density correction values and stress field correction values.
[0075] The separated dislocation density correction component and stress field correction component may have different spatial scales, inconsistent with the spatial size of the image block unit. Interpolation is a method used to adjust the spatial scale of the data, making the spatial scales of the dislocation density correction component and stress field correction component consistent with the spatial size of the image block unit. Block-by-block correspondence between physical field parameters and image block units means that each image block unit has a corresponding dislocation density correction value and stress field correction value, allowing for more accurate correction of each image block unit.
[0076] When adjusting the spatial scale, interpolation algorithms, such as bilinear interpolation or cubic spline interpolation, are used to process the dislocation density correction component and the stress field correction component. First, the spatial size and location of the image block unit are determined. Then, based on the original spatial scale and data distribution of the dislocation density correction component and the stress field correction component, the interpolation algorithm is used to interpolate them to the same spatial scale as the image block unit. For example, for the dislocation density correction component, its data points at the original spatial scale are interpolated to obtain a dislocation density correction value consistent with the spatial size of the image block unit. For each image block unit, the corresponding dislocation density correction value and stress field correction value are selected from the interpolated data, so that each image block unit corresponds to a set of dislocation density correction values and stress field correction values.
[0077] Step S343: Based on the correlation between dislocation density and reflectivity, the dislocation density correction value of each image block unit is converted into a corresponding dislocation sensitivity weight value. The dislocation sensitivity weight value increases as the dislocation density correction value increases.
[0078] The relationship between dislocation density and reflectivity refers to the impact of changes in dislocation density on reflectivity, an impact that can be determined through experimental or theoretical analysis. The dislocation density correction value is the dislocation density correction value corresponding to each image block unit obtained in step S342. The dislocation sensitivity weight value is a weight value converted from the dislocation density correction value, reflecting the influence of dislocation density on the importance of image block units in defect detection. The dislocation sensitivity weight value increases with the increase of the dislocation density correction value.
[0079] When converting dislocation sensitivity weight values, a correlation model between dislocation density and reflectivity is first established. This can be achieved by analyzing a large amount of experimental data to fit a functional relationship between dislocation density and reflectivity. For example, a mathematical model of dislocation density and reflectivity can be established using linear or nonlinear regression methods. Then, based on this correlation model, the dislocation density correction value for each image block unit is substituted into the model to calculate the corresponding dislocation sensitivity weight value. For example, if the correlation model between dislocation density and reflectivity is a linear function, the dislocation density correction value is used as input to calculate the corresponding dislocation sensitivity weight value. Since the dislocation sensitivity weight value increases with the dislocation density correction value, a larger dislocation density correction value will result in a larger calculated dislocation sensitivity weight value.
[0080] Step S344: Based on the mapping relationship between stress distribution and reflectivity, the stress field correction value of each image block unit is converted into the corresponding stress-sensitive weight value. The stress-sensitive weight value increases as the stress field correction value increases.
[0081] The mapping relationship between stress distribution and reflectivity refers to the influence of stress distribution on reflectivity, which can be obtained through experimental or theoretical analysis. The stress field correction value is the stress field correction value corresponding to each image block unit obtained in step S342. The stress sensitivity weight value is a weight value converted from the stress field correction value, reflecting the influence of the stress field on the importance of the image block unit in defect detection. The stress sensitivity weight value increases with the increase of the stress field correction value.
[0082] When converting stress-sensitive weight values, a mapping model between stress distribution and reflectivity is first established. This can be achieved by analyzing a large amount of experimental data to fit a functional relationship between stress distribution and reflectivity. For example, a mathematical model of stress distribution and reflectivity can be established using linear or nonlinear regression methods. Then, based on this mapping model, the stress field correction value for each image block unit is substituted into the model to calculate the corresponding stress-sensitive weight value.
[0083] Step S345: Multiply the dislocation-sensitive weight value and the stress-sensitive weight value of each image block unit to obtain the initial dynamic weight value of each image block unit.
[0084] The dislocation-sensitive weight value is the dislocation-sensitive weight value corresponding to each image block unit calculated in step S343, and the stress-sensitive weight value is the stress-sensitive weight value corresponding to each image block unit calculated in step S344. The initial dynamic weight value is obtained by multiplying the dislocation-sensitive weight value and the stress-sensitive weight value, taking into account the influence of dislocation density and stress field on image block units in defect detection.
[0085] Step S346: Perform neighborhood averaging on the initial dynamic weight values of all image block units. By calculating the weighted average of the initial dynamic weight values of each image block unit and its neighboring image block units, local weight abrupt changes are eliminated. The dynamic weight values of all image block units under the same incident angle are normalized so that the sum of the weight values is a unified reference value, thus obtaining the dynamic weight value of each image block unit.
[0086] Neighborhood averaging is a method used to smooth data. By calculating the weighted average of the initial dynamic weight values of each image block unit and its neighboring image block units, local weight abrupt changes can be eliminated, making the distribution of weight values smoother.
[0087] During neighborhood averaging, for each image patch unit, the range of its neighboring image patch units is determined. For example, the eight neighboring image patch units around the current image patch unit can be selected. Then, according to a certain weighting rule, a weighted average of the initial dynamic weight values of the current image patch unit and its neighboring image patch units is calculated. For example, an equal-weighted average or a distance-weighted average method can be used. During normalization, for all image patch units at the same incident angle, their dynamic weight values are summed. Then, the dynamic weight value of each image patch unit is divided by this sum to obtain the normalized dynamic weight value.
[0088] Step S350: Perform multi-scale fusion of local structural features and global distribution features for image patch features under different incident angles according to dynamic weight values, highlighting the consistent performance of defect features under different observation angles.
[0089] Image patch features at different incident angles refer to the features possessed by each image patch unit at different incident angles, including texture distribution features and spectral response features. The dynamic weight value is the weight value corresponding to each image patch unit obtained in step S346, reflecting the importance of that image patch unit in defect detection. Local structural features describe the structural information of local regions within an image patch unit, such as edges and textures. Global distribution features describe the distribution information of the image patch unit throughout the entire image, such as grayscale distribution and shape. Multi-scale fusion refers to fusing local structural features and global distribution features at different scales to highlight the consistent performance of defect features under different observation angles.
[0090] In an exemplary implementation, step S350 may include the following steps S351 to S356: Step S351: Decompose the image block features at each incident angle into a local structural feature layer and a global distribution feature layer using a feature scale separation algorithm. The local structural feature layer contains gradient change information of the defect edge contour and directional distribution information of the surface texture. The global distribution feature layer contains spatial distribution information of regional gray levels and morphological features of the overall structure.
[0091] Image patch features at different incident angles refer to the characteristics of each image patch unit under different incident angles, including texture distribution features and spectral response features. Feature scale separation algorithms are used to decompose image patch features into features at different scales. This algorithm can decompose image patch features into a local structural feature layer and a global distribution feature layer. The local structural feature layer describes the structural information of local regions within the image patch unit; gradient changes in defect edge contours reflect the steepness of the defect edge, and the directional distribution information of surface texture describes the direction of the texture. The global distribution feature layer describes the distribution information of the image patch unit throughout the entire image; spatial distribution information of regional gray levels reflects the distribution of gray values in the image, and the morphological features of the overall structure describe the overall shape and structure of the image patch unit.
[0092] When performing feature scale separation, feature scale separation algorithms, such as Gaussian pyramid or Laplacian pyramid algorithms, are used to process image patch features at various incident angles. First, the image patch features are downsampled multiple times to obtain feature representations at different scales. Then, based on the scale and properties of the features, they are decomposed into a local structural feature layer and a global distribution feature layer. For example, using the Gaussian pyramid algorithm, the image patch features are Gaussian smoothed and downsampled multiple times to obtain feature images at different scales. Smaller-scale feature images are used as the local structural feature layer, while larger-scale feature images are used as the global distribution feature layer.
[0093] Step S352: Use an edge detection operator to extract features from the local structural feature layer, capture the gray-level change rate of adjacent pixels in the image block, and generate an edge gradient magnitude matrix and a texture direction histogram. The edge gradient magnitude matrix reflects the steepness of the defect edge, and the texture direction histogram records the distribution pattern of the texture direction.
[0094] An edge detection operator is an operator used to detect edges in an image. It detects edges by calculating the rate of change in grayscale between adjacent pixels. An edge gradient magnitude matrix is a matrix that records the magnitude of edge gradients in an image, reflecting the steepness of the edge; a larger gradient magnitude indicates a steeper edge. A texture orientation histogram is a histogram used to describe the distribution of texture orientations in an image, recording the distribution patterns of texture directions.
[0095] During feature extraction, for local structural feature layers, edge detection operators, such as the Sobel or Canny operators, are used to calculate the gray-level change rate between adjacent pixels. For each pixel, its gradient values in the horizontal and vertical directions are calculated, and then the edge gradient magnitude and texture direction are calculated based on these two gradient values. The edge gradient magnitude is stored in an edge gradient magnitude matrix, and the texture direction is statistically represented in a texture direction histogram.
[0096] Step S353: Perform regional statistical analysis on the global distribution feature layer, calculate the arithmetic mean, squared difference and spatial distribution entropy of gray values within the region, and generate gray statistical feature vectors. The gray statistical feature vectors characterize the overall gray uniformity and distribution complexity of the region.
[0097] The global distribution feature layer is the feature layer obtained in step S351, containing spatial distribution information of regional gray levels and morphological features of the overall structure. Regional statistical analysis is a method used to analyze regional features in an image. By calculating statistical quantities such as the arithmetic mean, squared difference, and spatial distribution entropy of gray values within a region, information on the gray level uniformity and distribution complexity of the region can be obtained. The gray level statistical feature vector is a vector containing the gray level statistical features of a region, representing the overall gray level uniformity and distribution complexity of the region.
[0098] Step S354: Decompose the dynamic weight values into local weight sub-matrix and global weight sub-matrix according to image block units. The element values of the local weight sub-matrix correspond to the dislocation density gradient features of the image block, and the element values of the global weight sub-matrix correspond to the stress field intensity features of the image block.
[0099] The dynamic weight values are the weight values corresponding to each image block unit obtained in step S346, reflecting the importance of that image block unit in defect detection. The local weight submatrix is the part of the dynamic weight values that corresponds to local structural features; its element values correspond to the dislocation density gradient features of the image block. The larger the dislocation density gradient, the larger the element value in the local weight submatrix. The global weight submatrix is the part of the dynamic weight values that corresponds to global distribution features; its element values correspond to the stress field intensity features of the image block. The larger the stress field intensity, the larger the element value in the global weight submatrix.
[0100] When decomposing dynamic weight values, based on the dislocation density gradient characteristics and stress field intensity characteristics of image patches, the dynamic weight values are decomposed into local weight sub-matrices and global weight sub-matrices. First, for each image patch unit, its element value in the local weight sub-matrice is determined based on its dislocation density gradient characteristics. A mapping function can be used to map the dislocation density gradient value to the element value of the local weight sub-matrice. For example, a linear mapping function can be used to multiply the dislocation density gradient value by a coefficient to obtain the element value in the local weight sub-matrice. Similarly, for each image patch unit, its element value in the global weight sub-matrice is determined based on its stress field intensity characteristics. For example, a nonlinear mapping function can be used to transform the stress field intensity value to obtain the element value in the global weight sub-matrice.
[0101] Step S355: Use a local weighted submatrix to perform element-wise weighted operations on the edge gradient magnitude matrix and the texture direction histogram, so that the edge gradient magnitude of the region corresponding to the dislocation density gradient is increased and the peak value of the texture direction histogram is enhanced. Use a global weighted submatrix to adjust the gray-level statistical feature vector, so that the gray-level statistical feature vector components of the region corresponding to the stress field intensity are scaled according to the weight ratio.
[0102] Element-wise weighted multiplication refers to multiplying the local weight submatrix with each element of the edge gradient magnitude matrix and the texture direction histogram. This operation increases the edge gradient magnitude of the region corresponding to the dislocation density gradient and enhances the peak value of the texture direction histogram, highlighting local structural features. Weighted adjustment refers to multiplying the global weight submatrix with the gray-level statistical feature vector in a weighted manner, scaling the gray-level statistical feature vector components of the region corresponding to the stress field intensity according to the weight ratio, thus highlighting global distribution characteristics.
[0103] Step S356: Perform cross-scale feature association modeling on the weighted edge gradient magnitude matrix, texture direction histogram and grayscale statistical feature vector, and integrate them into a feature vector of a unified dimension through feature dimension alignment to generate multi-scale fusion features. The feature vector contains the linkage information of local structural details and global distribution patterns.
[0104] The weighted edge gradient magnitude matrix, obtained through element-wise weighted operations in step S355, reflects the enhancement information of defect edges. The texture orientation histogram, also obtained through element-wise weighted operations in step S355, records the enhancement distribution pattern of texture direction. The grayscale statistical feature vector, obtained through weighted adjustment in step S355, reflects the adjustment information of regional grayscale distribution. Cross-scale feature association modeling is a method for associating and modeling features at different scales. By aligning feature dimensions, these different types of features can be integrated into a feature vector of a unified dimension. Multi-scale fusion features are feature vectors that simultaneously contain information about the linkage between local structural details and global distribution patterns, integrating information from both the local structural feature layer and the global distribution feature layer.
[0105] When performing cross-scale feature association modeling, the first step is to align the feature dimensions. The dimensions of the weighted edge gradient magnitude matrix, texture orientation histogram, and grayscale statistical feature vector are adjusted to allow for integration. For example, the edge gradient magnitude matrix and texture orientation histogram can be flattened, converting them into one-dimensional vectors. Then, these one-dimensional vectors are concatenated with the grayscale statistical feature vector to obtain a feature vector with a unified dimension.
[0106] Step S360: Perform feature value range expansion processing on the multi-scale fusion features. Increase the feature value difference between the defect area and the normal area by adjusting the distribution interval of the feature values, and generate an enhanced defect feature set.
[0107] Multi-scale fusion features are feature vectors generated in step S356, containing information on the interaction between local structural details and global distribution patterns. Feature value range expansion is a method used to adjust the distribution range of feature values; by increasing the distribution range, the difference in feature values between defective and normal regions becomes more pronounced. The enhanced defect feature set is the feature set obtained after feature value range expansion, which is more beneficial for subsequent defect detection and identification.
[0108] When performing eigenvalue range expansion, the distribution of eigenvalues in the multi-scale fused features is first analyzed. The minimum and maximum values of the eigenvalues can be calculated to determine their original distribution range. Then, eigenvalue expansion algorithms, such as linear or nonlinear expansion algorithms, are used to adjust the distribution range of the eigenvalues.
[0109] Step S400: Perform joint anomaly detection in the spatial and spectral domains on the enhanced defect feature set to identify potential defect regions on the modified metal surface and generate defect region feature descriptors.
[0110] The enhanced defect feature set, generated in step S360, undergoes feature value range expansion processing, resulting in more significant differences in feature values between defect and normal regions. Joint anomaly detection in the spatial and spectral domains is a detection method that comprehensively considers spatial and spectral information, aiming to more accurately identify potential defect regions on modified metal surfaces. The spatial domain primarily focuses on the geometric structure and location information of the image, while the spectral domain emphasizes the material's response characteristics to different spectral bands. Potential defect regions refer to areas on the modified metal surface where defects may exist; defect region feature descriptors are a set of parameters used to describe the characteristics of these potential defect regions.
[0111] In an exemplary implementation, step S400 may include the following steps S410 to S460: Step S410: Decompose the enhanced defect feature set into a spatial domain feature subset and a spectral domain feature subset according to the data dimension. The spatial domain feature subset includes the texture distribution features and gradient structure features of the image patch, and the spectral domain feature subset includes the reflectance statistical features and band difference features.
[0112] The enhanced defect feature set is a collection containing various feature information. Decomposition by data dimension involves splitting it into two subsets: spatial and spectral domains, for separate analysis and processing. The spatial domain feature subset primarily describes the spatial characteristics of image patches. Texture distribution features reflect the distribution of textures within the image patch, such as regional gray-level co-occurrence matrix features and gradient direction distribution features. Gradient structure features reflect the rate of change of pixel gray values within the image patch, aiding in the identification of edges and contours. The spectral domain feature subset focuses on the material's response characteristics across different spectral bands. Reflectance statistical features are obtained through statistical analysis of reflectance data, such as mean and standard deviation. Band difference features reflect the differences in reflectance between different spectral bands.
[0113] During the decomposition process, features need to be classified according to their nature and origin. For each feature in the enhancement defect feature set, it is determined whether it belongs to the spatial domain or the spectral domain, and then it is assigned to the corresponding subset. For example, regional gray-level co-occurrence matrix features and gradient direction distribution features are assigned to the spatial domain feature subset because they mainly describe the spatial texture and gradient information of the image; while multi-band reflectance difference features and spectral curve morphology features are assigned to the spectral domain feature subset because they are related to the spectral response.
[0114] Step S420: Perform spatial anomaly isolation model processing on the spatial domain feature subset. By constructing multiple isolation trees, feature points are isolated and divided. The anomaly degree quantification value of each feature point is calculated to identify the set of feature points with spatially abnormal distribution.
[0115] Spatial anomaly isolation models are used to detect outliers in spatial data. By constructing multiple isolation trees, feature points can be more effectively isolated and partitioned. An isolation tree is a binary tree structure that recursively partitions feature points into different child nodes by randomly selecting feature dimensions and a splitting threshold, until each leaf node contains only a single sample. Anomaly quantification is a numerical value used to measure the degree of anomaly for each feature point; a higher value indicates that the feature point is more likely to belong to an anomalous region. A spatially anomalous feature point set refers to the set of feature points whose spatial distribution is significantly different from normal feature points.
[0116] In an exemplary implementation, step S420 may include the following steps S421 to S426: Step S421: Generate a training sample set from the spatial domain feature subset through hierarchical sampling so that the samples cover representative regions with different spatial locations and feature distributions.
[0117] Stratified sampling is a sampling method that divides a subset of spatial domain features into different layers according to certain rules, and then samples independently from each layer to ensure that the samples cover representative regions with different spatial locations and feature distributions. The training sample set is the set of samples used to build the spatial anomaly isolation model, and its quality directly affects the model's performance.
[0118] In stratified sampling, the spatial domain feature subsets are first divided into several layers based on their spatial location and feature distribution. For example, layers can be created based on different regions of the image or different value ranges of features. Then, samples are taken from each layer according to a certain proportion to generate a training sample set. Stratified sampling avoids sample bias, making the training sample set more representative and thus improving the accuracy of the spatial anomaly isolation model.
[0119] Step S422: Construct an anomaly isolation forest composed of multiple isolation trees. Each isolation tree recursively divides the training samples by randomly selecting feature dimensions and segmentation thresholds until each leaf node contains only a single sample.
[0120] Anomaly isolation forests are collections of multiple isolation trees. By combining the results of multiple isolation trees, the accuracy and stability of anomaly detection can be improved. The construction process of each isolation tree is independent. By randomly selecting feature dimensions and segmentation thresholds, training samples are recursively divided into different child nodes until each leaf node contains only a single sample.
[0121] When constructing the isolation tree, for each partition, a feature dimension and a splitting threshold are randomly selected. For example, for a training sample containing multiple feature dimensions, one dimension is randomly selected as the splitting criterion, and then a threshold is randomly selected on that dimension to divide the training sample into two parts. This process is recursively repeated until each leaf node contains only a single sample. By randomly selecting the feature dimension and splitting threshold, the diversity of the isolation tree can be increased, improving the performance of the anomaly isolation forest.
[0122] Step S423: Input the feature points to be detected into the abnormal isolation forest, and count the number of node splits in each isolation tree. The number of splits reflects the difficulty of isolating the feature points.
[0123] The feature points to be detected are those that require anomaly detection. They are input into an anomaly isolation forest, and their degree of anomaly can be assessed by counting the number of node splits they encounter in each isolation tree. The number of node splits refers to the number of node splits the feature point encounters on the path from the root node to a leaf node in the isolation tree. The more splits, the more difficult it is to isolate the feature point, and the more likely it is to be an anomaly.
[0124] When inputting the feature points to be detected into the anomaly isolation forest, for each isolation tree, starting from the root node, the feature points are assigned to the corresponding child nodes according to the partitioning rules of the isolation tree, until a leaf node is reached. During this process, the number of node splits is counted. By comprehensively analyzing the number of node splits across multiple isolation trees, the degree of anomaly of the feature points to be detected can be assessed more accurately.
[0125] Step S424: Calculate the anomaly quantification value of the feature point based on the number of node splits. The higher the anomaly quantification value, the more likely the feature point belongs to an abnormal region.
[0126] The anomaly quantification value is a numerical value calculated based on the number of node splits, used to measure the degree of anomaly of a feature point. Various methods can be used to calculate the anomaly quantification value; for example, the average number of node splits can be used as the anomaly quantification value, or a weighted calculation can be performed based on the distribution of node split counts.
[0127] A higher anomaly quantification value indicates that the feature point is more difficult to isolate in the anomaly isolation forest, and less consistent with the distribution pattern of normal data, thus making it more likely to belong to an anomalous region. By calculating the anomaly quantification value, the degree of anomaly of feature points can be quantified, facilitating subsequent screening and analysis.
[0128] Step S425: Set a preliminary screening threshold for the quantification value of the abnormality level, and select feature points with quantification values higher than the threshold as a preliminary abnormal feature point set.
[0129] The initial screening threshold is a pre-set value used to filter out feature points with a high degree of anomaly. The anomaly quantification value is compared with the initial screening threshold; feature points with quantification values higher than the threshold are considered preliminary anomaly feature points and are grouped into a preliminary anomaly feature point set. Setting the initial screening threshold requires comprehensive consideration of the data characteristics and practical application needs, such as determining an appropriate threshold through historical data analysis or cross-validation.
[0130] Step S426: Perform density clustering on the initial abnormal feature point set, eliminate discrete noise points by identifying the spatial clustering degree of feature points, and retain the core cluster point set as the feature point set of spatial distribution anomalies.
[0131] Density clustering is a data density-based clustering method that divides data into different clusters by identifying the spatial clustering degree of feature points. Discrete noise points are those feature points that are spatially separated from other feature points and do not form obvious clusters; these may be due to measurement errors or random factors. The cluster core set refers to the set of feature points with high density in the core region of density clustering; these feature points are more likely to represent true spatial distribution anomalies. In density clustering, a neighborhood radius and a minimum point count threshold are first defined. For each feature point in the initial anomalous feature point set, the number of its neighboring points within the neighborhood radius is calculated. If the number of neighboring points is greater than or equal to the minimum point count threshold, the feature point is considered a core point. Then, adjacent core points and their neighbors are connected to form clusters. Finally, discrete noise points that do not belong to any cluster are removed, retaining the cluster core set as the set of spatially anomalous feature points.
[0132] Step S430: Perform spectral boundary decision model processing on the spectral domain feature subset, construct the decision boundary based on the spectral features of normal metal surfaces, and identify abnormal spectral response feature vectors that exceed the boundary range.
[0133] The spectral boundary decision model is a model used to determine whether spectral features are abnormal. It constructs a decision boundary based on the spectral characteristics of normal metal surfaces. The spectral characteristics of normal metal surfaces are obtained through measurement and analysis of a large number of known normal metal samples, reflecting the reflectance properties of normal metals in different spectral bands. The decision boundary is a boundary that distinguishes between normal and abnormal spectral features; spectral features exceeding this boundary are considered abnormal. Anomaly spectral response feature vectors refer to feature vectors that exhibit abnormal responses in the spectral domain.
[0134] In an exemplary implementation, step S430 may include the following steps S431 to S436: Step S431: Collect spectral feature samples of normal modified metal surfaces and construct a normal spectral feature sample set. The normal spectral feature sample set contains normal spectral response features under different incident angles and environmental conditions.
[0135] Spectral characteristic samples of normally modified metal surfaces are obtained by performing spectral measurements on normally modified metal samples under different incident angles and environmental conditions. Different incident angles and environmental conditions affect the spectral reflectance characteristics of the metal surface; therefore, collecting samples under multiple conditions can more comprehensively reflect the spectral characteristics of normal metals. The normal spectral characteristic sample set is a collection containing a large number of normal spectral characteristic samples, providing basic data for subsequent construction of spectral boundary decision models. During sample collection, spectral measurement equipment is used to measure the normally modified metal samples, recording spectral reflectance data under different incident angles and environmental conditions. Environmental conditions can include factors such as temperature, humidity, and light intensity. The collected spectral reflectance data is processed and analyzed to extract spectral features, such as reflectance statistical features and spectral curve morphology features, to construct the normal spectral characteristic sample set.
[0136] Step S432: Train the spectral boundary decision model based on the normal spectral feature sample set, and construct the decision boundary in the feature space by learning the feature distribution law of normal samples.
[0137] Spectral boundary decision models can be trained using various machine learning algorithms or statistical methods, such as support vector machines and Gaussian mixture models. During training, the model learns the feature distribution patterns of a normal spectral feature sample set to find a decision boundary that can distinguish between normal and abnormal samples.
[0138] The feature space is a multi-dimensional space, where each dimension represents a spectral feature. The decision boundary is a hyperplane or surface in the feature space that divides the feature space into normal and abnormal regions. By training a spectral boundary decision model, the location and shape of the decision boundary can be determined, ensuring that normal samples fall within the normal region as much as possible, while abnormal samples fall within the abnormal region.
[0139] Step S433: Input the feature vectors in the spectral domain feature subset into the spectral boundary decision model, and calculate the feature space distance from each feature vector to the decision boundary.
[0140] Feature space distance refers to the distance of a feature vector from the decision boundary in the feature space, reflecting the degree of deviation of the feature vector from normal samples. Each feature vector in the spectral domain feature subset is input into a trained spectral boundary decision model, and the feature space distance from that feature vector to the decision boundary is calculated based on the model's structure and algorithm. Different spectral boundary decision models may use different methods to calculate the feature space distance. For example, for a support vector machine model, the perpendicular distance from the feature vector to the decision hyperplane can be calculated; for a Gaussian mixture model, the Mahalanobis distance from the feature vector to each Gaussian component can be calculated.
[0141] Step S434: Compare the feature space distance with a preset boundary threshold. Feature vectors with a distance greater than the threshold are determined to be abnormal spectral response feature vectors.
[0142] The preset boundary threshold is a pre-defined value used to determine whether a feature vector is an anomalous feature vector in spectral response. The feature space distance is compared with the preset boundary threshold; if the feature space distance is greater than the threshold, the feature vector is considered to have exceeded the decision boundary and is thus identified as an anomalous feature vector in spectral response.
[0143] Setting a preset boundary threshold requires comprehensive consideration of the data characteristics and the needs of the actual application. If the threshold is set too high, some genuine outliers may be missed; if the threshold is set too low, too many false positives may be introduced. A suitable preset boundary threshold can be determined by analyzing historical data or using cross-validation.
[0144] Step S435: Verify the spectral response credibility of the feature vectors identified as anomalous, and confirm the authenticity of the anomalousness by analyzing the consistency of responses in adjacent bands.
[0145] Spectral response reliability verification is to ensure that the eigenvectors identified as anomalous are indeed caused by defects on the metal surface, rather than by measurement errors or other interference factors. Response consistency across adjacent bands means that the spectral response should exhibit a certain degree of continuity and correlation across adjacent spectral bands.
[0146] When verifying the reliability of spectral responses, the spectral responses of the feature vectors identified as anomalous are analyzed in adjacent bands. If the responses in adjacent bands also show anomalous changes and the trends are consistent, the reliability of the anomalous feature vector is considered high. If the responses in adjacent bands do not show significant changes or the trends are inconsistent, the anomalous feature vector is considered to be a misjudgment and requires further analysis or exclusion.
[0147] Step S436: Optimize the decision boundary based on the verification results, adjust the boundary threshold to reduce the false judgment rate, and finally determine the spectral response anomaly feature vector set.
[0148] Based on the results of spectral response reliability verification, the decision boundary of the spectral boundary decision model can be optimized. If the verification results indicate a high number of false positives, the boundary threshold can be adjusted to make the decision boundary more stringent and reduce false positives. Conversely, if the verification results indicate a high number of false negatives, the boundary threshold can be adjusted to make the decision boundary more lenient and improve detection accuracy. By continuously optimizing the decision boundary and adjusting the boundary threshold, the false positive rate can be reduced, ultimately determining the set of spectral response anomaly feature vectors. The feature vectors in this set are more likely to represent the true defects on the modified metal surface.
[0149] Step S440: Construct a joint decision matrix, weighted and fused the spatial domain anomaly quantification value and the spectral domain anomaly response value to generate a comprehensive anomaly score, which comprehensively reflects the anomaly degree in both the spatial and spectral dimensions.
[0150] The joint decision matrix is a matrix used to comprehensively consider anomaly information in both the spatial and spectral domains, integrating the quantified value of spatial domain anomaly severity and the anomaly response value in the spectral domain. The quantified value of spatial domain anomaly severity, calculated in step S424, reflects the degree of anomaly in the spatial distribution of feature points; the anomaly response value in the spectral domain, determined in step S434, reflects the degree of anomaly in the spectral response of feature vectors. When constructing the joint decision matrix, the quantified value of spatial domain anomaly severity and the anomaly response value in the spectral domain for each feature point are used as elements of the matrix and weighted and fused according to pre-defined weights. For example, if spatial domain information is considered more important in defect detection, a higher weight can be assigned to the quantified value of spatial domain anomaly severity; if spectral domain information is considered more critical, a higher weight can be assigned to the anomaly response value in the spectral domain.
[0151] Step S450: Set an adaptive segmentation threshold based on the comprehensive anomaly score, determine the optimal segmentation point by analyzing the score distribution characteristics, binarize the joint decision matrix, and mark potential defect areas.
[0152] The adaptive segmentation threshold is a threshold that automatically adjusts based on the distribution characteristics of the comprehensive anomaly score, enabling more accurate differentiation between normal and potentially defective regions. Analysis of score distribution characteristics can employ methods such as histogram analysis and cluster analysis. By observing the distribution of the comprehensive anomaly score, an optimal segmentation point can be found, maximizing the distinguishability between the segmented normal and potentially defective regions.
[0153] Binarization involves classifying the elements of the joint decision matrix according to an adaptive segmentation threshold. Elements larger than the threshold are marked as potential defect regions, while elements smaller than the threshold are marked as normal regions. Through binarization, the joint decision matrix can be converted into a binary image, clearly identifying potential defect regions.
[0154] When setting the adaptive segmentation threshold, the distribution of the comprehensive anomaly scores is first statistically analyzed, and a histogram is plotted or cluster analysis is performed. Then, the optimal segmentation point is determined based on the distribution characteristics, and the score corresponding to that point is used as the adaptive segmentation threshold. Finally, the joint decision matrix is binarized to mark the potential defective regions.
[0155] Step S460: Extract the spatial morphological parameters and spectral feature parameters of the potential defect region from the binarized matrix. The spatial morphological parameters include regional contour features and structural distribution features, and the spectral feature parameters include reflectance anomaly features and band response features, and generate a defect region feature descriptor.
[0156] The binarized matrix, obtained in step S450, marks the potential defect regions. Spatial morphology parameters describe the geometry and spatial distribution of the potential defect regions; region contour features reflect the boundary shape of the defect regions, such as perimeter, area, and roundness; structural distribution features describe the internal structural distribution of the defect regions, such as voids and connectivity. Spectral feature parameters describe the spectral characteristics of the potential defect regions; reflectance anomaly features reflect the difference in reflectance between the defect regions and normal regions; and band response features describe the response of the defect regions in different spectral bands.
[0157] A defect region feature descriptor is a set of spatial morphological parameters and spectral feature parameters that can comprehensively describe the characteristics of a potential defect region, providing a basis for subsequent defect type identification and severity assessment.
[0158] Image processing and spectral analysis techniques are used to extract spatial morphological parameters and spectral feature parameters. For spatial morphological parameters, edge detection and morphological operations can be used to extract the contour and structural information of potential defect regions. For spectral feature parameters, the spectral reflectance data of the defect region can be analyzed to extract reflectance anomalies and band response features. Finally, these parameters are combined into a defect region feature descriptor.
[0159] Step S500: Perform morphological quantitative analysis of defects based on the defect region feature descriptor to determine the type, location, and severity level of defects on the modified metal surface.
[0160] The defect region feature descriptor contains the spatial morphological parameters and spectral feature parameters of the potential defect region. By performing morphological quantitative analysis of these parameters, we can gain a deeper understanding of the characteristics and properties of the defect, thereby determining the type, location, and severity level of the defect.
[0161] Defects can be categorized into various types, such as cracks, pores, and inclusions. Different types of defects exhibit different spatial morphologies and spectral characteristics. The location of a defect can be determined using its coordinates within an image. The severity level reflects the degree to which the defect affects the properties of the modified metal, and different treatment measures can be taken based on the severity level.
[0162] In an exemplary implementation, step S500 may include the following steps S510 to S560: Step S510: Analyze the feature descriptor of the defect region and extract the spatial morphology feature set and the physical field response feature set. The spatial morphology feature set includes the fractal dimension, convex hull area ratio and boundary moment features of the defect contour. The physical field response feature set includes the spectral reflectance anomaly gradient, stress field distortion coefficient and temperature field distribution deviation.
[0163] A defect region feature descriptor is a set of various feature parameters. Analyzing the defect region feature descriptor involves separating and extracting its spatial morphological features and physical field response features. The spatial morphological feature set describes the geometry and spatial distribution of the defect. The fractal dimension of the defect contour reflects the complexity of the defect boundary; the higher the fractal dimension, the more complex the boundary. The convex hull area ratio is the ratio of the convex hull area of the defect region to the actual area, reflecting the irregularity of the defect. The boundary moment feature describes the shape and symmetry of the defect boundary.
[0164] The physical field response characteristic group describes the response of the defect region in the physical field. The spectral reflectance anomaly gradient reflects the rate of change of the spectral reflectance of the defect region, which is related to the type and severity of the defect. The stress field distortion coefficient reflects the degree of distortion of the stress field in the defect region. The greater the stress field distortion, the greater the impact of the defect on the mechanical properties of the material. The temperature field distribution deviation reflects the difference between the temperature field in the defect region and the normal region, which may be related to the generation and development process of the defect.
[0165] In the process of analyzing the feature descriptors of the defect region, the features are classified into the spatial morphology feature group and the physical field response feature group according to their properties and definitions. For example, the fractal dimension, convex hull area ratio, and boundary moment features of the defect contour are classified into the spatial morphology feature group; while the spectral reflectance anomaly gradient, stress field distortion coefficient, and temperature field distribution deviation are classified into the physical field response feature group.
[0166] Step S520: Construct a defect geometric morphology model based on spatial morphological feature groups, characterize the complexity of the defect boundary by contour fractal dimension, describe the irregularity of the defect by convex hull area ratio, and calculate the boundary moment feature to quantify the spatial distribution symmetry of the defect.
[0167] A defect geometry model is a model used to describe the geometry and spatial distribution of defects, constructed based on parameters of a set of spatial morphological features. Contour fractal dimension is an indicator used to measure the complexity of a curve or graphic; in defect detection, it reflects the tortuosity and irregularity of the defect boundary. The convex hull area ratio is the ratio of the area of the convex hull of the defect region to the actual area. The convex hull is the smallest convex polygon containing the defect region; the smaller the convex hull area ratio, the more irregular the defect. Boundary moment features are a set of features used to describe the shape and symmetry of a graphic; calculating boundary moments can quantify the spatial distribution symmetry of the defect.
[0168] When constructing a defect geometry model, the fractal dimension of the profile, the convex hull area ratio, and the boundary moment characteristics are used as input parameters. These parameters are combined and analyzed using mathematical formulas and algorithms to obtain a model that can comprehensively describe the defect geometry. For example, the fractal dimension of the profile can be calculated using fractal geometry theory, the convex hull area ratio can be obtained through geometric calculations, and the boundary moment characteristics can be calculated using moment theory.
[0169] Step S530: Establish a physical property model of the defect by combining the physical field response feature group, analyze the directional distribution of the abnormal gradient of spectral reflectance to infer the defect extension trend, evaluate the stress concentration degree of the defect area by the stress field distortion coefficient, and locate the energy anomaly area based on the temperature field distribution deviation.
[0170] The defect physical property model is a model used to describe the physical properties and behavior of defects, incorporating parameters from a set of physical field response characteristics. The directional distribution of the spectral reflectance anomaly gradient reflects the direction of spectral reflectance changes in the defect region. Analyzing this directional distribution allows for the inference of the defect's extension trend, such as whether the defect extends along a specific direction or radially. The stress field distortion coefficient reflects the degree of distortion of the stress field in the defect region relative to the normal stress field. A larger stress field distortion coefficient indicates a higher degree of stress concentration in the defect region, making the material more susceptible to damage in that area. The temperature field distribution deviation reflects the difference between the temperature field in the defect region and the normal temperature field. Energy anomaly regions are usually accompanied by temperature changes. Analyzing the temperature field distribution deviation can help locate these energy anomaly regions, which may be related to the generation, development, and damage process of defects.
[0171] When establishing a model of the physical properties of defects, the directional distribution of the spectral reflectance anomaly gradient, the stress field distortion coefficient, and the temperature field distribution deviation are used as input parameters. These parameters are analyzed and modeled using physical principles and mathematical methods to obtain a model that can describe the physical properties and behavior of defects. For example, heat conduction equations and stress analysis methods can be used to analyze changes in the temperature and stress fields.
[0172] Step S540: Perform multimodal feature fusion between the defect geometric morphology model and the physical property model to construct a joint feature vector containing morphological parameters and physical field parameters. The dimension of the joint feature vector is consistent with the feature dimension of the preset defect type feature library.
[0173] Multimodal feature fusion refers to the integration and fusion of features from different modalities, such as geometric morphology features and physical property features, to obtain a more comprehensive and accurate feature representation. The defect geometric morphology model and physical property model describe the geometric shape and physical properties of the defect, respectively. Multimodal feature fusion of them can yield a more comprehensive feature representation.
[0174] The joint feature vector is a vector containing morphological and physical parameters, providing a unified representation of the geometric shape and physical properties of a defect. The preset defect type feature library is a pre-built database containing features of various defect types. The dimension of the joint feature vector is consistent with the feature dimension of the preset defect type feature library, facilitating subsequent comparison and identification.
[0175] In an exemplary implementation, step S540 may include the following steps S541 to S546: Step S541: Standardize the fractal dimension, convex hull area ratio, and boundary moment features in the defect geometric morphology model. Map each parameter to the same numerical range using the mean-standard deviation normalization method to generate a morphological standard feature vector.
[0176] The mean-standard deviation normalization method maps parameters to a predetermined numerical range, typically [0,1] or [-1,1], by calculating the mean and standard deviation of the parameters. Fractal dimension, convex hull area ratio, and boundary moment features in defect geometry models may have different ranges and scales; standardization can eliminate these differences, making them comparable.
[0177] During standardization, the mean and standard deviation of the fractal dimension, convex hull area ratio, and boundary moment features are first calculated. Then, for each parameter, the mean is subtracted and the result is divided by the standard deviation to obtain the standardized parameter value. The standardized fractal dimension, convex hull area ratio, and boundary moment features are then arranged into a vector to generate the morphological standard feature vector.
[0178] Step S542: The same method is used to standardize the spectral reflectance anomaly gradient, stress field distortion coefficient and temperature field distribution deviation in the physical field response feature group to generate the physical field standard feature vector.
[0179] The spectral reflectance anomaly gradient, stress field distortion coefficient, and temperature field distribution deviation in the physical field response feature set may also have different value ranges and scales. In order to integrate them with the morphological standard feature vector, they need to be standardized.
[0180] Using the same mean-standard deviation normalization method as in step S541, the mean and standard deviation of the spectral reflectance anomaly gradient, stress field distortion coefficient, and temperature field distribution deviation are calculated, and each parameter is standardized. The standardized spectral reflectance anomaly gradient, stress field distortion coefficient, and temperature field distribution deviation are then arranged into a vector to generate the physical field standard eigenvector.
[0181] Step S543: Construct a multimodal feature correlation matrix and calculate the mutual information value between the morphological standard feature vector and the physical field standard feature vector. The mutual information value represents the statistical correlation between different modal features.
[0182] The multimodal feature correlation matrix is a matrix used to describe the correlation between morphological standard eigenvectors and physical field standard eigenvectors. Mutual information is an indicator used to measure the statistical correlation between two random variables. In defect detection, the morphological standard eigenvectors and physical field standard eigenvectors represent the geometric shape and physical properties of the defect, respectively, and there may be a certain correlation between them.
[0183] When constructing a multimodal feature correlation matrix, morphological standard eigenvectors and physical field standard eigenvectors are used as rows or columns of the matrix, and their mutual information values are calculated. A larger mutual information value indicates a stronger statistical correlation between the two eigenvectors, meaning a closer relationship exists between the features they represent.
[0184] Step S544: Based on the mutual information value, perform feature selection on the morphological standard feature vector and the physical field standard feature vector, retain feature components with mutual information values higher than a preset threshold, and eliminate redundant features.
[0185] Feature selection is a method used to reduce feature dimensionality and improve feature quality. By retaining feature components with mutual information values higher than a preset threshold, redundant features can be eliminated, retaining only those features that are strongly correlated with other features. The preset threshold is a pre-defined value used to filter out features with strong correlations.
[0186] During feature selection, the mutual information value of each feature component in the morphological standard feature vector and the physical field standard feature vector is compared with that of other feature components, and feature components with mutual information values higher than a preset threshold are retained. This reduces the dimensionality of features and improves the efficiency and accuracy of subsequent comparison and recognition.
[0187] Step S545: Combine the selected morphological feature components and physical field feature components into a high-dimensional feature vector by feature concatenation. The length of the high-dimensional feature vector is the sum of the retained feature components.
[0188] Feature concatenation refers to arranging the filtered morphological and physical field feature components sequentially into a vector, forming a high-dimensional feature vector. This high-dimensional feature vector contains important feature information from both morphological and physical aspects, and its length is the sum of the retained feature components.
[0189] When performing feature concatenation, ensure that the filtered morphological feature components and physical field feature components are arranged in a certain order to form a unified feature vector. For example, the morphological feature components can be arranged first, followed by the physical field feature components, or they can be sorted according to their importance.
[0190] Step S546: Perform principal component analysis on the high-dimensional feature vector, extract the principal component components whose cumulative contribution rate reaches the preset ratio, and generate a dimension-compressed joint feature vector. The joint feature vector retains the main information of the original features.
[0191] Principal components are a set of mutually orthogonal vectors that can explain the variance of the data to the greatest extent. The cumulative contribution rate refers to the proportion of variance explained by the top few principal components relative to the total variance. The preset proportion is a pre-defined value. By extracting principal component components whose cumulative contribution rate reaches the preset proportion, the high-dimensional eigenvectors can be compressed to generate a dimension-compressed joint eigenvector. During principal component analysis, the covariance matrix of the high-dimensional eigenvectors is calculated, and the eigenvalues and eigenvectors of the covariance matrix are solved. The eigenvectors are then sorted according to their eigenvalues. The principal component components with the largest eigenvalues are selected, ensuring their cumulative contribution rate reaches the preset proportion. These principal component components are then combined into a dimension-compressed joint eigenvector. This approach reduces the dimensionality of the features while preserving the main information of the original features, thus improving computational efficiency.
[0192] Step S550: Determine the defect type based on the comparison results between the joint feature vector and the preset defect type feature library, determine the specific location by mapping the coordinates of the defect region in the image sequence, and calculate the influence index of the defect on the material properties by combining the physical field parameters.
[0193] The preset defect type feature library is a pre-built database containing features of various defect types, with each defect type having its corresponding feature vector. The joint feature vector is compared with the feature vectors in the preset defect type feature library, and the similarity or distance between them is calculated. The defect type with the highest similarity or the closest distance is the type of defect detected.
[0194] The coordinate mapping of the defect region in the image sequence refers to converting the positional information of the defect region in the image into actual physical positional information. This coordinate mapping can determine the specific location of the defect. The physical field parameters are parameters such as the spectral reflectance anomaly gradient, stress field distortion coefficient, and temperature field distribution deviation extracted in step S510. Combining these physical field parameters, the influence index of the defect on the material properties can be calculated.
[0195] The influence index can be calculated by establishing a physical model or empirical formula, comprehensively considering factors such as the type, location, and physical field parameters of defects, reflecting the degree of influence of defects on the mechanical and physical properties of materials. For example, the stress concentration in the defect area can be calculated based on the stress field distortion coefficient, and the impact of defects on the thermal properties of materials can be assessed based on the temperature field distribution deviation. These factors can then be combined to calculate the influence index.
[0196] Step S560: Based on the comprehensive defect type, location information, and impact index, the severity level is classified through a multi-factor weighted decision model. The weight coefficients of the weighted decision model are dynamically adjusted based on the degree of impact of the defect on structural safety.
[0197] The multi-factor weighted decision model is a model used to make decisions by comprehensively considering multiple factors. In defect detection, defect type, location information, and impact index are used as input factors. Different weights are assigned according to the importance of these factors, and a weighted sum is obtained to obtain a comprehensive score. The severity level is then classified according to the comprehensive score.
[0198] In an exemplary implementation, step S560 may include the following steps S561 to S566: Step S561: Establish a defect impact assessment index system. The index system includes defect size index, physical field distortion index and location sensitivity index. The defect size index corresponds to the geometric morphology parameters of the defect, the physical field distortion index corresponds to the physical field response characteristics, and the location sensitivity index reflects the influence weight of the defect location on the structural strength.
[0199] The defect impact assessment index system is a comprehensive system for evaluating the degree of impact of defects on a structure, encompassing multiple aspects. The defect size index is determined based on the defect's geometric parameters, such as area and length, reflecting its size and scale. The physical field distortion index is determined based on the physical field response characteristics, such as spectral reflectance anomaly gradient, stress field distortion coefficient, and temperature field distribution deviation, reflecting the degree of defect influence on the physical field. The location sensitivity index reflects the weight of the defect's location on structural strength; defects at different locations have varying impacts on structural strength, for example, defects in critical structural parts have a greater impact.
[0200] Step S562: Based on the defect type, retrieve the basic weight values of each evaluation index from the preset index weight library, add the weight coefficient of the position-sensitive index for defects located in the critical structural area, and add the weight coefficient of the physical field distortion index for defects with severe physical field distortion.
[0201] The preset index weight library is a pre-built database containing basic weight values for evaluation indicators corresponding to various defect types. Based on the detected defect type, the corresponding basic weight value is retrieved from the preset index weight library. Critical structural areas refer to parts of the structure that are crucial to strength and safety, such as beam supports and joints. For defects located in critical structural areas, due to their greater impact on the structure, it is necessary to increase the weight coefficient of location-sensitive indicators.
[0202] Severe physical field distortion indicates a significant impact on the physical field, potentially leading to performance degradation of the structure. Therefore, it is necessary to increase the weighting coefficient of the physical field distortion index. By dynamically adjusting the weighting coefficient, the severity of the defect can be assessed more accurately.
[0203] Step S563: The quantitative values of the defect size index, physical field distortion index and location sensitivity index are weighted and summed with the corresponding weight coefficients to calculate the comprehensive impact assessment index. The larger the index value, the higher the severity of the defect.
[0204] Weighted summation involves multiplying the quantified values of the defect size index, physical field distortion index, and location sensitivity index by their respective weighting coefficients, and then summing them to obtain the comprehensive impact assessment index. The quantified value refers to the numerical value obtained after quantifying each index; for example, converting the defect area into a specific value, or normalizing the stress field distortion coefficient to obtain a value. The comprehensive impact assessment index comprehensively considers factors such as defect size, physical field distortion, and location. The larger the index value, the more severe the impact of the defect on the structure, and the higher the degree of severity.
[0205] Step S564: Set the index threshold range for severity level classification, determine the threshold boundary of each level by statistical analysis of historical defect data, and ensure that defects of different levels have significant performance impact differences.
[0206] The severity level classification index threshold range is a set of pre-defined numerical ranges used to divide the comprehensive impact assessment index into different levels. Statistical analysis of historical defect data refers to organizing and analyzing previously detected defect data to understand the distribution of the comprehensive impact assessment index for defects of different severity levels.
[0207] By statistically analyzing historical defect data, threshold boundaries for each level can be determined, ensuring that defects of different levels have significant differences in their performance impact. For example, the comprehensive impact assessment index can be divided into three levels: low, medium, and high. By analyzing historical data, the threshold range for each level can be determined, ensuring that low-level defects have a small impact on the structure, medium-level defects have a certain impact, and high-level defects pose a serious threat to the safety of the structure.
[0208] Step S565: Compare the calculated comprehensive impact assessment index with the level threshold range to determine the severity level of the defect.
[0209] The calculated comprehensive impact assessment index is compared with a pre-defined threshold range for severity levels. The severity level of the defect is determined based on the range in which the index value falls. For example, if the comprehensive impact assessment index falls within the low-level threshold range, the defect is classified as low severity; if it falls within the medium-level threshold range, it is classified as medium severity; and if it falls within the high-level threshold range, it is classified as high severity.
[0210] By comparing the comprehensive impact assessment index and the level threshold range, the severity level of the defect can be accurately determined, providing a basis for subsequent handling and maintenance.
[0211] Step S566: Generate a defect assessment report that includes defect type, location coordinates, impact assessment index, and severity level. The rating results in the report are consistent with the prediction results of the material performance degradation model.
[0212] A defect assessment report is a summary of defect detection results, containing crucial information such as defect type, location coordinates, impact assessment index, and severity level. A material performance degradation model is a predictive tool for assessing material performance degradation under defect conditions. The rating classifications in the report must be consistent with the predictions of the material performance degradation model to ensure the accuracy and reliability of the assessment results.
[0213] The various algorithms involved in the above descriptions of the embodiments of this invention can all be obtained from relevant content in the prior art. To save space, they will not be elaborated on in the embodiments of this invention. In addition, those skilled in the art can supplement the details based on common knowledge in the art when implementing the solutions of this invention. For example, they can use normalization, standardization and other methods to eliminate dimensional conflicts before feature fusion, use interpolation to eliminate dimensional differences, reasonably set thresholds based on historical data, experience or business scenario requirements, train the model based on a general model training method, set the number of layers in the model structure based on actual needs, select activation functions, etc. This invention will not provide redundant descriptions of overly detailed implementation processes.
[0214] Figure 2 This is a schematic diagram of the hardware entity of a defect detection device provided in an embodiment of the present invention, such as... Figure 2 As shown, the hardware entity of the defect detection device 1000 includes a processor 1001 and a memory 1002, wherein the memory 1002 stores a computer program that can run on the processor 1001, and the processor 1001 executes the program to implement the steps in the method of any of the above embodiments.
Claims
1. A method for detecting defects on the surface of modified metals, characterized in that, The method includes: A sequence of multi-angle reflection images of a modified metal surface under multi-spectral light source illumination is obtained. The multi-angle reflection image sequence includes surface texture images under light source illumination at different incident angles and corresponding spectral reflectance distribution information. Based on a pre-set modified metal material property database, and combined with the spectral reflectance distribution information of the multi-angle reflection image sequence, a defect-sensitive parameter set is generated. The defect-sensitive parameter set is used to characterize the differences in spectral response characteristics corresponding to different defect types. The multi-angle reflection image sequence and the defect-sensitive parameter set are subjected to collaborative feature enhancement. The feature contrast between the defect region and the normal region is enhanced by weight allocation to obtain an enhanced defect feature set. Joint anomaly detection in the spatial and spectral domains is performed on the enhanced defect feature set to identify potential defect regions on the modified metal surface and generate defect region feature descriptors. Based on the defect region feature descriptor, a quantitative analysis of defect morphology is performed to determine the type, location, and severity level of defects on the modified metal surface.
2. The method according to claim 1, characterized in that, The set of defect-sensitive parameters, generated based on a pre-defined modified metal material property database and combined with the spectral reflectance distribution information of the multi-angle reflection image sequence, includes: The microstructure parameters and macrophysical parameters corresponding to the target metal type are retrieved from the modified metal material property database. The microstructure parameters include the spatial distribution map of dislocation density and the precipitate size gradient data. The macrophysical parameters include the stress field distribution characteristics and the temperature field response coefficient. The spectral reflectance distribution information of the multi-angle reflection image sequence is analyzed by band, and the reflectance data of the characteristic bands at each incident angle are extracted based on the position of the characteristic absorption peak of the modified metal. The characteristic bands include multiple continuous spectral intervals that are sensitive to defect response. Calculate the integral difference between the reflectance data of the characteristic band and the standard spectral reflectance curve in the corresponding band interval, and construct a three-dimensional spectral integral difference matrix. The row dimension of the matrix corresponds to the incident angle, the column dimension corresponds to the spectral band, and the depth dimension corresponds to the band type. The three-dimensional spectral integral difference matrix is weighted and corrected based on the spatial distribution map of dislocation density in the microstructure parameters. The spectral difference characteristics of the high-stress region are enhanced by the dislocation density gradient, and the dislocation correction difference matrix is obtained. The dislocation correction difference matrix is coupled with the stress field distribution characteristics in the macroscopic physical parameters to form a model. The spectral response deviation caused by the elastic deformation of the material is corrected by the stress field sensitive factor to generate the stress correction difference matrix. By integrating the band response characteristics and angle dependence in the stress correction difference matrix, key response parameters are extracted using feature dimensionality reduction techniques to generate a set of defect-sensitive parameters that includes band weight coefficients, angle sensitivity factors, and physical field correction coefficients.
3. The method according to claim 2, characterized in that, The calculation of the integral difference between the characteristic band reflectance data and the standard spectral reflectance curve in the corresponding band interval, and the construction of a three-dimensional spectral integral difference matrix, includes: The standard spectral reflectance curve is calibrated by eliminating the influence of temperature and humidity fluctuations on the standard curve based on the environmental response model of the target metal, and a calibrated standard spectral curve is obtained. Based on the characteristic absorption peak wavelength position of the modified metal, the effective integration interval of each characteristic band is divided, and the start and end wavelengths of integration for each band are determined. The effective integration interval covers the characteristic absorption band corresponding to the defect type. Calculate the difference in integral area between the measured reflectance curve and the calibration standard spectral curve in the corresponding integral interval at each incident angle to obtain the single-band integral difference value. The integral area is obtained by accumulating the reflectance values of continuous bands. The single-band integral difference values are arranged into an initial three-dimensional integral difference matrix according to the three-dimensional order of incident angle, spectral band and band type. The matrix elements represent the degree of integral area deviation for a specific angle, band and type. Adaptive threshold denoising is performed on the initial three-dimensional integral difference matrix. By identifying abnormal jump elements in the matrix and replacing them with neighborhood mean, noise interference is eliminated and effective difference signals caused by defects are preserved. By using a cross-dimensional normalization algorithm, the elements of each dimension of the matrix are mapped to a unified numerical range, making the differences in different angles, bands and types comparable in the horizontal direction, and constructing a three-dimensional spectral integral difference matrix. The three-dimensional spectral integral difference matrix is weighted and corrected based on the spatial distribution map of dislocation density in the microstructure parameters. This correction is achieved by enhancing the spectral difference characteristics of high-stress regions through dislocation density gradients, resulting in a dislocation-corrected difference matrix. The spatial distribution map of dislocation density is converted into a dislocation density gradient distribution map through a spatial mapping algorithm, and the spatial resolution of the dislocation density gradient distribution map is consistent with the image resolution of the multi-angle reflection image sequence. By matching feature points, the spatial dimension of the dislocation density gradient distribution map is registered with that of the three-dimensional spectral integral difference matrix, so that the dislocation density distribution and the spectral difference features correspond one-to-one in spatial location. Spatial weighting coefficients are calculated based on dislocation density gradients. Regions with higher dislocation density gradients have larger weighting coefficients, and the weighting coefficients are generated through nonlinear mapping of dislocation density gradients. The spatial weighting coefficients are weighted element-wise with the three-dimensional spectral integral difference matrix. The weighted matrix is then subjected to gradient enhancement processing. By calculating the spatial gradient values of the matrix elements and superimposing them onto the original matrix, the integral difference gradient change characteristics of the defect edge region are highlighted. An adaptive smoothing algorithm is used to optimize the gradient-enhanced matrix, eliminating local artifacts introduced during the weighting process and generating a dislocation correction difference matrix.
4. The method according to claim 1, characterized in that, The step of performing collaborative feature enhancement on the multi-angle reflection image sequence and the defect-sensitive parameter set, and strengthening the feature contrast between the defect region and the normal region through weight allocation, yields an enhanced defect feature set, including: The multi-angle reflection image sequence is divided into image block units with overlapping edges according to spatial topological relationships. The overlapping edge parts retain the transition features of adjacent image blocks so that the defect area is not segmented during the block division process. From the set of defect-sensitive parameters, the band weight coefficient, the angle sensitivity factor and the physical field correction coefficient are extracted, and the spatial mapping relationship between the parameters and image block units is established to obtain the parameter-image block association distribution. Extract the texture distribution features and spectral response features of each image block unit. The texture distribution features include regional gray-level co-occurrence matrix features and gradient direction distribution features. The spectral response features include multi-band reflectance difference features and spectral curve morphology features. A dynamic weight calculation model is constructed based on the physical field correction coefficients in the defect-sensitive parameter set, and the dynamic weight value of each image block unit is calculated by combining the dislocation density distribution and stress field distribution characteristics. Multi-scale fusion of local structural features and global distribution features is performed on image patch features under different incident angles according to dynamic weight values, highlighting the consistent performance of defect features under different observation angles; The multi-scale fusion features are subjected to feature value range expansion processing. By adjusting the distribution interval of feature values, the feature value difference between the defect region and the normal region is increased, thereby generating an enhanced defect feature set.
5. The method according to claim 4, characterized in that, The dynamic weight calculation model, constructed based on the physical field correction coefficients in the defect-sensitive parameter set, calculates the dynamic weight value of each image block unit by combining the dislocation density distribution and stress field distribution characteristics, including: The physical field correction coefficients in the defect-sensitive parameter set are analyzed to separate the dislocation density correction component and the stress field correction component. The dislocation density correction component characterizes the influence of the dislocation concentration region on the spectral reflectance characteristics, and the stress field correction component characterizes the modulation effect of stress distribution on reflectance. The spatial scale of the separated dislocation density correction component and stress field correction component is adjusted, and interpolation is used to make them consistent with the spatial size of the image block unit, so that the physical field parameters correspond to the image block unit block by block, and each image block unit corresponds to a set of dislocation density correction values and stress field correction values. Based on the relationship between dislocation density and reflectivity, the dislocation density correction value of each image block unit is converted into a corresponding dislocation sensitivity weight value, and the dislocation sensitivity weight value increases as the dislocation density correction value increases. Based on the mapping relationship between stress distribution and reflectivity, the stress field correction value of each image block unit is converted into a corresponding stress-sensitive weight value, and the stress-sensitive weight value increases as the stress field correction value increases; The initial dynamic weight value of each image block unit is obtained by multiplying the dislocation sensitivity weight value with the stress sensitivity weight value. The initial dynamic weight values of all image block units are averaged in the neighborhood. By calculating the weighted average of the initial dynamic weight values of each image block unit and its neighboring image block units, local weight abrupt changes are eliminated. The dynamic weight values of all image block units under the same incident angle are normalized so that the sum of the weight values is a unified reference value, thus obtaining the dynamic weight value of each image block unit. The multi-scale fusion of local structural features and global distribution features of image patch features under different incident angles according to dynamic weight values includes: The image block features at each incident angle are decomposed into a local structural feature layer and a global distribution feature layer. The local structural feature layer contains gradient change information of the defect edge contour and directional distribution information of the surface texture, while the global distribution feature layer contains spatial distribution information of regional gray levels and morphological features of the overall structure. Feature extraction is performed on the local structural feature layer to capture the gray-level change rate of adjacent pixels in the image block, and an edge gradient magnitude matrix and a texture direction histogram are generated. The edge gradient magnitude matrix reflects the steepness of the defect edge, and the texture direction histogram records the distribution pattern of the texture direction. Regional statistical analysis is performed on the global distribution feature layer to calculate the arithmetic mean, squared difference, and spatial distribution entropy of gray values within the region, generating a gray-level statistical feature vector. The gray-level statistical feature vector characterizes the overall gray-level uniformity and distribution complexity of the region. The dynamic weight values are decomposed into local weight sub-matrices and global weight sub-matrices according to image block units. The element values of the local weight sub-matrices correspond to the dislocation density gradient features of the image block, and the element values of the global weight sub-matrices correspond to the stress field intensity features of the image block. The edge gradient magnitude matrix and texture direction histogram are weighted element-wise using a local weighted submatrix to increase the edge gradient magnitude and enhance the peak value of the texture direction histogram in the region corresponding to the dislocation density gradient. The gray-level statistical feature vector is weighted and adjusted using a global weighted submatrix to scale the gray-level statistical feature vector components in the region corresponding to the stress field intensity according to the weight ratio. The weighted edge gradient magnitude matrix, texture direction histogram, and grayscale statistical feature vector are used to perform cross-scale feature association modeling. By aligning the feature dimensions, they are integrated into a feature vector of a unified dimension, generating multi-scale fused features. The feature vector simultaneously contains the linkage information of local structural details and global distribution patterns.
6. The method according to claim 1, characterized in that, The step of performing joint anomaly detection in the spatial and spectral domains on the enhanced defect feature set to identify potential defect regions on the modified metal surface and generate defect region feature descriptors includes: The enhanced defect feature set is decomposed into a spatial domain feature subset and a spectral domain feature subset according to the data dimension. The spatial domain feature subset includes the texture distribution features and gradient structure features of image patches, and the spectral domain feature subset includes reflectance statistical features and band difference features. The spatial anomaly isolation model is applied to the spatial domain feature subset. Multiple isolation trees are constructed to isolate and divide the feature points, and the anomaly degree quantification value of each feature point is calculated to identify the spatially distributed feature point set. The spectral domain feature subset is processed by a spectral boundary decision model. The decision boundary is constructed based on the spectral features of a normal metal surface, and the abnormal spectral response feature vectors that exceed the boundary range are identified. A joint decision matrix is constructed, and the spatial domain anomaly degree quantification value and the spectral domain anomaly response value are weighted and fused to generate a comprehensive anomaly score, which comprehensively reflects the anomaly degree in both the spatial and spectral dimensions. An adaptive segmentation threshold is set based on the comprehensive anomaly score. The optimal segmentation point is determined by analyzing the score distribution characteristics. The joint decision matrix is binarized to mark potential defect areas. Spatial morphological parameters and spectral feature parameters of potential defect regions are extracted from the binarized matrix. The spatial morphological parameters include regional contour features and structural distribution features, and the spectral feature parameters include reflectance anomaly features and band response features. A defect region feature descriptor is then generated.
7. The method according to claim 6, characterized in that, The spatial anomaly isolation model processing of the spatial domain feature subset involves constructing multiple isolation trees to isolate and divide feature points, and calculating the quantification value of the anomaly degree of each feature point, including: A training sample set is generated from the spatial domain feature subset through hierarchical sampling so that the samples cover representative regions with different spatial locations and feature distributions; An anomaly isolation forest composed of multiple isolation trees is constructed. Each isolation tree recursively divides the training samples by randomly selecting feature dimensions and segmentation thresholds until each leaf node contains only a single sample. The feature points to be detected are input into the abnormal isolation forest, and the number of node splits in each isolation tree is counted. The number of splits reflects the difficulty of isolating the feature points. The abnormality quantification value of a feature point is calculated based on the number of node splits. The higher the abnormality quantification value, the more likely the feature point belongs to an abnormal region. Set an initial screening threshold for the quantification value of the degree of abnormality, and select feature points with quantification values higher than the threshold as the initial set of abnormal feature points; Density clustering is performed on the initial set of anomalous feature points. By identifying the spatial clustering degree of feature points, discrete noise points are eliminated, and the core set of clusters is retained as the set of feature points with spatially abnormal distribution.
8. The method according to claim 1, characterized in that, The step of performing morphological quantitative analysis of defects based on the defect region feature descriptors to determine the type, location, and severity level of defects on the modified metal surface includes: The feature descriptor of the defect region is analyzed, and the spatial morphology feature group and the physical field response feature group are extracted. The spatial morphology feature group includes the fractal dimension, convex hull area ratio and boundary moment features of the defect contour. The physical field response feature group includes the spectral reflectance anomaly gradient, stress field distortion coefficient and temperature field distribution deviation. A defect geometric morphology model is constructed based on spatial morphological feature groups. The complexity of the defect boundary is characterized by the contour fractal dimension, the irregularity of the defect is described by the convex hull area ratio, and the spatial distribution symmetry of the defect is quantified by calculating the boundary moment feature. A physical property model of the defect is established by combining the physical field response characteristic group. The direction distribution of the abnormal gradient of spectral reflectance is analyzed to infer the extension trend of the defect. The stress concentration in the defect area is evaluated by the stress field distortion coefficient. The energy anomaly area is located based on the temperature field distribution deviation. Multimodal feature fusion is performed between the defect geometric morphology model and the physical property model to construct a joint feature vector containing morphological parameters and physical field parameters. The dimension of the joint feature vector is consistent with the feature dimension of the preset defect type feature library. The defect type is determined by comparing the joint feature vector with the preset defect type feature library, the specific location is determined by the coordinate mapping of the defect region in the image sequence, and the influence index of the defect on the material properties is calculated by combining the physical field parameters. Based on the comprehensive defect type, location information, and impact index, a multi-factor weighted decision model is used to classify the severity levels. The weight coefficients of the weighted decision model are dynamically adjusted based on the degree of impact of the defect on structural safety.
9. A defect detection device, comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 8.
Citation Information
Cited By
Graphite equipment weld defect intelligent detection and positioning system based on multispectral imaging
CN121633123A
Metal product defect detection method and system based on image recognition
CN121686026A
Weld defect intelligent identification system based on multi-source data fusion
CN121746821A
Intelligent identification system for weld defects based on multi-source data fusion
CN121746821B
Method and equipment for measuring optical parameters of functional metal glass
CN122016261A