Engineering material quality detection method and system based on image recognition

By generating virtual standard images through multiphysics simulation and combining intelligent light sources and deep learning registration processes, the problems of dependence on physical samples and the influence of ambient light fluctuations in existing technologies are solved, achieving high-precision and low-false-alarm-rate engineering material quality inspection.

CN121120637BActive Publication Date: 2026-03-20HUNAN HONGXINLI ENG TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Existing image recognition detection technologies for engineering material quality inspection rely on idealized physical standard samples that are difficult to obtain. Ambient light fluctuations affect image quality, resulting in insufficient robustness, high false alarm rates, difficulty in distinguishing between real and false defects, and inability to accurately quantify the severity of defects.

Method used

Standard images are generated using multiphysics simulation and virtual rendering technology. Combined with an intelligent light source system, a deep learning registration process using SuperPoint and SuperGlue, and semantic-level difference analysis using a shared weight encoder and a cross-image attention mechanism, a lightweight depth estimation network is constructed to achieve adaptive image acquisition and intelligent post-processing.

Benefits of technology

It can generate high-fidelity standard images without physical samples, adjust lighting conditions in real time, achieve sub-pixel-level high-precision registration, significantly reduce false alarm rate, improve signal-to-noise ratio and the flexibility and robustness of the detection system, and adapt to complex industrial environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121120637B_ABST
    Figure CN121120637B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of engineering materials, and particularly relates to an engineering material quality detection method and system based on image recognition, comprising obtaining a reference image, sampling point selection and marking, image acquisition, image comparison and positioning, secondary acquisition and abnormality analysis; compared with the detection system process of the prior art, the present application has the disadvantages of rigidity, poor adaptability and difficulty in coping with complex and changeable engineering site environment; the present application constructs a full-process automatic system from intelligent sampling, adaptive image acquisition, precise registration, semantic level difference detection to intelligent post-processing and analysis, and has high intelligence, adaptability and robustness, and can stably and efficiently complete the quality detection task under complex engineering environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of engineering materials technology, and in particular to a method and system for quality inspection of engineering materials based on image recognition. Background Technology

[0002] Quality inspection of engineering materials is a core component in ensuring the safety and reliability of major infrastructure, high-end equipment manufacturing, and key components. Traditionally, methods relying on manual visual inspection or contact measurement are not only inefficient and subjective, but also struggle to achieve full-area, high-precision defect screening. With the development of machine vision technology, automated inspection methods based on image recognition are gradually being applied. These methods typically acquire images of the surface of the material to be inspected and compare them with a preset "standard" or "defect-free" image to identify abnormal areas, demonstrating significant advantages in efficiency and non-contact operation.

[0003] However, existing image recognition and detection technologies still face a series of severe challenges in practical industrial deployment. First, they heavily rely on an idealized "standard image" as a comparison benchmark, which typically requires a near-perfect physical sample, making it difficult to achieve for new product prototyping or large, complex components. Second, the image acquisition process is highly susceptible to fluctuations in ambient light, leading to inconsistencies in brightness and color, and introducing significant interference. Furthermore, existing image registration algorithms lack robustness when dealing with complex surface textures, large viewing angle changes, or local occlusion, easily resulting in misregistration. In addition, traditional pixel-level difference detection methods are highly sensitive to non-defect factors such as lighting changes and shadows, resulting in a high false alarm rate; and the final defect determination often lacks multi-dimensional cross-validation, making it difficult to distinguish between real and false defects, and unable to accurately quantify the severity of defects.

[0004] To address the aforementioned problems, this invention proposes a method and system for quality inspection of engineering materials based on image recognition. Summary of the Invention

[0005] To overcome the problems mentioned in the background art, the present invention proposes an engineering material quality inspection method and system based on image recognition.

[0006] The technical solution of this invention is: a method for quality inspection of engineering materials based on image recognition, comprising the following steps:

[0007] S11: Obtain a reference image; Obtain a standard image of the engineering material to be tested as a reference image.

[0008] S12: Sampling point selection and marking, selecting a sampling area meeting a set number on the engineering material to be detected, and setting a reference mark in the selected sampling area, wherein when the reference mark is set in the selected sampling area, the reference mark set is a map, paint spraying or other marking, and the reference mark contains a unique identifier and a registration symbol, the unique identifier is used for numbering and positioning the sampling area, and the registration symbol is a completely consistent symbol pattern in all images;

[0009] S13: Image acquisition, acquiring images of the sampling area after setting the mark by an image acquisition device, and obtaining a plurality of groups of detection images, wherein each group of detection images contains images of the reference mark;

[0010] S14: Image comparison and positioning, comparing the detection images with the standard images, identifying the areas with differences, and recording and positioning the difference areas based on the reference mark;

[0011] S15: Secondary acquisition, performing secondary image acquisition on the identified difference areas according to the positioning results;

[0012] S16: Abnormal analysis, comprehensively analyzing the secondary acquisition images and the detection images to obtain an abnormal analysis result.

[0013] As preferred, when the standard image of the engineering material to be detected is obtained as a reference image, first, the image of a qualified standard engineering material sample is acquired to obtain the standard image, and if there is no qualified standard engineering material sample, the standard image is obtained by the following method:

[0014] S21: Input definition, receiving and storing the intrinsic attribute parameter set of the target engineering material, the parameter set of the target processing technology, and the configuration parameter set of the preset image acquisition system;

[0015] S22: Multi-physical field simulation, based on the input data, performing computer numerical simulation of the processing technology process, and calculating a first digital model representing the entity formed after the material is processed and its defect state;

[0016] S23: Virtual rendering, based on the obtained first digital model and the configuration parameter set of the image acquisition system, simulating the physical imaging process in a virtual environment, and calculating to generate an initial standard image;

[0017] S24: Post-processing, digitally processing the initial standard image to generate a final standard image for quality detection comparison.

[0018] As preferred, when the image is acquired, the acquired image includes a visible light image and an infrared image, and when the visible light image is acquired, the light source intelligent control is included, and the specific implementation process of the light source intelligent control is:

[0019] S31: Standard template extraction, extracting reference parameters from the acquired reference image, including target illuminance value and standard color temperature value;

[0020] S32: When acquiring images of each sampling area, perform an intelligent adjustment of the light source once.

[0021] As a preferred option, the specific process for intelligent adjustment of the light source is as follows:

[0022] S321: Place the sampling area at the predetermined imaging position;

[0023] S322: Real-time reading of the current ambient light illuminance and color temperature values ​​fed back by the ambient light monitoring sensor;

[0024] S323: Calculate the light source compensation parameters required to compensate for changes in ambient light, and drive the light source so that the output illuminance and color temperature of the light source meet the following requirements:

[0025] A. ;

[0026] in, The output illuminance of the light source, For the target illuminance value, This represents the current ambient illuminance value. The ambient light intensity at the time the reference image was acquired.

[0027] B. Adjust the color temperature so that the mixed color temperature of the light source and ambient light is close to the standard color temperature value;

[0028] S324: After the mixed illumination of the light source and ambient light has stabilized, perform the image acquisition operation.

[0029] Preferably, when comparing the image to be detected with a standard image to identify regions of difference, the specific implementation process is as follows:

[0030] S41: Image preprocessing, preprocessing the acquired visible light image and infrared image respectively;

[0031] S42: Image registration, which registers the preprocessed image with the reference image;

