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 technology, the problems of dependence on physical samples and ambient light fluctuations in existing technologies are solved, and high-precision and robust engineering material quality testing is achieved.
Patent Information
- Application Number
- CN202511653995.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2045-11-12
AI Technical Summary
Existing image recognition and 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, a high misregistration rate, difficulty in distinguishing between real and pseudo-defects, and an inability to accurately quantify the severity of defects.
Standard images are generated using multiphysics simulation and virtual rendering technology. An intelligent light source system is introduced for ambient light compensation. A deep learning registration process using SuperPoint and SuperGlue is employed. Semantic-level difference analysis is performed by combining a shared weight encoder and a cross-image attention mechanism. A lightweight depth estimation network is constructed to achieve fully automated detection.
Completely eliminates the dependence on physical samples, ensures consistent lighting for image acquisition, achieves sub-pixel-level high-precision registration, significantly improves the flexibility, accuracy, and robustness of detection, and adapts to complex industrial environments.
Smart Images

Figure CN121120637A_ABST
Abstract
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: 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. When setting a reference mark in the selected sampling area, the reference mark is a texture, paint or other mark, and the reference mark contains a unique identifier and a registration character. The unique identifier is used to number and locate the sampling area, and the registration character 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.
[0007] Preferably, 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 inspection and comparison.
[0008] Preferably, 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.
[0009] As a preferred option, 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.
[0010] 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.
[0011] Preferably, when comparing the image to be detected with a standard image to identify regions 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.
[0012] Preferably, image registration specifically 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.
[0013] Preferably, 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.
[0014] 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.
[0015] Preferably, after obtaining the difference saliency map of the image, the method further 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.
[0016] Specifically, morphological opening operations include: S621: The binary mask image is eroded using a structuring element of a preset shape and size to eliminate isolated noise points smaller than the structuring element and shrink the boundary of the remaining region. The structuring element is one of rectangle, circle and cross, and the size of the structuring element is determined according to the expected size of the noise points. S622: Use the same structuring element to perform a dilation operation on the eroded image, restore the original size of the remaining area and fill the holes inside the area.
[0017] Specifically, connected component analysis includes: S631: Identify all connected regions in a binary image after morphological opening operations; S632: Calculate the pixel area of each connected region; S633: Remove connected regions whose pixel area is smaller than a preset threshold, wherein the preset threshold is determined based on the smallest meaningful defect size in actual application; S634: Output the remaining connected regions as the final denoised difference regions.
[0018] Preferably, when comprehensively analyzing the secondary acquired image and the image to be detected to obtain the anomaly analysis results, the specific steps 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.
[0019] An image recognition-based engineering material quality inspection system includes: 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 a simulation unit 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. The beneficial effects of this invention are: 1. Compared with existing technologies that rely heavily on physical standard samples to establish testing benchmarks, which have the disadvantages of samples being difficult to obtain, easily worn, and unable to cover all defect types, this solution innovatively uses multiphysics simulation and physics-based rendering technology to virtually generate standard images. It can unconditionally provide high-fidelity standard images that can include known defect types, completely eliminating the dependence on physical samples and greatly improving the flexibility of testing and applicability to new products. 2. Compared with the shortcomings of existing technologies, which are severely affected by changes in ambient light during image acquisition, resulting in unstable image quality and directly affecting the accuracy of comparison, this solution introduces an intelligent light source system that integrates a feedforward-feedback composite control strategy. It can sense ambient light in real time and dynamically adjust the supplementary lighting parameters to ensure that the lighting conditions of each acquisition are consistent with the reference height, thus guaranteeing the comparability and reliability of image data from the source. 3. Compared with existing technologies that mainly rely on manually designed features for image registration and have poor matching results under complex textures or large changes in viewing angle, this solution adopts a deep learning registration process that integrates SuperPoint and SuperGlue. It can make full use of context information to perform global optimal matching, and has strong robustness to changes in viewing angle, lighting and partial occlusion, achieving high-precision registration at the sub-pixel level. 4. Compared with existing image difference analysis technologies that mostly use simple pixel-level subtraction and are very sensitive to interference such as non-uniform lighting and shadows, this solution adopts semantic-level difference analysis based on shared weight encoder and cross-image attention mechanism. It can perform semantic alignment at the feature level, effectively suppress irrelevant texture and lighting changes, focus on extracting real structural and material defect features, and significantly improve the signal-to-noise ratio. 5. Compared with existing feature matching methods, which are mostly local greedy matching, prone to erroneous matching and unable to guarantee global consistency, the SuperGlue network used in this solution constructs the matching problem as a global allocation problem based on graph neural networks and optimal transmission. It can comprehensively consider the interrelationships of all feature points and obtain probabilistic, globally consistent, and optimal matching results, which greatly improves the accuracy of matching. 6. Compared with the shortcomings of existing depth estimation models, which are usually computationally expensive and difficult to deploy on resource-constrained industrial field equipment, this solution adopts a lightweight encoder-decoder network that integrates depth-separable convolution and attention mechanisms for depth estimation. It can greatly reduce model complexity and computation while maintaining high accuracy, thus meeting the stringent requirements of industrial inspection for real-time performance and embedded deployment. 7. Compared with the shortcomings of existing detection systems, such as rigid processes, poor adaptability, and difficulty in coping with complex and ever-changing engineering site environments, this solution constructs a fully automated system that integrates intelligent sampling, adaptive image acquisition, precise registration, semantic-level difference detection, and intelligent post-processing and analysis. It has a high degree of intelligence, adaptability, and robustness, and can stably and efficiently complete quality inspection tasks in complex engineering environments. Attached Figure Description
[0020] Figure 1 The diagram shown is a flowchart of the image recognition-based engineering material quality inspection method of the present invention. Figure 2 The diagram shown is a schematic representation of the structure of the image recognition-based engineering material quality inspection system of the present invention. Detailed Implementation
[0021] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0022] Please see Figures 1-2 The present invention provides an embodiment of an image recognition-based method for quality inspection of engineering materials, comprising the following steps: Step 1: Obtain the reference image To obtain a standard image of the engineering material to be tested as a reference image, the standard image is first obtained by acquiring images of qualified standard engineering material samples. Multiple qualified sample images are then fused or averaged to generate a unified standard image. If no qualified standard engineering material samples are available, a standard image is obtained using the following method: The input definition receives and stores the intrinsic property 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. The intrinsic property parameter set of the material includes the mechanical, thermal, and optical properties of the material; the processing technology parameter set includes the equipment operating parameters and environmental parameters related to the specific processing method; and the image acquisition system configuration parameter set includes the camera intrinsic parameters, extrinsic parameters, and illumination geometry and spectral parameters. Multiphysics simulation, based on input data, performs computer numerical simulation of the processing technology process, and calculates the first digital model representing the solid formed by the material after processing and its defect state. This is achieved by solving the coupled physical field control equations, and the solved physical field control equations include equations describing material flow, heat transfer, stress and phase transformation. 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; Post-processing involves digitizing the initial standard image to generate the final standard image used for quality inspection and comparison.
[0023] Among them, multiphysics simulation is based on the constitutive model of materials, and its general form is described by the following equation: ; in, For stress tensor, For strain tensor, For strain rate tensor, For temperature field, The set of internal variables characterizing the microstructure history of materials, This is the constitutive relation function.
[0024] The virtual rendering used is physically based rendering, the core of which is solving rendering equations to simulate the transmission of light: ; in, For surface points In direction The emitted radiance, For the surface point being calculated, Let be the unit vector of the direction of the incident ray. Let be the unit vector of the outgoing ray. For point The normal unit vector at that point, The wavelength of light For time variables, The luminance of that point itself. To be from the direction The brightness of the incident radiation. It is a bidirectional reflectance distribution function, defined by the optical properties of the material. For a hemispherical space, the bidirectional reflection distribution function adopts a micro-surface model, and its form is: ; in, This is the Fresnel term, used to describe the relationship between reflectivity and the angle of incidence. This is a geometric shading term used to describe the shading effect of micro-surfaces. This is the normal distribution function, used to describe the statistical distribution of the orientation of a micro-surface. It is a half-range vector.
[0025] Post-processing also includes introducing simulated camera noise, simulating lens optical distortion, and image format standardization conversion.
[0026] Specifically, in this embodiment, the present invention generates a high-precision standard image as a comparison benchmark using high-fidelity digital simulation technology. Specifically, when a qualified physical sample is lacking, this method performs multi-physics coupling simulation by inputting the material's intrinsic mechanical and thermal properties, processing parameters, and camera settings. This accurately simulates the internal stress, deformation, and even defects that may occur in the material during processing, thereby generating a virtual digital model containing both ideal conditions and potential defects. Subsequently, using physically based rendering technology, the digital model is rendered into a highly realistic image by simulating real light propagation, the microstructure of the material surface, and its interaction with light (such as reflection and occlusion). Furthermore, noise and distortion from a real camera are introduced to simulate these effects, ultimately generating a "standard image" that can be used for comparison. For example, when inspecting a welded component, even without a perfect sample, the ideal weld morphology and common defects such as porosity and cracks can be simulated, generating a standard image of it under specific lighting conditions. In actual inspection, the real image of the component under inspection is intelligently compared with the simulated standard image to accurately locate defects.
[0027] Step 2: Sampling point selection and marking Select a set number of sampling areas on the engineering material to be inspected, and set reference marks within the selected sampling areas. When setting reference marks within the selected sampling areas, the reference marks are textures, paint, or other marks, and each reference mark contains a unique identifier and a registration character. The unique identifier is used to number and locate the sampling areas, and the registration character is a symbol pattern that is completely consistent across all images. When selecting sampling areas, a uniform grid method, a random sampling method, or a key area selection method based on the historical defect probability distribution is used. Specifically, in this embodiment, the core of the sampling point selection and marking step lies in laying the foundation for accurate image comparison in subsequent processes through intelligent region selection and reference marks containing dual information. This step first scientifically determines the sampling area to be inspected based on material characteristics and inspection requirements, employing strategies such as uniform grid coverage, random sampling to ensure statistical representativeness, or focused screening of key areas prone to problems based on historical data. Subsequently, a special reference mark is set on each selected area. This mark not only contains a "unique identifier" to distinguish different locations but also a "registration symbol" (like a standard crosshair) that remains unchanged across all images. For example, when inspecting large wind turbine blades, marks can be strategically placed on the vulnerable leading edge and seams of the blade surface. The number on the mark (unique identifier) indicates the specific inspection point, while its fixed geometric pattern (registration symbol) acts as a visual anchor point.
[0028] Step 3: Image Acquisition The image acquisition device acquires images of the marked sampling area to obtain multiple sets of images to be detected, each set of images containing the reference mark. Step 4: Image Comparison and Localization The image to be detected is compared with a standard image to identify regions of difference. These regions are then marked and located based on a benchmark. The specific implementation process is as follows: Image preprocessing: The acquired visible light images and infrared images are preprocessed separately. Image registration involves registering the preprocessed image with a reference image. Image difference analysis involves performing image difference analysis between the registered image to be detected and the standard image. Image extraction: Based on the image difference analysis results, locate and extract the difference regions between the visible light image and the infrared image.
[0029] Preferably, image registration specifically includes: The input image is scanned to identify and locate reference markers. Preliminary perspective correction is performed on the image to be detected using the reference markers. The corrected image is then processed using a lightweight convolutional neural network model to estimate its single-channel depth map. The pre-corrected image to be detected and the reference image are input into the SuperPoint keypoint detection network to extract the high-confidence keypoint location coordinates and corresponding feature descriptor vectors. Two sets of feature descriptors are input into the SuperGlue matching network. By calculating the similarity between descriptors and using the attention mechanism to perform context aggregation, a set of matching keypoint pairs is output. By using a set of matching keypoint pairs, the optimal homography transformation matrix is estimated using a random sampling consensus algorithm. Then, the homography transformation matrix is used to resample and geometrically transform the source image to complete the registration.
[0030] In the preliminary perspective correction of the image using reference markers, the unique identifier region in the reference markers is first decoded to obtain the sample number and position information. Then, the registration region containing the unified symbol pattern is extracted, and the four outer corner points of the registration mark are used as the initial reference points to perform preliminary perspective correction on the image.
[0031] The homography transformation matrix is expressed in matrix form as follows: ; in, The homography transformation matrix, , , and These four parameters together form a linear transformation matrix, which controls the scaling, rotation, and shearing of the image. Used to control the perspective effect of an image in the x-axis direction. Used to control the amount of image translation along the y-axis. Used to control the perspective effect of an image in the x-axis direction. Used to control the perspective effect of an image in the y-axis direction.
[0032] When using the homography transformation matrix to resample and geometrically transform the source image, the transformation formula is: ; in, These are the pixel coordinates in the original image. These are the coordinates in the target image coordinate system after the transformation.
[0033] Preferably, image difference analysis specifically includes: The registered image to be detected and the reference image are input to an encoder that shares weights to extract multi-scale abstract features. 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.
[0034] The decoder is used to restore the resolution of the difference map, and post-processing is performed to generate differential detection results that include location and confidence.
[0035] Furthermore, when extracting multi-scale abstract features from the encoder that shares weights with the registered image to be detected and the reference image, the specific steps include: Input stream construction involves combining the registered image to be detected with the reference image into an image pair, which serve as the two input streams of the Siamese network. Each input image is multimodal data, containing at least RGB color information channels and single-channel depth information obtained from the depth estimation network, together forming four-channel RGB-D input data. Feature encoding uses two encoders with shared weights to process image pairs. The encoders progressively transform the input image into a set of abstract feature maps at multiple scales through multi-layer convolution and downsampling operations. The backbone network of the encoder is ResNet.
[0036] Preferably, when 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, the specific process is as follows: Key, Value, and Query generation uses the feature map of the benchmark image as the source of the Key and Value; and the feature map of the image to be detected as the source of the Query; the mathematical expression is: , , ; in, The original feature map of the reference image. This is the original feature map of the image to be detected. The weight matrix used to generate the Key. The weight matrix used to generate the Value. The weight matrix used to generate the query. The key is generated after a linear transformation. The value generated after linear transformation. The query is generated after a linear transformation; Attention calculation and feature alignment: By calculating the similarity between the query and the key, an attention weight matrix is generated. The value is then weighted and summed using the attention weight matrix to obtain an aligned and corrected feature map. Differential feature extraction involves subtracting the aligned features of the baseline image from the original features of the image to be detected element-wise to obtain the final differential feature map. ; in, For the final difference feature map, Features of the aligned baseline image; The final difference feature map encodes the differences between the two images at the feature level, even after semantic alignment.
[0037] Preferably, when using the decoder to restore the difference map resolution and post-processing to generate differential detection results including location and confidence, the specific steps include: Feature decoding uses a symmetric decoder network to process the difference feature map obtained from the steps. The decoder consists of multiple upsampling layers and convolutional layers, which progressively upsample the abstract feature map to the resolution of the original input image, and finally output a single-channel original difference map. Post-processing and output: The Sigmoid activation function is applied to the original difference map to normalize its pixel values to the [0, 1] interval to obtain the saliency map. Then, the saliency map is binarized by setting a threshold, and the specific difference regions are located by using connected component analysis. The final output is: the binary mask of the difference region, the difference saliency map, and the category and location information of the difference region.
[0038] Specifically, in this embodiment, the core of the image comparison and localization step lies in achieving accurate identification and localization of differences between the image to be detected and the standard image through a sophisticated process that integrates geometric correction and deep learning semantic understanding. This process first preprocesses the acquired visible light and infrared images, then proceeds to the crucial registration stage: the system not only uses reference markers for rapid preliminary perspective correction, but also extracts a large number of key feature points from the image itself using advanced SuperPoint and SuperGlue neural networks and performs intelligent matching, thereby calculating a high-precision homography transformation matrix. This completely eliminates image position deviations caused by different shooting angles and distances, laying a solid foundation for subsequent pixel-level comparison. After ensuring accurate image alignment, a shared-weights twin encoder network processes both images simultaneously, extracting their deep features. It also innovatively employs a cross-image attention mechanism, allowing the features of the image to be detected to actively "query" and "align" with the features of the standard image, achieving semantic-level comparison rather than simple pixel subtraction. This effectively ignores irrelevant light and shadow changes, focusing on the true essential differences in material, structure, and other fundamental aspects. Finally, the decoder reconstructs the difference feature map into a high-resolution saliency map, accurately locating the defect area. For example, when inspecting the surface of large wind turbine blades, this technology can accurately identify genuine cracks or corrosion even under varying lighting conditions or with slight blade deformation, without being misled by shadows or reflections. The significant advantage of this method lies in its extremely high accuracy and robustness. It combines traditional image processing with cutting-edge deep learning, significantly improving the ability to distinguish between real defects and imaging interference in complex industrial scenarios, thereby drastically reducing false positives and false negatives.
[0039] Step 5: Secondary data collection Based on the positioning results, secondary image acquisition is performed on the identified areas of difference; Step Six: Anomaly Analysis A comprehensive analysis of the secondary acquired image and the image to be detected yields anomaly analysis results, specifically including: Extract multi-dimensional features from secondary acquisition images and images of abnormal regions; Calculate the similarity measure between regions based on multi-dimensional features; Anomaly levels are determined based on similarity metrics, and comprehensive analysis results are output.
[0040] Among them, when extracting multi-dimensional features from the secondary acquisition image and the abnormal region image, the extracted multi-dimensional features include: Texture features are calculated using the LBP operator to compute the local binary pattern histogram feature vector. Spectral features: Fourier transform is performed on the image region to obtain the spectrum map, and low-frequency energy ratio features are extracted; Deep features are extracted using a pre-trained CNN network.
[0041] The similarity metric is calculated using a weighted multi-feature fusion method, and the formula is as follows: ; in, To synthesize the similarity metrics, , and These are the weighting coefficients for texture feature similarity, spectral feature similarity, and depth feature similarity, respectively. This is the function for calculating feature similarity. This refers to the texture feature vector extracted from the image of the region to be detected, acquired in a secondary acquisition. This is the texture feature vector of the corresponding region in the reference image. This is the spectral feature vector extracted from the image of the region to be detected acquired in two separate acquisitions. This represents the spectral feature vector of the corresponding region in the reference image. This is the depth feature vector extracted from the secondary acquired image of the region to be detected. This is the depth feature vector of the corresponding region in the reference image.
[0042] The feature similarity calculation uses cosine similarity as a metric, and the formula is as follows: .
[0043] 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.
[0044] 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: 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. When acquiring images of each sampling area, an intelligent adjustment of the light source is performed, which is achieved through the following steps: Place the sampling area at the predetermined imaging position; Real-time reading of the current ambient light illuminance and color temperature values fed back by the ambient light monitoring sensor; 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: 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.
[0045] 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; After the mixed illumination of the light source and ambient light has stabilized, image acquisition is performed.
[0046] In this embodiment, the target illuminance value in the reference parameters must satisfy the requirement that the illuminance provided on the surface of the sample being tested is significantly higher than the maximum expected ambient illuminance, i.e. .
[0047] In this embodiment, if the reference image is obtained by acquiring an image of a qualified standard engineering material sample, the standard engineering material sample is first placed at a predetermined imaging position, the light source is driven to a preset target parameter, and a standard image is acquired and saved as a standard template. Then, the light source is turned off, and the ambient light intensity at the time of acquisition is detected by an ambient light monitoring sensor.
[0048] In this embodiment, the light source is driven using a feedforward-feedback composite control strategy, and the formula for adjusting the drive current is as follows: ; in, This represents the deviation between the target illuminance and the total illuminance within the field of view of the main sensor at the k-th sampling time. This is the feedforward gain coefficient. The proportional gain coefficient of the PID controller. This represents the integral gain coefficient of the PID controller. This represents the differential gain coefficient of the PID controller.
[0049] In this embodiment, the ambient light monitoring sensor used is a spectroradiometer with a wide-angle cosine corrector, and its monitoring data is transmitted to the main control computer in real time through a serial communication port.
[0050] Specifically, in this embodiment, intelligent light source control is introduced during the image acquisition stage. By sensing and dynamically compensating for changes in ambient light in real time, the system ensures that the lighting conditions of each acquired image are highly consistent with those of the reference image. First, standard light intensity (illuminance) and light color (color temperature) are extracted from the reference image as target parameters. During actual detection, whenever a test area is placed at the camera position, the system immediately reads the current ambient illuminance and color temperature measured by the ambient light sensor. Then, a precise algorithm drives a controllable light source for compensation: its output illuminance automatically makes up the difference between the current ambient light and the reference ambient light, and makes the overall color temperature of the mixed light approach the standard value. This eliminates the interference of ambient light fluctuations on image quality, making the acquired images highly comparable in brightness, color, and contrast. This provides a stable and reliable data foundation for subsequent accurate image comparison and defect identification, greatly improving the robustness and accuracy of the detection system.
[0051] In step four, the SuperPoint keypoint detection network adopts a fully convolutional encoder-decoder architecture, specifically including: The shared encoder module consists of VGG-style convolutional layers, which downsample the input image through multiple max pooling layers to extract multi-level feature representations; The keypoint detection head receives the low-resolution feature map output by the encoder, transforms the number of channels to 65 through a 1×1 convolutional layer, which corresponds to dividing the input image into an 8×8 grid, adding 1 "no keypoint" category to each of the 64 possible keypoint positions in each cell, and finally generating a keypoint heatmap through the softmax function and reshape operation of the channel dimension. The descriptor extraction head runs in parallel with the keypoint detection head. It transforms the number of channels in the encoder output feature map to 256 through a 1×1 convolutional layer, and then restores it to the input image resolution through bilinear upsampling to generate a dense feature descriptor map.
[0052] The SuperPoint keypoint detection network employs a training strategy combining self-supervised and supervised training. It is first pre-trained on a synthetic shape dataset and then fine-tuned on a real image dataset. The multi-task loss function used is: ; in, For key point detection of loss, To balance hyperparameters, For descriptor matching loss.
[0053] The specific calculation process of the key point detection head is as follows: The H×W input image is divided into H / 8×W / 8 8×8 grid cells; For each grid cell, predict the probability distribution of 64+1 categories, where 64 locations correspond to pixel locations within the grid, and 1 location indicates that the cell has no keypoints; The probability of each position is calculated using softmax: ;in, Let x be the predicted probability at position x. This is the raw score at position x. Indicates the raw score Perform exponential operations. The index score for the i-th category; The 65-channel output is converted to a heatmap format using the reshape operation.
[0054] The descriptor extraction head uses a bilinear upsampling method to upsample the low-resolution descriptor image to the original image resolution.
[0055] In the post-processing stage, the SuperPoint keypoint detection network employs a keypoint selection method based on non-maximum suppression. Local extrema are found by applying a 3×3 max pooling layer to the heatmap; Set a confidence threshold to filter low-quality key points; Sub-pixel refinement is performed on the remaining key points to improve positioning accuracy.
[0056] Specifically, in this embodiment, the SuperPoint keypoint detection network uses a shared encoder to simultaneously complete feature point localization and feature description generation, achieving a balance between efficiency and accuracy. This network uses VGG-like convolutional layers to extract multi-level features from the image, then processes them through two parallel branches: one branch, like performing fine-grained grid classification, predicts the probability of stable keypoints appearing in each small region of the image, thus obtaining a keypoint "heatmap"; the other branch is responsible for generating a high-dimensional, discriminative "feature descriptor" for each pixel in the image, essentially creating a unique digital ID for each keypoint. To ensure the network's robustness in real-world industrial scenarios, its training process integrates 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 also performs post-processing steps such as non-maximum suppression to filter out unstable points and refine the keypoint positions at the sub-pixel level, ensuring that each point is located at a true feature position such as an edge or corner. For example, when inspecting composite material surfaces with complex textures, this network can reliably identify a large number of meaningful feature points, even if the material surface has reflections or minor scratches. It can provide a large number of high-quality, highly repeatable key points and their descriptors for accurate subsequent image registration, fundamentally ensuring reliable matching between images taken at different times and angles, laying a solid foundation for accurate defect detection.
[0057] In step four, the lightweight convolutional neural network model employed uses an encoder-decoder architecture and integrates depthwise separable convolution and attention mechanisms, specifically including: The encoder part consists of multiple depthwise separable convolutional blocks stacked together. Each convolutional block contains a depthwise convolutional layer and a pointwise convolutional layer, which are used to extract multi-level features from the input image. In the decoder section, the feature map is upsampled step by step through transposed convolutional layers and fused with the feature map of the corresponding layer of the encoder through skip connections. The final output is a single-channel depth map with the same resolution as the input image. Furthermore, a channel attention module is embedded between the encoder and decoder. This module obtains channel weights through global average pooling and recalibrates the feature channels.
[0058] The depthwise separable convolutional block adopts an inverse residual structure, first expanding the number of channels through 1×1 convolution, then performing 3×3 depthwise convolution, and finally compressing the number of channels through 1×1 convolution.
[0059] The channel attention module calculates the channel weights using the following formula: ; in, This is the compressed global feature vector. This is the weight matrix of the first fully connected layer. It is the ReLU activation function. This is the weight matrix for the second fully connected layer. This is the Sigmoid activation function.
[0060] The lightweight convolutional neural network model used employs a loss function of scale-invariant logarithmic error during training, with the following formula: ; in, The SILog loss value. The sum of effective pixels. It is the logarithmic difference at a single pixel, and , Let i be the predicted depth value of the i-th pixel. Let be the true depth value of the i-th pixel.
[0061] Specifically, in this embodiment, the core design idea of the lightweight convolutional neural network model adopted by this invention is to greatly reduce the complexity and computational overhead of the model while ensuring the accuracy of depth estimation, enabling it to run efficiently on embedded devices with limited computing resources. The model employs an encoder-decoder architecture. The encoder uses depth-separable convolutional blocks to extract image features layer by layer. This structure decomposes standard convolution into depthwise convolution and pointwise convolution, significantly reducing the number of parameters. The decoder upsamples through transposed convolution and fuses the detailed features of the encoder to gradually recover a high-resolution depth map. To improve feature representation capabilities, a channel attention mechanism is embedded between the encoder and decoder. This mechanism automatically evaluates and weights the importance of each feature channel, making the network focus more on information-rich features. Furthermore, the model uses an inverse residual structure to enhance gradient flow and is trained using a loss function that focuses on relative depth relationships rather than absolute values, which improves the accuracy of depth prediction. For example, in inspection equipment deployed in industrial settings, this lightweight model can quickly estimate the three-dimensional contour information of a material surface from a two-dimensional image captured by a single camera. It achieves an excellent balance between accuracy and efficiency, providing crucial scene geometry information to assist in accurate image registration while also boasting low power consumption and high speed, making it ideal for deployment in real-time demanding environments such as production lines.
[0062] In step four, the core of the feature matching network SuperGlue is the use of a graph neural network for inner and outer attention mechanisms. The calculation of its matching cost can be expressed as: ; in, and For a set of matching keypoint pairs output by the SuperGlue matching network, Represents the dot product of vectors. Indicate key points and key points Similarity score, and This is the feature descriptor vector output by the SuperPoint keypoint detection network.
[0063] The SuperGlue matching network uses an attention-based graph neural network architecture to model the feature matching problem as an optimal transport problem, including: The feature encoding layer is used to fuse and encode the key point location information and feature descriptors of the input to generate initial node features containing geometric and appearance information. Specifically, the key point locations are encoded by a multilayer perceptron and then fused with the visual descriptors to generate the initial node features. A multi-level graph neural network is composed of alternating stacks of self-attention layers and cross-attention layers. It enhances the context awareness of key point features within the same image through the self-attention mechanism and establishes semantic associations of key point features between two images through the cross-attention mechanism. Specifically, the self-attention layer enhances the context awareness of key point features by calculating the attention weights between key points within the same image, while the cross-attention layer establishes semantic correspondences of key point features between images by calculating the attention weights of key points between two images. The matching score layer is used to calculate the matching score matrix of all keypoint pairs between two images and to evaluate the matching probability between keypoints. The optimal transport layer formalizes the feature matching problem into a partial assignment problem, solves the optimal matching matrix through an iterative algorithm, and outputs the matching confidence with probabilistic interpretation. The optimal matching matrix is solved by an alternating row and column normalization iterative algorithm, which satisfies the pre-set assignment constraints.
[0064] Specifically, in this embodiment, the SuperGlue feature matching network employed in this invention constructs the image feature matching problem as an optimal transport problem that can be globally inferred through graph neural networks, thereby achieving highly robust feature association. This network not only considers the similarity of keypoint appearance descriptors but, more importantly, introduces context modeling based on an attention mechanism: first, a self-attention layer analyzes the relationships between keypoints within the same image, ensuring that the features of each keypoint contain contextual information about its surrounding points; then, a cross-attention layer allows keypoint features from two images to "communicate" across the graph, thereby evaluating the matching probability globally. Finally, the network formalizes the matching problem as a partial assignment problem, solving for a matching result with global consistency and probabilistic interpretation through optimal transport theory. For example, when matching two images of parts taken from different angles with partial occlusion or changing lighting, SuperGlue can effectively utilize the spatial and semantic relationships between feature points. Even if a feature point itself has low similarity, the system can intelligently infer the correct pairing based on its geometric constraints with other matched points, effectively avoiding mismatches. This significantly improves the matching accuracy and reliability under challenges such as complex scenes, changing viewpoints, repetitive textures, or partial occlusion, providing crucial high-quality matching point pairs for subsequent high-precision image registration. In step four, the encoder employs a shared-weight dual-stream coding architecture to simultaneously process the multimodal image to be detected and the standard multimodal image, specifically including: The input adaptation layer converts the four-channel RGB-D input data into a feature representation that the network can process. The first three channels are visible light RGB images, and the fourth channel is a depth image. A 7×7 convolutional kernel is used for initial feature extraction with a stride of 2 and padding of 3. Batch normalization and ReLU activation function are also used. The feature extraction backbone network is a multi-level feature extraction architecture built on depthwise separable convolutions. It gradually expands the receptive field and extracts abstract features at different scales through progressive downsampling. The multi-scale feature output module sets feature output points at different depths of the backbone network to generate a feature pyramid containing low-level detailed information and high-level semantic information. The feature normalization layer performs batch normalization and activation function processing on the output multi-scale features to ensure the stability of feature values.
[0065] The feature extraction backbone network adopts an improved ResNet architecture, specifically including: Residual convolutional blocks, each containing two 3×3 convolutional layers, employ a pre-activated structure; Depthwise separable convolutional modules replace standard convolutions in deep networks, reducing computational complexity; The channel attention mechanism is embedded in the residual block to adaptively adjust the feature weights of each channel.
[0066] The multi-scale feature output module outputs feature maps at four key layers of the network: First-level feature map: spatial downsampling by 4 times, containing rich edge and texture details; Second-level feature map: spatial downsampling by 8 times, containing intermediate semantic features and local structural information; Third-level feature map: spatial downsampling by 16 times, containing high-level semantic features and global contextual information; Level 4 feature map: spatial downsampling by 32 times, containing the highest level of abstract semantic representation.
[0067] The feature normalization layer employs the following processing flow: Batch normalization: Standardize each feature channel to a mean of 0 and a variance of 1; Swish activation function: (Using) As an activation function, it balances nonlinear expressiveness with gradient flow; DropPath regularization: Randomly discards the entire feature path during training to enhance the model's generalization ability.
[0068] The encoder employs a multi-task pre-training strategy: Pre-train on the ImageNet dataset for a classification task; Fine-tune the depth prediction task on the depth estimation dataset; Further optimizations were made for dense prediction tasks on semantic segmentation datasets.
[0069] Specifically, in this embodiment, the shared-weight dual-stream encoder employed in this invention processes the image to be inspected and the standard image simultaneously through a symmetrical, weight-sharing deep network, ensuring complete consistency in feature extraction standards for the two images, thus laying the foundation for subsequent accurate difference analysis. This encoder is specifically designed for processing multimodal data that integrates color (RGB) and three-dimensional geometry (depth D) information. It uses an improved ResNet architecture as its backbone and significantly reduces computational burden while maintaining feature extraction quality through depth-separable convolution and embedded channel attention mechanisms. It can extract features at multiple scales from images, ranging from subtle textures and edges to overall semantic structure, much 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 minute surface irregularities or deformations. The encoder fuses these two types of information and refines them into multi-level feature representations. It achieves efficient and robust feature representation, and weight sharing avoids model bias on input order, ensuring the fairness of comparison; multi-scale feature pyramid enables the system to detect both tiny scratches and large-area corrosion; and a dedicated multi-task pre-training strategy gives the model strong generalization ability, enabling it to quickly adapt to various complex industrial inspection scenarios and significantly improve the comprehensiveness and accuracy of defect detection.
[0070] In step four, after obtaining the difference saliency map of the image, the process also includes filtering out isolated noise points through morphological operations, specifically: The difference saliency map is binarized to generate a binary mask image; Morphological opening operations are used to process binary mask images to eliminate isolated noise points. Connectivity analysis is performed on the morphologically processed binary image, and secondary filtering is performed based on the region area threshold to output the final denoised difference region mask.
[0071] Specifically, the binarization process involves setting a threshold T, setting pixels with values greater than or equal to T in the significant difference map to foreground value 1, and setting pixels with values less than T to background value 0, thereby generating a binary mask image.
[0072] Furthermore, morphological opening operations specifically include: The binary mask image is eroded using a structuring element of a preset shape and size to eliminate isolated noise points smaller than the structuring element and shrink the boundary of the remaining region. The structuring element is one of rectangle, circle and cross, and the size of the structuring element is determined according to the expected size of the noise points. The same structuring element is used to perform a dilation operation on the eroded image to restore the original size of the remaining area and fill the holes inside the area.
[0073] Specifically, connected component analysis includes: Identify all connected regions in a binary image after morphological opening operations; Calculate the pixel area of each connected region; Remove connected regions whose pixel area is smaller than a preset threshold, where the preset threshold is determined based on the smallest meaningful defect size in actual application; The remaining connected regions are output as the final denoised difference regions.
[0074] Specifically, after generating the saliency map, a post-processing workflow based on morphological operations is introduced. Its core purpose is to filter out spurious differences, such as isolated noise points generated in the initial processing, and accurately locate the true defect regions. This workflow first binarizes the saliency map, initially separating pixel regions that may exhibit differences. Then, morphological opening operations (erosion followed by dilation) are used to process the binary image. This effectively eliminates small, isolated noise points while largely maintaining the shape and area of the true defect regions. Finally, connected component analysis is performed on the denoised binary image, and regions that are continuous but too small and lack actual defect significance are filtered out based on a preset area threshold. The final output is a clean mask containing only meaningful difference regions, greatly improving the accuracy and reliability of defect detection results. By effectively suppressing spurious differences, the false alarm rate of the system is significantly reduced, ensuring that the final output difference region location information truly points to anomalies with quality assessment value, providing a high-quality data foundation for subsequent decision-making.
[0075] An image recognition-based engineering material quality inspection system includes: 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 a simulation unit 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.
[0076] Example: Automated detection of surface defects in composite material blades for wind turbines This embodiment uses the appearance quality inspection of large composite material blades for wind turbines as an application scenario. Blades are exposed to harsh natural environments for extended periods, making them prone to defects such as surface cracks, corrosion, bulges, and coating peeling, necessitating regular high-precision inspections. The blades are enormous (typically exceeding 50 meters) and have complex shapes (featuring aerodynamic curved surfaces), and the lighting conditions in the on-site inspection environment are unstable, posing significant challenges to traditional inspection methods.
[0077] Specific implementation process 1. Construction of the benchmark image library Since a perfectly perfect blade cannot be obtained as a standard sample, this example uses virtual simulation to generate standard images. First, the composite material parameters of the blade (such as elastic modulus and coefficient of thermal expansion), layup process parameters, and camera parameters (focal length and aperture) are input. Multiphysics simulation software is used to simulate the curing deformation and residual stress distribution of the blade during manufacturing, generating a digital model that includes ideal geometry and common manufacturing defects (such as porosity and resin-rich areas). Subsequently, a physically based rendering engine simulates the imaging effects under different sunlight angles at different times, generating a high-fidelity standard image library under various lighting conditions, and simulating the addition of camera noise.
[0078] 2. On-site testing process Sampling and Marking: On the 60-meter-long blade surface, based on historical defect data, sampling points were strategically placed in stress concentration areas such as the blade root, leading edge, and trailing edge. Additional sampling points were placed in the blade body area using a uniform grid. Each sampling area was affixed with a specially designed reference marker containing a unique QR code (for location and numbering) and a consistent concentric circle pattern (for registration).
[0079] Image Acquisition: A drone equipped with a high-performance industrial camera and an infrared thermal imager flies to the designated sampling point. During hovering, the system reads data from the ambient light sensor and automatically controls the LED supplementary lighting system on the drone to adjust the mixed light intensity and color temperature on the blade surface to match the parameters at the corresponding angle in the virtual standard image library. Subsequently, visible light and infrared images are acquired simultaneously.
[0080] Image processing and defect recognition: Registration: The system first identifies concentric circles in the reference markers for rapid preliminary correction. Then, a lightweight convolutional neural network is used to estimate the depth map of the blade from this viewpoint. Next, the acquired visible light image and images of corresponding angles in a standard image library are input into the SuperPoint network to extract key point features, and then global matching is performed through the SuperGlue network to calculate the accurate homography transformation matrix, completing image registration with sub-pixel accuracy.
[0081] Difference analysis: The registered image to be detected and the standard image are paired and input into a weighted dual-stream encoder. This encoder processes both RGB and depth information (RGB-D) simultaneously and uses a cross-image attention mechanism to align the features of the image to be detected with those of the standard image. The residuals are then calculated to obtain a difference feature map. After upsampling by the decoder, a difference saliency map is generated.
[0082] Post-processing: The difference saliency map is binarized, and morphological opening operation (using circular structuring elements) is used to filter out pepper noise. Then, through connected component analysis, irrelevant regions with too small an area (such as less than 10 square pixels) are removed, and finally, the accurately located defect candidate regions are output.
[0083] Secondary image acquisition and confirmation: For identified defect candidate areas, the system controls a drone to fly at close range to acquire higher-resolution secondary images. The system extracts LBP texture features, Fourier spectral features, and depth features extracted by a pre-trained CNN from the defect areas in the secondary acquired images, and performs weighted similarity calculations with the features at corresponding locations in the standard image. Based on the comprehensive similarity score, the anomaly is classified into "serious defects" (such as structural cracks), "minor defects" (such as surface scratches), or "pseudo-defects" (such as stains), and a detection report including location, category, and confidence level is generated.
[0084] The embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
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.
2. The method for quality inspection of engineering materials based on image recognition according to claim 1, characterized in that: 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 inspection and comparison.
3. The method for quality inspection of engineering materials based on image recognition according to claim 2, 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.
4. The method for quality inspection of engineering materials based on image recognition according to claim 3, 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.
5. The method for quality inspection of engineering materials based on image recognition according to claim 4, characterized in that: When comparing the image to be detected with a standard image to identify regions 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.
6. The method for quality inspection of engineering materials based on image recognition according to claim 5, characterized in that: Image registration specifically 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.
7. The method for quality inspection of engineering materials based on image recognition according to claim 6, 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.
8. The method for quality inspection of engineering materials based on image recognition according to claim 7, 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.
9. The method for quality inspection of engineering materials based on image recognition according to claim 8, 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.
10. An engineering material quality inspection system based on image recognition, 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
Image registration method and device, electronic equipment and readable storage medium
CN116091568A
Defect detection method and device, electronic equipment and storage medium
CN117830210A
Power distribution room equipment anomaly detection method based on twin neural network
CN118262150A
Micro-display defect detection method based on image recognition
CN120411838A
Cited By
Machine vision-based automatic identification method for assembly quality of assembly type station component
CN121366386A
Method and system for autonomously optimizing paint spraying process, medium and product
CN121411175A
A method, system, medium, and product for autonomous optimization of a paint spraying process
CN121411175B
Construction fence structural change detection and multi-mode auxiliary disposal method and system
CN122024170A
Infrared thermal image and visible light image registration fusion method
CN122156275A