[0032] S43: Image difference analysis, which performs image difference analysis between the registered image to be detected and the standard image;

[0033] S44: Image extraction. Based on the image difference analysis results, locate and extract the difference regions between the visible light image and the infrared image.

[0034] Preferably, image registration specifically includes:

[0035] S421: Scanning the input image, identifying and locating the fiducial marker, performing preliminary perspective correction on the to-be-detected image through the fiducial marker, and processing the corrected image using a lightweight convolutional neural network model to estimate its single-channel depth map;

[0036] S422: Inputting the preliminarily corrected to-be-detected image and the reference image into the SuperPoint key point detection network to extract high-confidence key point position coordinates and corresponding feature descriptor vectors;

[0037] S423: Inputting the two sets of feature descriptors into the SuperGlue matching network, calculating the similarity between the descriptors and performing context aggregation using an attention mechanism to output a set of matched key point pairs;

[0038] S424: Using the matched key point pair set, estimating the optimal homography transformation matrix using the random sample consensus algorithm, and then using the homography transformation matrix to resample and geometrically transform the source image to complete registration.

[0039] As a preferred, when performing image difference analysis, specifically comprising:

[0040] S51: Inputting the registered to-be-detected image and the reference image into the encoder with shared weights to extract multi-scale abstract features;

[0041] S52: Realizing semantic alignment and fusion at the feature level through a cross-image attention mechanism, and obtaining a difference feature map through residual calculation.

[0042] S53: Using the decoder to restore the difference map resolution and generating a differential detection result containing positions and confidence through post-processing.

[0043] As a preferred, after obtaining the difference saliency map of the image, it further includes filtering isolated noise points in it through morphological operation, specifically:

[0044] S61: Binaryzation processing the difference saliency map to generate a binary mask image;

[0045] S62: Processing the binary mask image using morphological opening operation to eliminate isolated noise points therein;

[0046] S63: Performing connected region analysis on the binary image after morphological processing, and performing secondary filtering based on a region area threshold to output the final denoised difference region mask.

[0047] Wherein, the morphological opening operation specifically includes:

[0048] S621: performing an erosion operation on the binary mask image using a preset shape and size of a structure element to eliminate isolated noise points with a size smaller than the structure element and to shrink the boundary of the remaining region, wherein the structure element is one of a rectangle, a circle and a cross, and the size of the structure element is determined according to an expected size of the noise points;

[0049] S622: performing an inflation operation on the eroded image using the same structure element to restore the original size of the remaining region and fill holes in the region.

[0050] The connected region analysis specifically includes:

[0051] S631: identifying all connected regions in the binary image processed by the morphological opening operation;

[0052] S632: calculating the pixel area of each connected region;

[0053] S633: eliminating the connected regions with a pixel area smaller than a preset threshold, wherein the preset threshold is determined according to the minimum meaningful defect size in actual application;

[0054] S634: outputting the remaining connected regions as the final difference region after noise elimination.

[0055] As preferred, when the secondary acquisition image and the to-be-detected image are comprehensively analyzed to obtain an abnormality analysis result, the analysis specifically includes:

[0056] S71: extracting multi-dimensional features of the secondary acquisition image and the abnormal region image;

[0057] S72: calculating a similarity measure value between regions based on the multi-dimensional features;

[0058] S73: determining an abnormality level according to the similarity measure value, and outputting a comprehensive analysis result.

[0059] The engineering material quality detection system based on image recognition includes:

[0060] An image acquisition module configured to acquire an image of the to-be-detected engineering material;

[0061] An image processing module for pre-processing, registration and difference analysis of the acquired image;

[0062] A reference image generation module for providing a standard image for comparison, including a simulation unit for performing multi-physical field simulation and virtual rendering;

[0063] An analysis control module for realizing control of sampling point selection and marking, image comparison and positioning, secondary acquisition triggering and execution flow of abnormality analysis;

[0064] An output module configured to output the difference region positioning information and the anomaly analysis result

[0065] Advantages of the present application:

[0066] 1. Compared with the prior art, the present application uses multi-physical field simulation and physically-based rendering technology to virtually generate standard images, which can provide high-fidelity standard images containing known defect types without relying on physical samples, greatly improving the flexibility and applicability to new products.

[0067] 2. Compared with the prior art, the present application introduces an intelligent light source system integrating a feedforward-feedback compound control strategy, which can sense the ambient light in real time and dynamically adjust the light compensation parameters to ensure that the lighting conditions of each collection are highly consistent with the reference, thereby ensuring the comparability and reliability of the image data from the source.

[0068] 3. Compared with the prior art, the present application uses a deep learning registration process that combines SuperPoint and SuperGlue, which can fully utilize contextual information for global optimal matching and has strong robustness to changes in angle, illumination, and partial occlusion, achieving sub-pixel level high-precision registration.

[0069] 4. Compared with the prior art, the present application uses semantic-level difference analysis based on shared weight encoder and cross-image attention mechanism, which can perform semantic alignment at the feature level, effectively suppress irrelevant textures and light changes, and focus on extracting real structural and material defect features, significantly improving the signal-to-noise ratio.

[0070] 5. Compared with the prior art, the present application uses the SuperGlue network to construct the matching problem as a global assignment problem based on graph neural networks and optimal transport, which can consider the mutual relationship of all feature points and obtain a probabilistic and globally consistent optimal matching result, greatly improving the accuracy of matching.

[0071] 6、The deep estimation model of the prior art generally has the disadvantages of large calculation overhead and difficulty in deployment in resource-limited industrial field devices, and the scheme adopts a lightweight encoder-decoder network integrated with depth separable convolution and attention mechanism for depth estimation, has greatly reduced model complexity and calculation amount while maintaining high precision, and meets the stringent requirements of industrial detection on real-time performance and embedded deployment;

[0072] 7、The detection system process of the prior art is rigid and has poor adaptability, and is difficult to cope with complex and variable engineering site environments, and the scheme constructs a full-process automatic system from intelligent sampling, adaptive image acquisition, precise registration, semantic level difference detection to intelligent post-processing and analysis, has high intelligence, adaptability and robustness, and can stably and efficiently complete quality detection tasks in complex engineering environments. BRIEF DESCRIPTION OF DRAWINGS

[0073] Fig. 1 A process schematic diagram of the engineering material quality detection method based on image recognition of the present application is shown.

[0074] Fig. 2 A structure schematic diagram of the engineering material quality detection system based on image recognition of the present application is shown. DETAILED DESCRIPTION

[0075] The present application will be further described below in conjunction with the drawings and examples.

[0076] Please refer to Figs. 1-2 The present application provides an example: an engineering material quality detection method based on image recognition, comprising the following steps:

[0077] Step one: obtaining a reference image

[0078] The standard image of the engineering material to be detected is obtained as the reference image, first, the image of the qualified standard engineering material sample is collected to obtain the standard image, and a plurality of qualified sample images are fused or averaged to generate a unified standard image, if there is no qualified standard engineering material sample, the standard image is obtained by the following method:

[0079] Input definition, receiving and storing the intrinsic attribute parameter set of the target engineering material, the parameter set of the target processing technology and the configuration parameters of the preset image acquisition system, wherein the material intrinsic attribute parameter set includes the mechanical properties, thermal properties and optical properties of the material; the processing technology parameter set includes the equipment operation parameters and environmental parameters related to a specific processing method; the image acquisition system configuration parameter set includes camera intrinsic parameters, extrinsic parameters and illumination geometry and spectral parameters;

[0080] Multi-physics simulation, based on the input data, performs computer numerical simulation of the machining process, calculates a first digital model representing the entity formed after the material is processed and its defect state, is realized by solving coupled physical field control equations, and the solved physical field control equations include equations describing material flow, heat transfer, stress and phase change;

[0081] Virtual rendering, based on the obtained first digital model and the configuration parameter set of the image acquisition system, simulates the physical imaging process in a virtual environment, and calculates to generate an initial standard image;

[0082] Post-processing, digitally processing the initial standard image to generate a final standard image used for quality detection comparison.

[0083] Among them, the multi-physics simulation is based on the constitutive model of the material, and its general form is described by the following equation:

[0084] ;

[0085] Among them, is the stress tensor, is the strain tensor, is the strain rate tensor, is the temperature field, is a set of internal variables representing the history of the microstructure of the material, is the constitutive relation function.

[0086] Among them, the virtual rendering adopted is a physics-based rendering, and the core is to solve the rendering equation to simulate the transmission of light:

[0087] ;

[0088] Among them, is the surface point in the direction emitted radiation intensity, is the surface point being calculated, is the direction unit vector of the incident light, is the unit vector of the outgoing light, is the normal unit vector at the point , is the wavelength of the light, is the time variable, is the light emission intensity of the point itself, is the radiation intensity incident from the direction , is the bidirectional reflectance distribution function, which is defined by the material optical properties, is a hemisphere space, wherein the bidirectional reflectance distribution function adopts a micro-surface model, and its form is:

[0089] ;

[0090] wherein, is the Fresnel term, which describes the reflectance as a function of the incident angle, is the geometric shading term, which describes the shading effect of the micro surface, is the normal distribution function, which describes the statistical distribution of the micro surface orientation, is the half-way vector.

[0091] wherein, the post-processing further comprises introducing simulated camera noise, simulating lens optical distortion, and image format standardization conversion.

[0092] Specifically, in the embodiment, the application generates a high-precision standard image as a comparison reference through a high-fidelity digital simulation technology. Specifically, when there is a lack of qualified physical samples, the method performs multi-physical field coupling simulation by inputting the intrinsic properties of the material, such as mechanics and thermodynamics, processing parameters, and camera settings, accurately simulates the internal stress, deformation, and even defects that may be generated in the material during the processing process, and generates a virtual digital model containing an ideal state and potential defects. Subsequently, by using a physics-based rendering technology, the digital model is rendered into a highly realistic image by simulating the real light propagation, the microstructure of the material surface, and the interaction (such as reflection, shading, etc.) between the light and the material surface, and further introducing the noise and distortion of the simulated real camera, and finally generating a "standard image" that can be used for comparison. For example, when detecting a welded part, even if there is no perfect sample, the ideal weld shape and common defects such as pores and cracks can be simulated through simulation, and a standard image under specific lighting is generated. In actual detection, the real image of the part to be detected is compared with the standard image generated by simulation, and the defects can be accurately located.

[0093] Step two: sampling point selection and marking

[0094] Select a sampling area meeting the set number on the engineering material to be detected, and set a reference mark in the selected sampling area, wherein the reference mark set in the selected sampling area is a map, paint spraying or other mark, and the reference mark contains a unique identifier and a registration symbol, the unique identifier is used for numbering and positioning the sampling area, and the registration symbol is a completely consistent symbol pattern in all images, and when selecting the sampling area, a uniform grid method, a random sampling method or a key area selection method based on historical defect probability distribution is used;

[0095] Specifically, in the present embodiment, the core of the sampling point selection and marking step is to lay the foundation for subsequent image accurate comparison through intelligent area selection and reference marking containing double information. First, according to the material characteristics and detection requirements, strategies such as covering the whole with uniform grid, randomly sampling to ensure statistical representativeness, or focusing on key areas prone to problems based on historical data are adopted to scientifically determine the sampling area to be detected. Then, a special reference mark is set on each selected area. The mark not only contains a "unique identifier" for distinguishing different positions, but also contains a "registration symbol" that remains unchanged in all images (such as a standard crosshair). For example, when detecting large wind turbine blades, the marks can be placed on the leading edge and joints of the blade surface which are prone to damage. The number (unique identifier) on the mark indicates the specific detection point, and the fixed geometric pattern (registration symbol) serves as a visual anchor.

[0096] Step three: image acquisition

[0097] The image acquisition device is used to acquire images of the sampling area after setting the marks, and a plurality of groups of detection images are obtained, wherein each group of detection images contains images of the reference marks;

[0098] Step four: image comparison and positioning

[0099] The detection image and the standard image are compared, the difference area is identified, and the difference area is recorded and positioned based on the reference mark. The specific implementation process is as follows:

[0100] Image preprocessing: the collected visible light image and infrared image are preprocessed respectively;

[0101] Image registration: the preprocessed image is registered with the reference image;

[0102] Image difference analysis: the detection image after registration is analyzed for image difference with the standard image;

[0103] Image extraction: according to the image difference analysis result, the difference area in the visible light image and the infrared image is positioned and extracted.

[0104] Preferably, when performing image registration, it specifically includes:

[0105] The input image is scanned to identify and position the reference mark, the detection image is preliminarily perspective corrected through the reference mark, and the corrected image is processed using a lightweight convolutional neural network model to estimate its single-channel depth map;

[0106] The preliminary corrected to-be-detected image and the reference image are input into a SuperPoint key point detection network to extract high-confidence key point position coordinates and corresponding feature descriptor vectors;

[0107] The two groups of feature descriptors are input into a SuperGlue matching network, a set of matched key point pairs is output by calculating the similarity between the descriptors and using an attention mechanism for context aggregation.

[0108] An optimal homography transformation matrix is estimated using a random sample consensus algorithm based on the matched key point pair set, and the source image is resampled and geometrically transformed using the homography transformation matrix to complete registration.

[0109] When the image is preliminarily perspective-corrected by the reference mark, first, the unique identifier region in the reference mark is decoded to obtain sample number and position information, and then a registration symbol region containing a uniform symbol pattern is extracted, and the four outer corner points of the registration symbol are used as initial reference points to preliminarily correct the perspective of the image.

[0110] The matrix form of the homography transformation matrix is:

[0111] ;

[0112] wherein, is the homography transformation matrix, , , and The four parameters together constitute a linear transformation matrix responsible for controlling the scaling, rotation and shear of the image, is used to control the perspective effect of the image in the x-axis direction, is used to control the translation amount of the image along the y-axis direction, is used to control the perspective effect of the image in the x-axis direction, is used to control the perspective effect of the image in the y-axis direction.

[0113] When the source image is resampled and geometrically transformed using the homography transformation matrix, the transformation formula is:

[0114] ;

[0115] wherein, is the pixel coordinate in the original image, is the corresponding coordinate in the target image coordinate system after transformation.

[0116] Preferably, when the image difference analysis is performed, it specifically includes:

[0117] The registered to-be-detected image and the reference image pair are input into an encoder sharing weights to extract multi-scale abstract features.

[0118] The semantic alignment and fusion at the feature level are realized through a cross-image attention mechanism, and the difference feature map is obtained through residual calculation.

[0119] The decoder is used to restore the resolution of the difference map and generate a differential detection result containing positions and confidence through post-processing.

[0120] Further, when the registered to-be-detected image and the reference image pair are input into an encoder sharing weights to extract multi-scale abstract features, the specific steps include:

[0121] Input stream construction, the registered to-be-detected image and the reference image are combined into an image pair, which are respectively used as two input streams of the twin network, wherein each input image is multi-modal data, at least including an RGB color information channel and a single-channel depth information obtained by a depth estimation network, together forming a four-channel RGB-D input data.

[0122] Feature encoding, two encoders sharing weights are used to process the image pair respectively; the encoder gradually converts the input image into a multi-scale abstract feature map set through multi-layer convolution and down-sampling operation, wherein the backbone network of the encoder is ResNet.

[0123] Preferably, when the semantic alignment and fusion at the feature level are realized through a cross-image attention mechanism, and the difference feature map is obtained through residual calculation, the specific process is as follows:

[0124] Key, Value and Query generation, the feature map of the reference image is used as the source of Key and Value; the feature map of the to-be-detected image is used as the source of Query; the mathematical expression is as follows:

[0125] , , ;

[0126] wherein, is the original feature map of the reference image, is the original feature map of the to-be-detected image, is the weight matrix for generating Key, is the weight matrix for generating Value, is the weight matrix for generating Query, is the Key generated after linear transformation, is the Value generated after linear transformation, is the Query generated after linear transformation.

[0127] Attention calculation and feature alignment, by calculating the similarity of Query and Key, generate attention weight matrix, using attention weight matrix to weighted sum of Value, get the feature map after alignment and correction;

[0128] Difference feature extraction, subtract the aligned reference image features from the original features of the image to be detected element by element to obtain the final difference feature map:

[0129] ;

[0130] Wherein, is the final difference feature map, is the aligned reference image feature;

[0131] The final difference feature map encodes the differences between the two images after semantic alignment at the feature level.

[0132] Preferably, when using the decoder to restore the resolution of the difference map and generate the differential detection result containing the position and confidence after post-processing, specifically including:

[0133] Feature decoding, using a symmetrical decoder network to process the difference feature map obtained in the previous step, wherein the decoder used is composed of multiple up-sampling layers and convolutional layers, which gradually up-samples the abstract feature map to the resolution of the original input image, and finally outputs a single-channel original difference map;

[0134] Post-processing and output, applying Sigmoid activation function to the original difference map, normalizing its pixel value to the interval [0, 1], obtaining the saliency map, then setting the threshold to binarize the saliency map, and using connected region analysis to locate the specific difference area, finally outputting: the binary mask of the difference area, the difference saliency map and the category and position information of the difference area.

[0135] Specifically, in the present embodiment, the core of the image comparison and positioning step is to realize accurate identification and positioning of the differences between the to-be-detected image and the standard image through a set of precise processes combining geometric correction and deep learning semantic understanding. The process first pre-processes the collected visible light and infrared images, and then enters the key registration stage: the system not only uses the fiducial markers for rapid preliminary perspective correction, but also extracts a large number of key feature points from the images themselves through advanced SuperPoint and SuperGlue neural networks and performs intelligent matching, thereby calculating a high-precision homography transformation matrix and completely eliminating the image position deviation caused by different shooting angles and distances, laying a solid foundation for subsequent pixel-level comparison. After ensuring the accurate alignment of the images, a shared weight twin encoder network is used to process the two images simultaneously, extract their deep features, and innovatively use cross-image attention mechanisms to let the features of the to-be-detected image actively "query" and "align" the features of the standard image, realizing semantic comparison rather than simple pixel subtraction, thereby effectively ignoring irrelevant light changes and focusing on the essential differences in material and structure. Finally, the decoder restores the difference feature map to a high-resolution saliency map and accurately locates the defect area. For example, when detecting the surface of a large wind turbine blade, even if the light conditions are different when shooting or the blade has slight deformation, this technology can accurately identify the real cracks or corrosion without being misled by shadows or reflections. The great advantage of this method is its high precision and robustness, which combines traditional image processing with cutting-edge deep learning to significantly improve the ability to distinguish real defects from imaging interference in complex industrial scenarios, thereby greatly reducing the false negative and false positive rates.

[0136] Step five: secondary acquisition

[0137] According to the positioning result, secondary image acquisition is performed on the identified difference area;

[0138] Step six: anomaly analysis

[0139] Comprehensive analysis is performed on the secondary acquisition image and the to-be-detected image to obtain an anomaly analysis result, which specifically includes:

[0140] Extracting multi-dimensional features of the secondary acquisition image and the abnormal area image;

[0141] Calculating the similarity measure value between regions based on the multi-dimensional features;

[0142] Determining the anomaly level according to the similarity measure value and outputting the comprehensive analysis result.

[0143] Among them, when extracting the multi-dimensional features of the secondary acquisition image and the abnormal area image, the extracted multi-dimensional features include:

[0144] Texture feature, local binary pattern (LBP) operator is used to calculate the local binary pattern histogram feature vector;

[0145] Spectrum feature, the low frequency energy ratio feature is extracted from the spectrum image obtained by Fourier transform of the image region;

[0146] Depth feature, the depth feature vector is extracted by using the pre-trained CNN network.

[0147] The similarity measure value is calculated by using weighted multi-feature fusion, and the principle formula is as follows:

[0148] ;

[0149] wherein, is the comprehensive similarity measure value, , and are the weight coefficients of the texture feature similarity, the spectrum feature similarity and the depth feature similarity respectively, is the feature similarity calculation function, is the texture feature vector extracted from the image of the region to be detected collected for the second time, is the texture feature vector of the corresponding region in the reference image, is the spectrum feature vector extracted from the image of the region to be detected collected for the second time, is the spectrum feature vector of the corresponding region in the reference image, is the depth feature vector extracted from the image of the region to be detected collected for the second time, is the depth feature vector of the corresponding region in the reference image.

[0150] The feature similarity is calculated by using cosine similarity measure, and the principle formula is as follows:

[0151] .

[0152] Specifically, in this embodiment, the core of the anomaly analysis step lies in achieving intelligent diagnosis and severity determination of suspected anomalies through multi-dimensional cross-validation by fusing traditional image features and deep learning features. This step first extracts local texture features, spectral energy features, and deep semantic features extracted by a pre-trained convolutional neural network from the high-resolution images acquired a second time and the images of the anomaly areas detected in the initial detection, constructing a comprehensive feature description system. Subsequently, the system calculates the comprehensive similarity score between the current region and the corresponding region of the standard sample in the multi-dimensional feature space using a weighted fusion algorithm, rather than relying on a single feature for judgment. For example, when inspecting wind turbine blades, this analysis can comprehensively evaluate the microscopic texture patterns, structural periodicity, and deep visual patterns of a suspected crack area to determine whether it is a real crack, stubborn dirt, or a false defect caused by light and shadow. This significantly improves the accuracy and reliability of anomaly determination. Through the mutual corroboration of multi-dimensional evidence, it effectively reduces the false alarm rate and can quantify and classify the severity of defects based on the similarity score, thus providing a more accurate and reliable basis for subsequent maintenance decisions.

[0153] In step two, during image acquisition, the acquired images include visible light images and infrared images. Visible light image acquisition includes intelligent light source control, the specific implementation process of which is as follows:

[0154] Standard template extraction involves extracting baseline parameters from the acquired baseline image. These baseline parameters include the target illuminance value and the standard color temperature value.

[0155] When acquiring images of each sampling area, an intelligent adjustment of the light source is performed, which is achieved through the following steps:

[0156] Place the sampling area at the predetermined imaging position;

[0157] Real-time reading of the current ambient light illuminance and color temperature values ​​fed back by the ambient light monitoring sensor;

[0158] Calculate the light source compensation parameters required to compensate for changes in ambient light, and drive the light source so that its output illuminance and color temperature satisfy the following:

[0159] A. ;

[0160] in, The output illuminance of the light source, For the target illuminance value, This represents the current ambient illuminance value. The ambient light intensity at the time the reference image was acquired.

[0161] B. Adjust the color temperature so that the mixed color temperature of the light source and ambient light is close to the standard color temperature value;

[0162] After the mixed light of the light source and the ambient light is stable, an image acquisition operation is performed.

[0163] In this embodiment, the target illuminance value in the reference parameter needs to satisfy that the illuminance provided on the surface of the measured sample is significantly higher than the maximum expected ambient light illuminance, i.e. .

[0164] In this embodiment, if the reference image is obtained by collecting an image of a standard engineering material sample, first, the standard engineering material sample is placed at a predetermined imaging position, the light source is driven to a preset target parameter, and the standard image is collected and saved as a standard template, and then the light source is turned off, and the ambient light intensity at the time of obtaining the reference image is detected by the ambient light monitoring sensor.

[0165] In this embodiment, the driving of the light source adopts a feedforward-feedback composite control strategy, and the adjustment principle formula of the driving current is:

[0166] ;

[0167] wherein, is the deviation of the target illuminance from the total illuminance in the field of view of the main sensor at the kth sampling, is a feedforward gain coefficient, is a proportional gain coefficient of the PID controller, is an integral gain coefficient of the PID controller, is a differential gain coefficient of the PID controller.

[0168] In this embodiment, the ambient light monitoring sensor used is a spectral illuminometer with a wide-angle cosine corrector, and the monitoring data is transmitted in real time to the host computer through a serial communication port.

[0169] Specifically, in this embodiment, intelligent light source control is introduced in the image acquisition stage, and the ambient light change is sensed and dynamically compensated in real time to ensure that the illumination conditions of each collected image are highly consistent with those when the reference image is obtained. First, the standard light intensity (illuminance) and light color (color temperature) are extracted from the reference image as target parameters; during actual detection, whenever a to-be-detected region is placed at the camera position, the system will immediately read the current ambient illuminance and color temperature measured by the ambient light sensor, and then drive the controllable light source to compensate through a precise algorithm: the output illuminance will automatically compensate for the difference between the current ambient light and the reference ambient light, and the overall color temperature of the mixed light will approach the standard value, eliminating the interference of ambient light fluctuations on the imaging quality, so that the collected images have extremely high comparability in brightness, color and contrast, providing a stable and reliable data basis for subsequent image accurate comparison and defect recognition, greatly improving the robustness and accuracy of the detection system.

[0170] In step four, the SuperPoint keypoint detection network adopts a fully convolutional encoder-decoder architecture, which specifically includes:

[0171] A shared encoder module, which is composed of VGG-style convolutional layers, down-samples the input image through multiple max-pooling layers, and extracts multi-level feature representations;

[0172] A keypoint detection head, which receives the low-resolution feature map output by the encoder, transforms the channel number to 65 through a 1x1 convolutional layer, corresponds to the 64 possible keypoint positions in each cell of the 8x8 grid divided from the input image plus 1 "no keypoint" category, and finally generates a keypoint heat map through the softmax function and reshape operation in the channel dimension;

[0173] A descriptor extraction head, which is parallel to the keypoint detection head, transforms the channel number of the encoder output feature map to 256 through a 1x1 convolutional layer, and then recovers to the input image resolution through bilinear up-sampling to generate a dense feature descriptor map.

[0174] Wherein, the SuperPoint keypoint detection network adopts a training strategy combining self-supervised and supervised learning, first pre-trains on a synthetic shape dataset, and then fine-tunes on a real image dataset, and the multi-task loss function used is:

[0175] ;

[0176] Wherein, is the keypoint detection loss, is the balance hyperparameter, is the descriptor matching loss.

[0177] Wherein, the specific calculation process of the keypoint detection head is:

[0178] Divide the HxW input image into H / 8xW / 8 8x8 grid cells;

[0179] Predict the probability distribution of 64+1 categories for each grid cell, where the 64 positions correspond to the pixel positions within the grid, and the 1 position represents that the cell has no keypoint;

[0180] Calculate the probability of each position through softmax: ; wherein, is the predicted probability at position x, is the original score at position x, denotes the exponential operation on the original score , and is the exponential score of the i-th category;

[0181] The 65-channel output is converted into a heat map format by a reshape operation.

[0182] The descriptor extraction head adopts a bilinear up-sampling method to up-sample the low-resolution descriptor map to the original map resolution.

[0183] In the post-processing stage, the SuperPoint key point detection network adopts a key point screening method based on non-maximum suppression:

[0184] A 3x3 maximum pooling layer is applied on the heat map to find local extreme points;

[0185] A confidence threshold is set to filter low-quality key points;

[0186] The remaining key points are sub-pixel refined to improve the positioning accuracy.

[0187] Specifically, in the present embodiment, the SuperPoint key point detection network adopted simultaneously completes feature point positioning and feature descriptor generation through a shared encoder, realizing the unity of efficiency and accuracy. The network uses VGG-like convolutional layers to extract multi-level image features, and then processes them through two parallel branches: one branch predicts the probability of stable key points appearing in each small area of the image, thereby obtaining a key point "heat map"; the other branch is responsible for generating a high-dimensional and discriminative "feature descriptor" for each pixel on the image, just like creating a unique digital identity card for each key point. In order to ensure the robustness of the network in real industrial scenarios, its training process combines self-supervised and supervised learning, first learning basic capabilities on synthetic data, and then fine-tuning on real images. Before outputting the final result, the network will also go through post-processing steps such as non-maximum suppression to filter out unstable points and sub-pixel level refinement of key point positions, ensuring that each point is positioned at the true feature location such as edges, corners, etc. For example, when detecting the surface of a composite material with complex texture, the network can stably find a large number of meaningful feature points, even if the material surface has reflections or small scratches. It can provide a large number of high-quality and highly repeatable key points and their descriptors for subsequent image precise registration, fundamentally ensuring that images taken at different times and angles can be reliably matched, laying a solid foundation for subsequent accurate defect detection.

[0188] In step four, the lightweight convolutional neural network model adopted adopts an encoder-decoder architecture and integrates depth separable convolution and attention mechanism, specifically including:

[0189] The encoder part is stacked by multiple depth separable convolution blocks, each of which contains a depth convolution layer and a point-wise convolution layer, for extracting multi-level features from the input image;

[0190] The decoder part gradually upsamples the feature map through the transpose convolution layer, and fuses the feature map with the corresponding level feature map of the encoder through the skip connection, and finally outputs a single-channel depth map with the same resolution as the input image;

[0191] And a channel attention module is embedded between the encoder and the decoder, which obtains the channel weight through global average pooling and recalibrates the feature channel.

[0192] Wherein, the depth separable convolution block adopts an inverse residual structure, which first expands the channel number through 1x1 convolution, then performs 3x3 depth convolution, and finally compresses the channel number through 1x1 convolution.

[0193] Wherein, the channel attention module calculates the channel weight through the following formula:

[0194] ;

[0195] Wherein, is the compressed global feature vector, is the weight matrix of the first full connection layer, is the ReLU activation function, is the weight matrix of the second full connection layer, is the Sigmoid activation function.

[0196] Wherein, the loss function used in the training of the lightweight convolutional neural network model is the scale invariant logarithmic error, and the principle formula is:

[0197] ;

[0198] Wherein, is the SILog loss value, is the total sum of valid pixel points, is the logarithmic difference of a single pixel point, and , is the predicted depth value of the ith pixel point, is the true depth value of the ith pixel point.

[0199] Specifically, in the present embodiment, the core design idea of the lightweight convolutional neural network model adopted by the present application is to greatly reduce the complexity and computational overhead of the model under the premise of ensuring the accuracy of depth estimation, so that it can run efficiently on embedded devices with limited computing resources. The model uses an encoder-decoder architecture, the encoder part uses a depth separable convolution block to extract image features layer by layer, this structure decomposes the standard convolution into depth convolution and pointwise convolution, which significantly reduces the number of parameters; the decoder part recovers the high-resolution depth map by upsampling and fusing the detailed features of the encoder. In order to improve the feature representation ability, the model embeds a channel attention mechanism between the encoder and the decoder, which can automatically evaluate the importance of each feature channel and weight it, so that the network pays more attention to the features with rich information. In addition, the model also uses an inverse residual structure to enhance gradient flow, and uses a loss function that focuses on relative depth relationships rather than absolute values for training, which improves the accuracy of depth prediction. For example, on a detection device deployed in an industrial site, this lightweight model can quickly estimate the three-dimensional profile information of the material surface from a two-dimensional image taken by a single camera. It achieves an excellent balance between precision and efficiency, providing essential scene geometry information to assist image precise registration, while also having the advantages of low power consumption and high speed, making it very suitable for deployment in production lines and other real-time demanding environments.

[0200] In step four, the core of the feature matching network SuperGlue is the use of graph neural networks for intra- and inter-attention mechanisms, and the calculation of its matching cost can be represented as:

[0201] ;

[0202] where, and are a set of matched keypoint pairs output by the SuperGlue matching network, denotes the vector inner product, denotes the similarity score of keypoint and keypoint , and are the feature descriptor vectors output by the SuperPoint keypoint detection network.

[0203] where, the SuperGlue matching network uses a graph neural network architecture based on attention mechanism, modeling the feature matching problem as an optimal transport problem, including:

[0204] The feature coding layer is used for fusion coding of the input key point position information and the feature descriptor to generate initial node features containing geometric and appearance information, wherein the key point position is coded by a multi-layer perception, and is added and fused with the visual descriptor to generate the initial node features;

[0205] The multi-level graph neural network is composed of self-attention layers and cross-attention layers which are alternately stacked, the context perception ability of the key point features in the same image is enhanced through the self-attention mechanism, and the semantic association relationship of the key point features between two images is established through the cross-attention mechanism, wherein the self-attention layer enhances the context perception ability of the key point features by calculating the attention weight between the key points in the same image, and the cross-attention layer establishes the semantic corresponding relationship of the key point features between the images by calculating the attention weight of the key points between the two images.

[0206] The matching score layer is used for calculating the matching score matrix of all key point pairs between two images to evaluate the matching possibility between the key points.

[0207] The optimal transmission layer formulates the feature matching problem as a partial assignment problem, solves the optimal matching matrix through an iterative algorithm, outputs the matching confidence with a probability explanation, and adopts an alternating row and column normalization iterative algorithm to solve the optimal matching matrix, so that the pre-set assignment constraint condition is met.

[0208] Specifically, in the embodiment, the SuperGlue feature matching network adopted by the present application constructs the image feature matching problem as an optimal transmission problem which can be globally inferred by a graph neural network, so as to realize high-robustness feature association. The network not only considers the similarity of the key point appearance descriptors, but more importantly, introduces context modeling based on the attention mechanism: firstly, the relationship between the key points in the same image is analyzed through the self-attention layer, so that the feature of each key point contains the context information of the surrounding points; then the key point features of the two images are allowed to "communicate" across the images through the cross-attention layer, so as to evaluate the matching possibility in the global range. Finally, the network formulates the matching problem as a partial assignment problem, and solves a matching result with a probability explanation considering global consistency through the optimal transmission theory. For example, when matching two part images which are shot at different angles, exist partial occlusion or light changes, the SuperGlue can effectively utilize the spatial and semantic association between the feature points, even if a feature point itself has a low similarity, the system can intelligently infer the correct pairing according to the geometric constraint relationship with other matched points, effectively avoiding false matching. The matching accuracy and reliability under the challenges of complex scenes, angle changes, repeated textures or local occlusions are greatly improved, and high-quality matching point pairs are provided for subsequent high-precision image registration

[0209] In step four, the encoder adopts a dual-stream encoding architecture with shared weights to process the to-be-detected multi-modal image and the standard multi-modal image simultaneously, specifically including:

[0210] An input adaptation layer converts the four-channel RGB-D input data into a feature representation processable by the network, where the first three channels are visible light RGB images and the fourth channel is a depth image. An initial feature extraction is performed using a 7x7 convolution kernel with a stride of 2 and padding of 3, and batch normalization and ReLU activation functions are used.

[0211] A feature extraction backbone network is a multi-level feature extraction architecture based on depthwise separable convolution. It gradually expands the receptive field and extracts abstract features of different scales through progressive downsampling.

[0212] A multi-scale feature output module generates a feature pyramid containing low-level detail information and high-level semantic information by setting feature output points at different depths of the backbone network.

[0213] A feature normalization layer performs batch normalization and activation function processing on the output multi-scale features to ensure feature value stability.

[0214] The feature extraction backbone network adopts an improved ResNet architecture, specifically including:

[0215] A residual convolution block contains two 3x3 convolution layers using a pre-activation structure.

[0216] A depthwise separable convolution module replaces standard convolution in deep networks to reduce computational complexity.

[0217] A channel attention mechanism is embedded in the residual block to adaptively adjust the feature weights of each channel.

[0218] The multi-scale feature output module outputs feature maps at four key levels of the network:

[0219] The first-level feature map: spatial downsampling by 4 times, containing rich edge and texture detail information.

[0220] The second-level feature map: spatial downsampling by 8 times, containing intermediate semantic features and local structure information.

[0221] The third-level feature map: spatial downsampling by 16 times, containing high-level semantic features and global context information.

[0222] The fourth-level feature map: spatial downsampling by 32 times, containing the highest level of abstract semantic representation.

[0223] The feature normalization layer uses the following processing flow:

[0224] Batch Normalization: Standardization of each feature channel with mean 0 and variance 1;

[0225] Swish activation function: using As an activation function, it balances the non-linear expression ability and gradient flow;

[0226] DropPath regularization: randomly discarding the entire feature path during training to enhance the model's generalization ability.

[0227] Among them, the encoder adopts a multi-task pre-training strategy:

[0228] Pre-training on the ImageNet dataset for classification tasks;

[0229] Fine-tuning on the depth estimation dataset for depth prediction tasks;

[0230] Further optimization on the semantic segmentation dataset for dense prediction tasks.

[0231] Specifically, in the present embodiment, the shared weight dual-flow encoder adopted by the present application processes the to-be-detected image and the standard image through a symmetric, weight-shared deep network, ensuring that the feature extraction standards for the two images are completely consistent, thereby laying a foundation for subsequent accurate difference analysis. The encoder is designed specifically for processing multi-modal data that combines color (RGB) and three-dimensional geometric (depth D) information, and uses an improved ResNet architecture as the backbone. Through depth separable convolution and embedded channel attention mechanisms, it significantly reduces the computational burden while ensuring the quality of feature extraction. It can extract features at multiple different scales from fine textures, edges to overall semantic structures in the image, just like building a pyramid. For example, when detecting defects on the surface of composite materials, the visible light channel can capture abnormal color changes, while the depth channel can perceive slight concave-convex or deformation on the surface. The encoder fuses and refines these two types of information into multi-level feature representations. It realizes efficient and robust feature representation, weight sharing avoids the model's preference for input order, ensuring the fairness of the comparison; the multi-scale feature pyramid enables the system to both find small scratches and identify large areas of corrosion; and the special multi-task pre-training strategy enables the model to have strong generalization ability, quickly adapt to various complex industrial detection scenarios, and significantly improve the comprehensiveness and accuracy of defect detection.

[0232] In step four, after obtaining the saliency map of the image, it further includes filtering out isolated noise points in it through morphological operations, specifically:

[0233] Binarization processing is performed on the saliency map to generate a binary mask image;

[0234] The binary mask image is processed by a morphological opening operation to eliminate isolated noise points.

[0235] The binary image processed by the morphological operation is subjected to connected region analysis, and is subjected to secondary filtering based on a region area threshold to output a final denoised difference region mask.

[0236] The binarization processing specifically includes: setting a threshold T, setting a pixel point with a pixel value greater than or equal to T in the difference saliency map as a foreground value 1, and setting a pixel point with a pixel value less than T as a background value 0 to generate a binary mask image.

[0237] Further, the morphological opening operation specifically includes:

[0238] A binary mask image is subjected to a corrosion operation by using a structural element with a preset shape and size to eliminate isolated noise points with a size smaller than the structural element and to shrink the boundary of the remaining region, wherein the structural element is one of a rectangle, a circle and a cross, and the size of the structural element is determined according to the expected size of the noise points.

[0239] The image after the corrosion operation is subjected to an inflation operation by using the same structural element to restore the original size of the remaining region and to fill the holes in the region.

[0240] The connected region analysis specifically includes:

[0241] All connected regions in the binary image processed by the morphological opening operation are identified.

[0242] The pixel area of each connected region is calculated.

[0243] Connected regions with a pixel area less than a preset threshold are removed, wherein the preset threshold is determined according to the minimum meaningful defect size in actual application.

[0244] The remaining connected regions are output as a final denoised difference region.

[0245] Specifically, after generating the saliency map, a post-processing procedure based on morphological operations is introduced, the core purpose of which is to filter out false differences such as isolated noise points generated in the previous processing, and accurately locate the real defect area. The procedure first binarizes the saliency map to preliminarily separate the pixel area that may have differences; then it processes the binary image using morphological opening operation (erosion followed by dilation), which can effectively eliminate small and isolated noise points while basically maintaining the shape and area of the real defect area unchanged; finally, the denoised binary image is subjected to connected region analysis, and based on the pre-set area threshold, regions that are continuous but too small in area and have no actual defect significance are also removed, and a pure mask containing only meaningful difference areas is finally output, greatly improving the accuracy and reliability of the defect detection result. By effectively suppressing false differences, the false positive rate of the system is greatly reduced, thereby ensuring that the final output of the difference area positioning information is truly directed to the abnormality with quality evaluation value, providing a high-quality data basis for subsequent decision-making.

[0246] An engineering material quality detection system based on image recognition: comprising:

[0247] An image acquisition module configured to acquire images of the engineering material to be detected;

[0248] An image processing module for pre-processing, registration and difference analysis of the acquired images;

[0249] A reference image generation module for providing standard images for comparison, including a simulation unit for performing multi-physical field simulation and virtual rendering;

[0250] An analysis control module for implementing the execution process of controlling sampling point selection and marking, image comparison and positioning, secondary acquisition triggering, and abnormality analysis;

[0251] An output module configured to output difference area positioning information and abnormality analysis results.

[0252] Embodiment: Automatic detection of surface defects of wind turbine composite blades

[0253] This embodiment takes the appearance quality detection of large composite blades of wind turbines as the application scenario. The blades are easily exposed to surface cracks, corrosion, bulges, and coating peeling in harsh natural environments, and need to be regularly detected with high precision. The blades are huge in size (usually more than 50 meters) and complex in shape (with aerodynamic curved surfaces), and the lighting conditions of the on-site detection environment are unstable, posing a great challenge to traditional detection methods.

[0254] Specific implementation process

[0255] 1. Reference image library construction

[0256] Since it is impossible to obtain an absolutely perfect blade as a standard sample, this example generates a standard image in a virtual simulation manner. First, input the composite material parameters of the blade (such as elastic modulus, thermal expansion coefficient), layup process parameters, and camera parameters (focal length, aperture). Simulate the curing deformation and residual stress distribution of the blade during the manufacturing process through multi-physical field simulation software to generate a digital model containing an ideal geometric shape and common manufacturing defects (such as pores, rich resin area). Subsequently, based on the physical rendering engine, simulate the imaging effect under different sunlight angles at different times to generate a series of high-fidelity standard image library under different lighting conditions, and simulate the addition of camera noise.

[0257] 2. On-site detection process

[0258] Sampling and marking: On the surface of a blade up to 60 meters long, based on historical defect data, sampling points are arranged in stress concentration areas such as the root, leading edge, and trailing edge, and additional points are arranged in the blade body area according to a uniform grid. A specially designed reference mark is pasted on each sampling area, which contains a unique QR code (for positioning and numbering) and an unchanging concentric circle pattern (for registration).

[0259] Image acquisition: A UAV equipped with high-performance industrial cameras and infrared thermometers flies to the designated sampling points. During hovering, the system reads the ambient light sensor data and automatically controls the UAV-mounted LED fill light system to adjust the mixed light intensity and color temperature on the blade surface to match the parameters under the corresponding angle in the virtual standard image library, and then synchronously acquires visible light images and infrared images.

[0260] Image processing and defect identification:

[0261] Registration: The system first identifies the concentric circles in the reference mark for quick preliminary correction. Then, a lightweight convolutional neural network is used to estimate the depth map of the blade at this angle. Next, the acquired visible light image and the corresponding angle image in the standard image library are input into the SuperPoint network to extract key point features, and then the SuperGlue network is used for global matching to calculate the accurate homography transformation matrix, completing the image registration at sub-pixel level accuracy.

[0262] Difference analysis: The registered test image and the standard image form an image pair, which is input into a dual-flow encoder that shares weights. This encoder processes RGB and depth information (RGB-D) simultaneously and aligns the features of the test image to those of the standard image through cross-image attention mechanism, and then calculates the residual error to obtain the difference feature map. After upsampling by the decoder, a difference saliency map is generated.

[0263] Post-processing: The saliency map is binarized and morphological opening operation (using a circular structuring element) is applied to filter out pepper noise. Then, connected component analysis is performed to remove irrelevant regions with small area (e.g., less than 10 pixels). Finally, the correctly located defect candidate regions are output.

[0264] Secondary acquisition and confirmation: For the identified defect candidate regions, the UAV is controlled to fly close for higher resolution secondary image acquisition. The system extracts the LBP texture features, Fourier spectrum features, and deep features extracted by the pre-trained CNN from the defect regions in the secondary acquisition images, and performs weighted similarity calculation with the features at the corresponding positions in the standard image. According to the comprehensive similarity score, the anomaly is classified as "serious defect" (such as structural crack), "minor defect" (such as surface scratch), or "false defect" (such as stain), and a detection report containing the location, category, and confidence is generated.

[0265] The embodiments of the present application are described in detail above with reference to the accompanying drawings, but the present application is not limited to the above-described embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the spirit of the present application.

Claims

1. A method for quality inspection of engineering materials based on image recognition, characterized in that: Includes the following steps: S11: Obtain a reference image; Obtain a standard image of the engineering material to be tested as a reference image. S12: Sampling point selection and marking. Select a sampling area that meets the set number on the engineering material to be inspected, and set a reference mark in the selected sampling area. The reference mark contains a unique identifier and a registration mark. The unique identifier is used to number and locate the sampling area, and the registration mark is a symbol pattern that is completely consistent in all images. S13: Image acquisition, the image acquisition device acquires images of the sampled area after setting the mark, and obtains multiple sets of images to be detected, wherein each set of images to be detected contains the image of the reference mark; S14: Image comparison and localization, compare the image to be detected with the standard image, identify the areas of difference, and record and locate the areas of difference based on the benchmark marking; S15: Secondary acquisition: Based on the positioning results, secondary image acquisition is performed on the identified difference areas; S16: Anomaly analysis, which involves a comprehensive analysis of the secondary acquired image and the image to be detected to obtain the anomaly analysis results; Specifically, when acquiring a standard image of the engineering material to be tested as a reference image, the standard image is first obtained by acquiring an image of a qualified standard engineering material sample. If no qualified standard engineering material sample is available, the standard image is obtained using the following method: S21: Input definition, receive and store the intrinsic property parameter set of the target engineering material, the parameter set of the target processing technology, and the configuration parameter set of the preset image acquisition system; S22: Multiphysics simulation, based on input data, performs computer numerical simulation of the processing technology to calculate the first digital model representing the solid formed by the material after processing and its defect state; S23: Virtual rendering, based on the obtained first digital model and the configuration parameter set of the image acquisition system, simulates the physical imaging process in a virtual environment and calculates and generates an initial standard image; S24: Post-processing, which digitizes the initial standard image to generate the final standard image used for quality detection and comparison; Specifically, when comparing the image to be detected with a standard image to identify areas of difference, the specific implementation process is as follows: S41: Image preprocessing, preprocessing the acquired visible light image and infrared image respectively; S42: Image registration, which registers the preprocessed image with the reference image; S43: Image difference analysis, which performs image difference analysis between the registered image to be detected and the standard image; S44: Image extraction. Based on the image difference analysis results, locate and extract the difference regions between the visible light image and the infrared image. Specifically, image registration includes: S421: Scan the input image, identify and locate the reference markers, perform preliminary perspective correction on the image to be detected using the reference markers, and use a lightweight convolutional neural network model to process the corrected image to estimate its single-channel depth map. S422: Input the pre-corrected image to be detected and the reference image into the SuperPoint keypoint detection network to extract the high-confidence keypoint location coordinates and corresponding feature descriptor vectors; S423: Input two sets of feature descriptors into the SuperGlue matching network, calculate the similarity between descriptors and use the attention mechanism to perform context aggregation, and output a set of matching key point pairs. S424: Using the set of matching keypoint pairs, the optimal homography transformation matrix is ​​estimated using the random sampling consensus algorithm. Then, the homography transformation matrix is ​​used to resample and geometrically transform the source image to complete the registration.

2. The method for quality inspection of engineering materials based on image recognition according to claim 1, characterized in that: During image acquisition, the acquired images include visible light images and infrared images. Visible light image acquisition includes intelligent light source control, the specific implementation process of which is as follows: S31: Standard template extraction, extracting reference parameters from the acquired reference image, including target illuminance value and standard color temperature value; S32: When acquiring images of each sampling area, perform an intelligent adjustment of the light source once.

3. The method for quality inspection of engineering materials based on image recognition according to claim 2, characterized in that: The specific process for intelligent adjustment of the light source is as follows: S321: Place the sampling area at the predetermined imaging position; S322: Real-time reading of the current ambient light illuminance and color temperature values ​​fed back by the ambient light monitoring sensor; S323: Calculate the light source compensation parameters required to compensate for changes in ambient light, and drive the light source so that the output illuminance and color temperature of the light source meet the following requirements: A. ; in, The output illuminance of the light source, For the target illuminance value, This represents the current ambient illuminance value. The ambient light intensity at the time the reference image was acquired; B. Adjust the color temperature so that the mixed color temperature of the light source and ambient light is close to the standard color temperature value; S324: After the mixed illumination of the light source and ambient light has stabilized, perform the image acquisition operation.

4. The method for quality inspection of engineering materials based on image recognition according to claim 3, characterized in that: Image difference analysis specifically includes: S51: The encoder that shares weights with the registered image to be detected and the reference image is used to extract multi-scale abstract features; S52: Semantic alignment and fusion at the feature level are achieved through a cross-image attention mechanism, and differential feature maps are obtained through residual calculation; S53: Use the decoder to restore the resolution of the difference map and post-process it to generate differential detection results that include location and confidence.

5. The method for quality inspection of engineering materials based on image recognition according to claim 4, characterized in that: After obtaining the difference saliency map of the image, the process also includes filtering out isolated noise points through morphological operations, specifically: S61: Binarize the difference saliency map to generate a binary mask image; S62: Morphological opening operation is used to process the binary mask image to eliminate isolated noise points; S63: Perform connected component analysis on the morphologically processed binary image, and perform secondary filtering based on the region area threshold to output the final denoised difference region mask.

6. The method for quality inspection of engineering materials based on image recognition according to claim 5, characterized in that: When comprehensively analyzing the secondary acquired image and the image to be detected to obtain the anomaly analysis results, the specific details include: S71: Extract multi-dimensional features from the secondary acquisition image and the abnormal region image; S72: Calculate the similarity measure between regions based on multi-dimensional features; S73: Determine the anomaly level based on the similarity metric and output the comprehensive analysis results.

7. An image recognition-based engineering material quality inspection system, used to implement the image recognition-based engineering material quality inspection method according to any one of claims 1-6, characterized in that: include: The image acquisition module is configured to acquire images of the engineering materials to be inspected. The image processing module is used for preprocessing, registration, and difference analysis of the acquired images; A benchmark image generation module is used to provide standard images for comparison, including simulation units for performing multiphysics simulation and virtual rendering; The analysis and control module is used to implement the execution flow of control sampling point selection and marking, image comparison and positioning, secondary acquisition triggering, and anomaly analysis; The output module is configured to output differential region location information and anomaly analysis results.

Citation Information

Patent Citations

  • Defect detection method and system

    CN110690136A

  • Defect detection method and device, electronic equipment and storage medium

    CN117830210A