An industrial material detection method and system based on feature extraction and contrast enhancement

CN122510167APending Publication Date: 2026-08-04都兆阳
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
都兆阳
Filing Date
2026-04-21
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

[0005]针对现有技术的不足,本发明提供了一种基于特征提取与对比度增强的工业材料检测方法及系统,通过集成X射线穿透成像、多维度图像增强与深度学习驱动的智能评级体系,从根本上解决了传统工业材料检测中存在的图像质量不一致、材质识别缺失与评级主观性强等关键技术瓶颈,实现工业材料缺陷检测的自动化、智能化与客观化升级

Benefits of technology

1、实现高速运动状态下无模糊的高质量成像:通过采用曝光时间与工件移动速度相匹配的脉冲式X射线源,并与高精度编码器严格同步触发,从根本上抑制了因工件与成像系统间相对运动导致的图像模糊和错位。结合空间分辨率达128μm、动态范围不低于16位的高性能数字平板探测器,确保原始图像能够清晰、完整地捕获从宏观到微观、从高吸收到低吸收的全谱系内部结构特征,为后续高精度分析提供了数据基础。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122510167A_ABST
    Figure CN122510167A_ABST
Patent Text Reader

Abstract

This invention discloses an industrial material inspection method and system based on feature extraction and contrast enhancement, belonging to the field of image inspection technology. It includes: S1, acquiring the transmitted signal using a digital flat panel detector and generating an original digital image based on the differences in X-ray absorption by different materials or defects; S2, performing uniformity correction and normalization enhancement on the original digital image, and achieving preliminary differentiation of different material regions; S3, dividing the original image data into processing domains based on the preliminary differentiation results, and performing differentiated enhancement processing based on the local feature attributes of each processing domain to generate a binary feature image. By integrating X-ray penetration imaging, multi-dimensional image enhancement, and a deep learning-driven intelligent rating system, this invention fundamentally solves the key technical bottlenecks in traditional industrial material inspection, such as inconsistent image quality, lack of material identification, and strong subjectivity in rating, achieving an automated, intelligent, and objective upgrade in industrial material defect detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image detection technology, and in particular to a method and system for detecting industrial materials based on feature extraction and contrast enhancement. Background Technology

[0002] With the continuous advancement of industrial non-destructive testing (NDT) technology, X-ray imaging-based defect detection methods for industrial materials are playing a crucial role in aerospace, energy equipment, and high-end manufacturing. Traditional steel alloy material flaw detection largely relies on manual visual interpretation or simple imaging equipment. This process lacks systematicity and standardization, making it difficult to meet the high-precision, high-efficiency, and repeatable quality control requirements of modern manufacturing. Especially in the large-scale production of tubular metal components, accurate defect identification and quantitative rating directly affect product safety and service life, placing higher demands on the automation level, image resolution capabilities, and objectivity of the inspection system.

[0003] Among these advancements, automated inspection technology based on X-ray penetration imaging has become an important direction for improving the flaw detection efficiency of industrial materials. This technology acquires information about the internal structure of materials through digital detectors and extracts potential defect features by combining image processing algorithms. However, existing solutions still face multiple bottlenecks in practical applications: on the one hand, the imaging process often leads to image misalignment or omissions due to the asynchronous movement of materials and X-ray exposure; on the other hand, while multi-source X-ray configuration can expand the coverage area, it is prone to introducing interference factors such as uneven brightness, affecting the consistency of subsequent analysis. In addition, current mainstream algorithms mostly focus on binary judgment of the presence or absence of defects, lacking refined modeling of defect types, morphologies, and severity.

[0004] Existing technologies generally suffer from problems such as strong subjectivity in manual rating, lack of quantitative standards, and low detection efficiency. Detection results are highly dependent on operator experience, making it difficult to establish a unified numerical mapping relationship for defect levels. This leads to rating discrepancies for the same batch of materials under different inspection times or by different personnel. Furthermore, due to the lack of structured feature extraction and area quantification mechanisms for typical casting defects (such as porosity and inclusions), existing systems cannot achieve automatic classification of defect severity. Therefore, in high-speed, continuous industrial production environments, there is an urgent need for an industrial material inspection method and system that integrates precise synchronous imaging, multi-dimensional image enhancement, and intelligent quantitative rating to overcome the current comprehensive bottlenecks in accuracy, consistency, and efficiency of automated flaw detection. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides an industrial material inspection method and system based on feature extraction and contrast enhancement. By integrating X-ray penetration imaging, multi-dimensional image enhancement, and a deep learning-driven intelligent rating system, it fundamentally solves the key technical bottlenecks in traditional industrial material inspection, such as inconsistent image quality, lack of material identification, and strong subjectivity in rating, thereby achieving an automated, intelligent, and objective upgrade in industrial material defect detection.

[0006] In a first aspect, the present invention provides an industrial material detection method based on feature extraction and contrast enhancement, the method comprising: S1. Utilizing the principle of X-ray penetration imaging, based on the differences in X-ray absorption by different materials or defects, a digital flat panel detector is used to collect the relative X-ray attenuation distribution signal after penetrating and characterizing the internal structure of the material, and generate an original digital image; the original digital image is used to reflect the density distribution characteristics of the internal structure of the material. S2. Perform uniformity correction and normalization enhancement on the original digital image, construct a unified intensity reference for each processing parameter in the subsequent image processing, realize the preliminary distinction of different material regions, and generate an initial material mapping map. S3. Divide the original image data into different processing domains, and adaptively modulate the image processing parameters according to the local feature attributes of each processing domain to perform differentiated enhancement processing on the image data and generate a binary feature image. S4. Based on binary feature images, other intermediate images, and initial material mapping maps, achieve automatic defect identification, classification, quantitative rating, and final visualization output of a single inspection report; Wherein, S3 includes: S31. Based on the local statistical features of the corresponding material region in the initial material mapping map, the filter window size and pixel weight distribution are adaptively determined to suppress random noise in the image, while preserving the edge details of defects to the maximum extent, and generating a denoised digital image. S32. Based on the local contrast distribution of defects and background in different material regions, adaptively determine the gain coefficient of each scale in the multi-scale structure enhancement process, enhance the contrast between the defect structure and the background, and generate a structure-sharpened image. S33. Based on the structurally sharpened image, determine the threshold range for defect segmentation, and separate the suspected defect region from the material matrix by iterative discrimination of pixels within the region to generate a binary feature image.

[0007] Preferably, the uniformity correction includes: In the absence of samples, several frames of unobstructed projection images were continuously acquired, and the empty field image was obtained by arithmetic averaging. The actual response value of each pixel coordinate position in the empty field image is compared with the preset ideal uniform response value, and the pixel correction coefficient matrix is ​​generated by the following formula. ; In the formula, Empty field image in pixel coordinates Pixel correction coefficients at the location; The ideal uniform response value is preset, which is usually the median of the response values ​​of all pixels in the entire detection area; Empty field image in pixel coordinates The grayscale value at the specified location; the pixel correction coefficient matrix is ​​stored in the system's non-volatile memory and updated once before the start of each work shift; The correction process uses the following formula to process the original image in real time to generate a uniformity-corrected image: ; In the formula, The original image in pixel coordinates The grayscale value at that location; To correct pixel coordinates in a uniform image The grayscale value at that location.

[0008] Preferably, the normalization enhancement includes: The normalized intensity value of the uniformity-corrected image is calculated according to the following formula; ; In the formula, Empty field image in pixel coordinates The grayscale value at that location; To correct the uniformity of the image at pixel coordinates The normalized intensity value at that location; The preset bias compensation parameters are used to avoid the denominator being too small and to adapt to different imaging conditions; the normalization process can convert the absorption characteristics of different materials to X-rays into a unified intensity scale. Based on the distribution characteristics of the normalized intensity values, the uniformity correction image is automatically divided into different material regions. Each region is assigned a unique material identifier code, and an initial material mapping map is generated.

[0009] Preferably, S2 further includes a temperature compensation mechanism: At this point, the bias compensation parameter is no longer a fixed value, but a function of the ambient temperature; the initial value of the bias compensation parameter is determined through calibration experiments, and a functional relationship between the bias compensation parameter and temperature is established for different alloy materials. In the formula, As the reference temperature, The current ambient temperature. These are the bias compensation parameters at the reference temperature. It is a temperature sensitivity coefficient specific to the material; when the ambient temperature sensor detects fluctuations exceeding the preset threshold of the ambient temperature, the control system automatically adjusts the value of the bias compensation parameter.

[0010] Preferably, S31 includes: The initial material map is calculated, and the local variance within a sliding window centered on each pixel is adaptively determined based on local statistical characteristics. This variance characterizes the noise level and texture complexity of the region. The filtering method is then dynamically selected based on the range of local variance values. If the local variance is less than the low threshold, it is determined to be a flat or low-noise region. Based on the local statistical features of each region, structural features are extracted to adaptively determine the sliding window size, and guided filtering or median filtering is used to denoise; while ensuring efficiency, noise is smoothed. Local statistical features can be adaptively used to determine the sliding window size for denoising, or guided filtering or median filtering can be used for denoising. If the local variance is greater than the high threshold, it is judged as a high noise or high detail region. The sliding window size is adaptively determined according to the local statistical characteristics, or weighted filtering is used for noise reduction. In the weighted filtering, the weight of the neighboring pixels is dynamically allocated according to the difference between their gray values ​​and the center pixel. The smaller the difference, the higher the weight. If the local variance is between the low threshold and the high threshold, then the output results of the two filters mentioned above are interpolated and mixed. Noise suppression is performed based on the determined adaptive strategy, and a denoised digital image is generated.

[0011] Preferably, S32 includes: The denoised digital image is decomposed into a multi-level scale spatial representation, with each layer representing high-frequency detail information at different spatial scales, and the lowest scale layer being the low-frequency residual image. Nonlinear enhancement processing is performed on the high-frequency detail components of each layer, and the enhanced high-frequency detail components are represented as follows: In the formula, For the high-frequency detail components corresponding to the scale layer, The gain coefficient is adaptively determined by the statistical characteristics of the local contrast between the defect and the background within the material region where the layer at this scale is located; The high-frequency components amplified from each layer are reconstructed with the low-frequency components from the bottom layer to generate a structure-sharpened image.

[0012] Preferably, S33 includes: Calculate the global grayscale mean of the structure-sharpened image, and set a low threshold and a high threshold; In the structure-sharpened image, pixels below a low threshold are labeled as background, and pixels above a high threshold are labeled as foreground. For undetermined pixels between the low and high thresholds, iterative judgment is performed based on the categories of the determined pixels in their neighborhood; if foreground pixels are in the majority in their neighborhood, they are marked as foreground, otherwise they are marked as background. This process is repeated until all pixel categories converge, generating a binary image. Morphological closing operations are performed on the binary image obtained from the initial segmentation to fill the small holes in the defect area caused by noise or gray-level fluctuations, smooth the defect boundary, and obtain a connected region. By applying a connected component analysis algorithm, the pixel area of ​​each independent foreground region is calculated, and isolated regions with an area smaller than a preset threshold are removed, treated as noise, and classified as background. After the above processing, a connected binary feature image is output, in which the foreground target is a complete set of suspected defect regions.

[0013] Preferably, S4 includes: A neural network model based on a multi-source image feature learning model architecture is used for defect type identification. The neural network model is pre-trained on a labeled dataset containing various typical defect morphologies. The input feature tensor of the model is multi-channel fused data, which includes: the original digital image representing physical density, the initial material mapping map representing material properties, and the binary feature image representing geometric morphology. The robustness of defect identification is improved through a multi-source information complementarity mechanism. The samples cover 6 common alloy materials and 5 typical defect morphologies, including porosity, inclusions, cracks, lack of fusion, and shrinkage porosity. After completing the defect classification, the pixel area of ​​each classified defect connected region is calculated based on the binary feature image, converted into the actual physical area according to the system resolution, and the generated actual physical area is compared with the built-in area-level mapping table to map the defect area to a defect level of 1 to 8. Then, all the information from a single test is integrated to generate a single test report that can be archived, reviewed, and used for decision-making.

[0014] Preferably, the model also includes a closed-loop learning step, which includes: receiving the manual review results of suspected defects by quality inspectors; the manual review results include defect boundaries and / or defect types and / or defect levels; associating the manual review results with the original digital image, initial material mapping map, binary feature image and single inspection report identification information to generate training samples and write them into the training queue; When the preset triggering conditions are met, the neural network model is incrementally trained or periodically trained to generate an updated model, and then switched to the online model when the preset update admission conditions are met.

[0015] Secondly, the present invention also provides an industrial material inspection system based on feature extraction and contrast enhancement, which is applied to the industrial material inspection method based on feature extraction and contrast enhancement as described above. The system includes a data acquisition module, an image preprocessing module, a feature extraction module, a quantitative rating module, a defect tracing module, and a human-computer interaction module. The data acquisition module, based on the differences in X-ray absorption by different materials or defects, acquires the relative X-ray attenuation distribution signal after penetrating and characterizing the internal structure of the material using a digital flat panel detector, and generates the original digital image. The image preprocessing module is used to perform uniformity correction and normalization enhancement on the original digital image, construct a unified intensity reference for each processing parameter in the subsequent image processing, realize the preliminary distinction of different material regions, and generate an initial material mapping map. The feature extraction module is used to divide the original image data into different processing domains, and adaptively modulate the image processing parameters according to the local feature attributes of each processing domain to perform differentiated enhancement processing on the image data and generate a binary feature image. The quantitative rating module, based on binary feature images, other intermediate images and initial material mapping maps, realizes automatic identification, classification and quantitative rating of defects, and generates a single inspection report. The defect traceability module is used to package the original digital images generated by the detection, intermediate processing results, single detection reports and operation logs into an encrypted data package, encrypt it with a symmetric encryption algorithm, and upload it to the system server to provide a data foundation for product quality traceability and process optimization. The human-computer interaction module provides quality inspectors with visual review and manual correction, and feeds back to the neural network model training queue to form a closed-loop learning mechanism to continuously optimize classification accuracy. The closed-loop learning module is used to obtain the results of manual review and to schedule training tasks to generate updated models when preset trigger conditions are met.

[0016] Compared with the prior art, the present invention has the following advantages and beneficial effects: 1. Achieving blur-free, high-quality imaging at high speeds: By employing a pulsed X-ray source with exposure time matched to the workpiece's moving speed and strictly synchronized with a high-precision encoder, image blurring and misalignment caused by relative motion between the workpiece and the imaging system are fundamentally suppressed. Combined with a high-performance digital flat panel detector with a spatial resolution of 128μm and a dynamic range of no less than 16 bits, the original image is ensured to clearly and completely capture the full spectrum of internal structural features from macroscopic to microscopic and from high absorption to low absorption, providing a data foundation for subsequent high-precision analysis.

[0017] 2. Constructing a multi-level image quality enhancement and feature purification chain to significantly improve the defect signal-to-noise ratio: Uniformity correction eliminates inherent system response inhomogeneity, temperature-adaptive normalization suppresses environmental fluctuations and initially distinguishes material backgrounds; on this basis, adaptive filtering based on local statistics protects the edges of subtle defects while denoising, thereby enhancing the contour contrast of defects of different sizes; this series of processes are interconnected, gradually separating, purifying, and enhancing the defect signals in the original image from complex background noise and inconsistencies, and finally obtaining a binary feature image with clear boundaries and connected regions through dual-threshold dynamic segmentation, greatly reducing the probability of subsequent false detections and false negatives.

[0018] 3. Achieving intelligent and objective defect identification and rating throughout the entire process: An innovative multi-source information fusion strategy is adopted, simultaneously inputting the original density map, normalized material map, and binary feature map into an improved deep neural network for defect classification. By integrating morphological, grayscale, and material context information, the classification accuracy of typical defects such as porosity, inclusions, and cracks is significantly improved. In the rating stage, the actual projected area of ​​the defect's connected domain is used for automatic grading according to a pre-set area-grade mapping table, eliminating the subjectivity and inconsistency of manual rating and ensuring high repeatability and traceability of the detection results. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating an industrial material testing method based on feature extraction and contrast enhancement.

[0020] Figure 2 This is a logical flowchart of structured image post-processing and defect feature extraction in an industrial material inspection method based on feature extraction and contrast enhancement.

[0021] Figure 3 This is a schematic diagram of the structure of an industrial material testing system based on feature extraction and contrast enhancement. Detailed Implementation

[0022] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention. It should be noted that relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.

[0023] Example 1 To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments.

[0024] Currently, with the continuous advancement of industrial non-destructive testing (NDT) technology, X-ray imaging-based methods for detecting defects in industrial materials play a crucial role in aerospace, energy equipment, and high-end manufacturing. Traditional steel alloy material flaw detection largely relies on manual visual interpretation or simple imaging equipment. This process lacks systematicity and standardization, making it difficult to meet the high-precision, high-efficiency, and repeatable quality control requirements of modern manufacturing. Especially in the large-scale production of tubular metal components, accurate defect identification and quantitative rating directly affect product safety and service life, placing higher demands on the automation level, image resolution capabilities, and objectivity of the inspection system. To address these technical problems, this invention proposes an industrial material inspection method based on feature extraction and contrast enhancement. By constructing a complete technology chain integrating synchronous imaging, multi-dimensional image enhancement, structured feature extraction, and intelligent quantitative rating, it achieves high-precision identification, type classification, and objective grading of internal defects in industrial materials, significantly improving the automation level and decision consistency of the inspection system. Please refer to [link / reference]. Figures 1-2 The method includes: S1. Utilizing the principle of X-ray penetration imaging, based on the differences in X-ray absorption by different materials or defects, a digital flat panel detector is used to collect the relative X-ray attenuation distribution signal after penetrating and characterizing the internal structure of the material, and generate an original digital image; the original digital image is used to reflect the density distribution characteristics of the internal structure of the material. Specifically, the X-rays employ a pulsed emission mode, requiring their exposure time to match the workpiece's moving speed. This ensures that the X-ray pulses are strictly synchronized with the workpiece's position during high-speed transport, effectively suppressing image blurring or misalignment caused by relative motion. The X-ray signal after penetrating the workpiece is received and converted into a digital signal by a digital flat panel detector. The spatial resolution of the digital flat panel detector must be matched to a high resolution sufficient to distinguish minute defects and to distinguish subtle structural changes within the material. Its dynamic range is no less than 16 bits (i.e., 65,536 gray levels), ensuring the simultaneous capture of a wide intensity range from high-absorption regions (such as high-density inclusions) to low-absorption regions (such as pores and cracks), avoiding overexposure or underexposure and fully preserving the gray-scale gradient information of defects. The digital signals output by the detector are then fused into a complete original digital image. The original digital image is stored in a 16-bit unsigned integer (range 0-65,535) matrix format, where the gray value of each pixel precisely quantifies the X-ray penetration intensity at the corresponding spatial location, directly mapping the density distribution of the material's internal three-dimensional structure on a two-dimensional projection. The original digital image fully encompasses the entire spectrum of internal features, from complete absorption (grayscale value approaching 0) to almost no attenuation (grayscale value approaching 65535), forming the original data foundation for all subsequent image processing and defect identification.

[0025] S2. Perform uniformity correction and normalization enhancement on the original digital image, construct a unified intensity reference for each processing parameter in the subsequent image processing, realize the preliminary distinction of different material regions, and generate an initial material mapping map. Based on the foregoing, the uniformity correction includes: In the absence of samples, several frames of unobstructed projection images are continuously acquired and then arithmetically averaged to obtain an empty field image, which is used to suppress the influence of random noise on the calibration reference. The actual response value of each pixel coordinate position in the empty field image is compared with the preset ideal uniform response value, and the pixel correction coefficient matrix is ​​generated by the following formula. ; In the formula, Empty field image in pixel coordinates Pixel correction coefficients at the location; The ideal uniform response value is preset, which is usually the median of the response values ​​of all pixels in the entire detection area; Empty field image in pixel coordinates The grayscale value at the location; the pixel correction coefficient matrix is ​​stored in the system's non-volatile memory and updated once before the start of each work shift to overcome response drift caused by equipment aging over time or environmental factors; The correction process uses the following formula to process the original image in real time to generate a uniformity-corrected image: ; In the formula, The original image in pixel coordinates The grayscale value at that location; To correct pixel coordinates in a uniform image The grayscale value at the specified location; the uniformity correction can significantly reduce the standard deviation of brightness of the original image across the entire field of view, and eliminate the inconsistency in image brightness and contrast caused by uneven energy distribution of the X-ray source, nonlinear response of each pixel of the detector, or gain difference.

[0026] Based on the foregoing, the normalization enhancement includes: The normalized intensity value of the uniformity-corrected image is calculated according to the following formula; ; In the formula, Empty field image in pixel coordinates The grayscale value at that location; To correct the uniformity of the image at pixel coordinates The normalized intensity value at that location; The preset bias compensation parameters are used to avoid the denominator being too small and to adapt to different imaging conditions; the normalization process can convert the absorption characteristics of different materials to X-rays into a unified intensity scale, which is convenient for identifying material differences and abnormal areas in subsequent steps. Based on the distribution characteristics of normalized intensity values, the uniformity correction image is automatically divided into different material regions. Each region is assigned a unique material identifier code, and an initial material mapping map is generated. The initial material mapping map is not only used to distinguish between material and background during subsequent defect detection, but also provides an adaptive adjustment basis for the contrast enhancement stage, thereby optimizing the contrast between defects and background in different material regions.

[0027] Furthermore, to improve the robustness of the discrimination, a temperature compensation mechanism is introduced. In this case, the bias compensation parameter is no longer a fixed value, but a function of the ambient temperature. The initial value of the bias compensation parameter is determined through calibration experiments. For different alloy materials (such as 304 stainless steel, 7075 aluminum alloy, Inconel 718 high-temperature alloy, etc.), a functional relationship between the bias compensation parameter and temperature is established. In the formula, As the reference temperature, The current ambient temperature. These are the bias compensation parameters at the reference temperature. A specific temperature sensitivity coefficient is used for the material; when the ambient temperature sensor detects fluctuations exceeding a preset threshold, the control system automatically adjusts the value of the bias compensation parameter. This mechanism ensures that the normalized intensity value remains stable under different temperature control conditions, thereby improving the accuracy and robustness of material identification.

[0028] S3. Divide the original image data into different processing domains, and adaptively modulate the image processing parameters according to the local feature attributes of each processing domain to perform differentiated enhancement processing on the image data, generating a binary feature image; including: S31. Based on the initial material mapping map, the original image data or the image data preprocessed based on the original image data is divided into different processing domains, and the image processing parameters are adaptively modulated according to the local feature attributes of each processing domain to perform differentiated enhancement processing on the image data and generate a binary feature image. S32. Based on the local contrast distribution of defects and background in different material regions, adaptively determine the gain coefficient of each scale in the multi-scale structure enhancement process, enhance the contrast between the defect structure and the background, and generate a structure-sharpened image. S33. Based on the structurally sharpened image, determine the threshold range for defect segmentation, and separate the suspected defect region from the material matrix by iterative discrimination of pixels within the region to generate a binary feature image.

[0029] Specifically, S31 includes: The initial material map is calculated within a 5×5 sliding window centered on each pixel. The local variance within the sliding window size is adaptively determined based on local statistical characteristics to characterize the noise level and texture complexity of the region. The filtering method is dynamically selected based on the numerical range of the local variance. If the local variance is less than the low threshold, it is determined to be a flat or low-noise region. Based on the local statistical features of each region, structural features are extracted to adaptively determine the sliding window size, and guided filtering or median filtering is used to denoise; while ensuring efficiency, noise is smoothed. If the local variance is greater than the high threshold, it is judged as a high noise or detailed region (such as fine cracks, pore edges). The sliding window size is adaptively determined according to the local statistical characteristics, or weighted filtering is used for noise reduction. In the weighted filtering, the weight of the neighboring pixels is dynamically allocated according to the difference between their gray values ​​and the center pixel. The smaller the difference, the higher the weight, so as to better protect the edges while achieving strong noise reduction. If the local variance is between the low threshold and the high threshold, the output results of the two filters mentioned above are interpolated and mixed to ensure a smooth transition of the processing effect and avoid artifacts. Noise suppression is performed based on the determined adaptive strategy, and a denoised digital image is generated. The adaptive strategy effectively avoids the problems of blurred details or noise residue caused by traditional single filtering, and ensures the boundary integrity of defects such as micro-cracks and pores while suppressing background noise.

[0030] Specifically, S32 includes: The denoised digital image is decomposed into a multi-level scale spatial representation, where each level represents high-frequency detail information at different spatial scales, and the lowest-scale level is the low-frequency residual image; the specific number of levels is determined by the actual detected target features.

[0031] Based on the initial material map, nonlinear enhancement processing is performed on the corresponding high-frequency detail components at each scale layer, where the enhanced high-frequency detail components are represented as follows: In the formula, For the high-frequency detail components corresponding to the scale layer, The gain coefficient is adaptively determined by the statistical characteristics of the local contrast between defects and the background within the material region where the layer at this scale is located. In this way, the boundaries of subtle defects in different material regions and at different scales are enhanced, while suppressing the excessive amplification of background structures, artifacts, and background noise. The logic for determining the gain coefficient k fully considers the physical characteristics of X-ray imaging. Because high atomic number materials (such as steel and nickel-based alloys) scatter X-rays more strongly, the contrast of their internal defects is often lower than that of low atomic number materials (such as aluminum alloys). Therefore, this system applies a stronger nonlinear gain to the high-frequency subbands in high-density regions based on the initial material mapping map. This is essentially a mathematical compensation for the physical attenuation characteristics of X-rays, which is fundamentally different from traditional global image sharpening.

[0032] Next, the high-frequency components of each layer are amplified and reconstructed with the low-frequency components of the bottom layer to generate a structure-sharpened image. If the above parameters are not modulated based on the material mapping results, in scenarios with multiple materials or varying thicknesses, the defect edges will be blurred or the background structure will be mistakenly enhanced.

[0033] Specifically, S33 includes: Calculate the global grayscale mean of the structure-sharpened image, and calculate high and low thresholds based on the statistical distribution characteristics of the global grayscale mean. Set the low threshold to 0.7 times the global grayscale mean and the high threshold to 1.3 times the global grayscale mean. In the structure-sharpened image, pixels below a low threshold are labeled as background, and pixels above a high threshold are labeled as foreground. For undetermined pixels between the low and high thresholds, iterative judgment is performed based on the categories of determined pixels in their neighborhood. If foreground pixels are in the majority in their neighborhood, they are marked as foreground; otherwise, they are marked as background. This process is iterated until all pixel categories converge, generating a binary image. This strategy effectively solves the problem of incomplete single-threshold segmentation caused by uneven gray levels inside defects. Morphological closing operations (using 3×3 square structuring elements, first dilation and then erosion) are performed on the binary image obtained from the initial segmentation to fill the small holes in the defect area caused by noise or gray-level fluctuations, smooth the defect boundary, and obtain the connected region. By applying a connected component analysis algorithm, the pixel area of ​​each independent foreground region is calculated, and isolated regions with an area smaller than a preset threshold (e.g., corresponding to an actual size of 0.05 mm²) are removed, treated as noise, and classified as background. After the above processing, the final output is a clean and connected binary feature image, in which the foreground target is a complete set of suspected defect regions, which are used for feature quantization, classification and rating in subsequent steps.

[0034] S4. Based on binary feature images, other intermediate images, and the initial material mapping map, achieve automatic defect identification, classification, quantitative rating, and final visualized output of a single inspection report, thus completing a closed loop from image processing to quality decision-making; including: A neural network model based on a multi-source image feature learning model architecture is used for defect type identification. The neural network model is pre-trained on a labeled dataset containing various typical defect morphologies. The input feature tensor of the model is multi-channel fused data, which includes: the original digital image representing physical density, the initial material mapping map representing material properties, and the binary feature image representing geometric morphology. The robustness of defect identification is improved through a multi-source information complementarity mechanism. The samples cover 6 common alloy materials and 5 typical defect morphologies, including porosity, inclusions, cracks, lack of fusion, and shrinkage porosity. The innovation of using the initial material map as an independent channel input lies in giving the neural network material perception capabilities. The network can learn that the same grayscale change may only be grain noise in aluminum alloy, while it may be porosity in cast iron. This fusion architecture, which combines prior physical knowledge (material map) with visual features (binary map), significantly reduces the false alarm rate when detecting across materials.

[0035] The model has a single-frame inference time of less than 120ms, enabling real-time online classification on industrial control computers equipped with NVIDIA Tesla T4 GPUs.

[0036] After the defect classification is completed, the pixel area of ​​each classified defect connected region is calculated based on the binary feature image. It is then converted into the actual physical area according to the system resolution (128μm / pixel) and compared with the built-in area-level mapping table to map the defect area to a defect level of 1 to 8 (or higher). The following rating criteria are only a specific configuration of this embodiment. In actual applications, the rating table can be dynamically loaded according to the GB / T or ASTM standard library. For example, if the actual physical area belongs to (0, 10 mm) 2 If it is a Class 1 defect, then it is marked as such. If the actual physical area is within (10, 30 mm) 2 If the defect is identified as a Level 2 defect, it is marked as such. If the actual physical area is within (30, 50 mm) 2 If it is a level 3 defect, it is marked as such. If the actual physical area is within (50, 100 mm) 2 If it is, it is marked as a level 4 defect; If the actual physical area is within (100, 150 mm) 2 If it is, it is marked as a level 5 defect; If the actual physical area is within (150, 225 mm) 2 If it is, it is marked as a level 6 defect; If the actual physical area is within (225, 300 mm) 2 If it is marked as a level 7 defect; If the actual physical area belongs to (300, +∞ mm) 2 If it is a defect, it is marked as a level 8 defect; This mapping relationship is set during system initialization to ensure the objectivity, consistency, and traceability of the rating criteria; Then, all the information from a single test is integrated to generate a single test report that can be archived, reviewed, and used for decision-making.

[0037] To further enhance the system's practicality and intelligence, this invention also includes a defect data traceability mechanism. The original digital images generated from each inspection, intermediate processing results (including uniformity correction images, initial material mapping maps, denoised digital images, structural sharpening images, and binary feature images), single inspection reports, and operation logs (including equipment status, environmental parameters, and operator ID) are all packaged into a single encrypted data packet. This packet is encrypted using a symmetric encryption algorithm (such as AES-256) and uploaded to the enterprise-level quality management system server via industrial Ethernet. The data retention period is no less than 5 years, and it supports multi-dimensional retrieval based on batch number, timestamp, defect type, level, operator ID, and other combined conditions, providing a solid data foundation for product quality traceability and process optimization.

[0038] This invention also includes a human-computer interaction verification interface; based on a single inspection report, the system provides a visual review interface, allowing quality inspectors to manually correct questionable defects (such as adjusting defect boundaries, changing defect types or levels). All manual correction records are meticulously documented and fed back to the neural network model training queue, forming a closed-loop learning mechanism to continuously optimize classification accuracy. This mechanism effectively balances automation efficiency with the reliability of human experience, and is a key guarantee for the long-term stable operation of the system in complex industrial environments.

[0039] Although this embodiment uses guided filtering and median filtering, Gaussian filtering, bilateral filtering, or a denoising module based on convolutional neural networks (CNN) can replace the filtering steps in this invention.

[0040] In addition, this embodiment also includes a model closed-loop learning step, which includes: receiving the manual review results of suspected defects by quality inspectors; the manual review results include defect boundaries and / or defect types and / or defect levels; associating the manual review results with the original digital image, initial material mapping map, binary feature image and single inspection report identification information to generate training samples and write them into the training queue; When the preset triggering conditions are met, the neural network model is incrementally trained or periodically trained to generate an updated model, and then switched to the online model when the preset update admission conditions are met.

[0041] Example 2 Please see Figures 2-3 This embodiment provides an industrial material inspection system based on feature extraction and contrast enhancement, which applies the industrial material inspection method based on feature extraction and contrast enhancement as described above. The system includes a data acquisition module, an image preprocessing module, a feature extraction module, a quantitative rating module, a defect tracing module, and a human-computer interaction module. The data acquisition module, based on the differences in X-ray absorption by different materials or defects, acquires the relative X-ray attenuation distribution signal after penetrating and characterizing the internal structure of the material using a digital flat panel detector, and generates the original digital image. The image preprocessing module is used to perform uniformity correction and normalization enhancement on the original digital image, construct a unified intensity reference for each processing parameter in the subsequent image processing, realize the preliminary distinction of different material regions, and generate an initial material mapping map. The feature extraction module is used to divide the original image data into different processing domains, and adaptively modulate the image processing parameters according to the local feature attributes of each processing domain to perform differentiated enhancement processing on the image data and generate a binary feature image. The quantitative rating module, based on binary feature images, other intermediate images and initial material mapping maps, realizes automatic identification, classification and quantitative rating of defects, and generates a single inspection report. The defect traceability module is used to package the original digital images generated by the detection, intermediate processing results, single detection reports and operation logs into an encrypted data package, and upload it to the system server using a symmetric encryption algorithm (such as AES-256) to provide a data foundation for product quality traceability and process optimization. The human-computer interaction module provides quality inspectors with visual review and manual correction, and feeds back to the neural network model training queue to form a closed-loop learning mechanism to continuously optimize classification accuracy. The closed-loop learning module is used to obtain the results of manual review and to schedule training tasks to generate updated models when preset trigger conditions are met.

[0042] Preferably, the preset triggering conditions include the cumulative number of samples in the training queue reaching N and / or reaching a preset time window, where N is an integer and the preset time window is 1-30 days; the preset update admission conditions include the updated model improving the classification accuracy by 0.5%-5% and / or reducing the false positive rate by 1%-20% compared to the currently online model, and the single-frame inference latency not exceeding 200ms.

[0043] Although this embodiment uses a digital flat panel detector, those skilled in the art should understand that other X-ray imaging devices such as linear array detectors and photon counting detectors can also be used in this invention.

[0044] All content not described in detail in this specification is prior art known to those skilled in the art, and the model parameters of each electrical appliance are not specifically limited; conventional equipment can be used. Electrical control components not mentioned in this technical solution are not shown in the figures because they are prior art, and will not be described further here.

[0045] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention. The present invention is not only applicable to metallic materials, but also to the detection of internal defects in composite materials, industrial ceramics, or high-density plastics; the material mapping principle of the present invention is equally applicable.

Claims

1. A method for detecting industrial materials based on feature extraction and contrast enhancement, characterized in that: include: S1. Based on the differences in X-ray absorption by different materials or defects, the relative X-ray attenuation distribution signal after penetrating and characterizing the internal structure of the material is acquired by a digital flat panel detector, and the original digital image is generated. S2. Perform uniformity correction and normalization enhancement on the original digital image, construct a unified intensity reference for each processing parameter in the subsequent image processing, realize the preliminary distinction of different material regions, and generate an initial material mapping map. S3. Divide the original image data into different processing domains, and adaptively modulate the image processing parameters according to the local feature attributes of each processing domain to perform differentiated enhancement processing on the image data and generate a binary feature image. S4. Based on binary feature images, other intermediate images, and initial material mapping maps, achieve automatic defect identification, classification, quantitative rating, and final visualization output of a single inspection report; Wherein, S3 includes: S31. Based on the local statistical features of the corresponding material region in the initial material mapping map, the filter window size and pixel weight distribution are adaptively determined to suppress random noise in the image while preserving the details of the defect edges, thereby generating a denoised digital image. S32. Based on the local contrast distribution of defects and background in different material regions, adaptively determine the gain coefficient of each scale in the multi-scale structure enhancement process, enhance the contrast between the defect structure and the background, and generate a structure-sharpened image. S33. Based on the structurally sharpened image, determine the threshold range for defect segmentation, and separate the suspected defect region from the material matrix by iterative discrimination of pixels within the region to generate a binary feature image.

2. The industrial material detection method based on feature extraction and contrast enhancement according to claim 1, characterized in that: The uniformity correction includes: In the absence of samples, several frames of unobstructed projection images were continuously acquired, and the empty field image was obtained by statistical averaging. The actual response value of each pixel coordinate position in the empty field image is compared with the preset ideal uniform response value pixel by pixel, and a pixel correction coefficient matrix is ​​generated; the calculation formula of the pixel correction coefficient matrix is: ; In the formula, Empty field image in pixel coordinates Pixel correction coefficients at the location; The ideal uniform response value is preset, which is usually the median of the response values ​​of all pixels in the entire detection area; Empty field image in pixel coordinates The grayscale value at the specified location; the pixel correction coefficient matrix is ​​stored in the system's non-volatile memory and updated once before the start of each work shift; The original image is corrected to generate a uniformity-corrected image; the calculation formula for the correction process is as follows: ; In the formula, The original image in pixel coordinates The grayscale value at that location; To correct pixel coordinates in a uniform image The grayscale value at that location.

3. The industrial material detection method based on feature extraction and contrast enhancement according to claim 2, characterized in that: The normalization enhancement includes: The formula for calculating the normalized intensity value of the uniformity-corrected image is as follows: ; In the formula, Empty field image in pixel coordinates The grayscale value at that location; To correct the uniformity of the image at pixel coordinates The normalized intensity value at that location; The preset bias compensation parameters are used to avoid the denominator being too small and to adapt to different imaging conditions; the normalization process can convert the absorption characteristics of different materials to X-rays into a unified intensity scale. Based on the distribution characteristics of the normalized intensity values, the uniformity correction image is automatically divided into different material regions. Each region is assigned a unique material identifier code, and an initial material mapping map is generated.

4. The industrial material detection method based on feature extraction and contrast enhancement according to claim 3, characterized in that: S2 also includes a temperature compensation mechanism: At this point, the bias compensation parameter is no longer a fixed value, but a function of the ambient temperature; the initial value of the bias compensation parameter is determined through calibration experiments, and a functional relationship between the bias compensation parameter and temperature is established for different alloy materials. In the formula, As the reference temperature, The current ambient temperature. These are the bias compensation parameters at the reference temperature. It is a temperature sensitivity coefficient specific to the material; when the ambient temperature sensor detects fluctuations exceeding the preset threshold of the ambient temperature, the control system automatically adjusts the value of the bias compensation parameter.

5. The industrial material detection method based on feature extraction and contrast enhancement according to claim 3, characterized in that: S31 includes: The initial material map is calculated within a sliding window centered on each pixel, and the local variance within the sliding window size is adaptively determined based on local statistical characteristics to characterize the noise level and texture complexity within the sliding window size. The filtering method is then dynamically selected based on the numerical range of the local variance. If the local variance is less than the low threshold, it is determined to be a flat or low-noise region. Based on the local statistical features of each region, structural features are extracted to adaptively determine the sliding window size, and guided filtering or median filtering is used for noise reduction. If the local variance is greater than the high threshold, it is judged as a high noise or high detail region. The sliding window size is adaptively determined according to the local statistical characteristics, or weighted filtering is used for noise reduction. In the weighted filtering, the weight of the neighboring pixels is dynamically allocated according to the difference between their gray values ​​and the center pixel. The smaller the difference, the higher the weight. If the local variance is between the low threshold and the high threshold, then the output of the above filter is interpolated and mixed. Noise suppression is performed based on the determined adaptive strategy, and a denoised digital image is generated.

6. The industrial material detection method based on feature extraction and contrast enhancement according to claim 4, characterized in that: S32 includes: The denoised digital image is decomposed into a multi-level scale spatial representation, with each layer representing high-frequency detail information at different spatial scales, and the lowest scale layer being the low-frequency residual image. Nonlinear enhancement processing is performed on the high-frequency detail components of each layer, and the enhanced high-frequency detail components are represented as follows: In the formula, For the high-frequency detail components corresponding to the scale layer, The gain coefficient is adaptively determined by the statistical characteristics of the local contrast between the defect and the background within the material region where the layer at this scale is located; The high-frequency components amplified from each layer are reconstructed with the low-frequency components from the bottom layer to generate a structure-sharpened image.

7. The industrial material detection method based on feature extraction and contrast enhancement according to claim 6, characterized in that: S33 includes: Calculate the global grayscale mean of the structure-sharpened image, and set a low threshold and a high threshold; In the structure-sharpened image, pixels below a low threshold are labeled as background, and pixels above a high threshold are labeled as foreground. For undetermined pixels between the low and high thresholds, iterative judgment is performed based on the categories of the determined pixels in their neighborhood; if foreground pixels are in the majority in their neighborhood, they are marked as foreground, otherwise they are marked as background. This process is repeated until all pixel categories converge, generating a binary image. Morphological closing operations are performed on the binary image obtained from the initial segmentation to fill the small holes in the defect area caused by noise or gray-level fluctuations, smooth the defect boundary, and obtain a connected region. By applying a connected component analysis algorithm, the pixel area of ​​each independent foreground region is calculated, and isolated regions with an area smaller than a preset threshold are removed, treated as noise, and classified as background. After the above processing, a connected binary feature image is output, in which the foreground target is a complete set of suspected defect regions.

8. The industrial material detection method based on feature extraction and contrast enhancement according to claim 7, characterized in that: The S4 includes: A neural network model based on a multi-source image feature learning model architecture is used for defect type identification. The neural network model is pre-trained on a labeled dataset containing various typical defect morphologies. The input feature tensor of the model is multi-channel fused data, which includes: the original digital image representing physical density, the initial material mapping map representing material properties, and the binary feature image representing geometric morphology. The robustness of defect identification is improved through a multi-source information complementarity mechanism. The samples cover 6 common alloy materials and 5 typical defect morphologies, including porosity, inclusions, cracks, lack of fusion, and shrinkage porosity. After completing the defect classification, the pixel area of ​​each classified defect connected region is calculated based on the binary feature image, converted into the actual physical area according to the system resolution, and the generated actual physical area is compared with the built-in area-level mapping table to map the defect area to a defect level of 1 to 8. Then, all the information from a single test is integrated to generate a single test report that can be archived, reviewed, and used for decision-making.

9. The industrial material detection method based on feature extraction and contrast enhancement according to claim 1, characterized in that, It also includes a model closed-loop learning step, which includes: receiving the manual review results of suspected defects by quality inspectors; the manual review results include defect boundaries and / or defect types and / or defect levels; associating the manual review results with the original digital image, initial material mapping map, binary feature image and single inspection report identification information to generate training samples and write them into the training queue; When the preset triggering conditions are met, the neural network model is incrementally trained or periodically trained to generate an updated model, and then switched to the online model when the preset update admission conditions are met.

10. An industrial material inspection system based on feature extraction and contrast enhancement, characterized in that: The system, which is applied to the industrial material testing method based on feature extraction and contrast enhancement as described in any one of claims 1-9, includes a data acquisition module, an image preprocessing module, a feature extraction module, a quantitative rating module, a defect tracing module, a human-computer interaction module, and a closed-loop learning module. The data acquisition module, based on the differences in X-ray absorption by different materials or defects, acquires the relative X-ray attenuation distribution signal after penetrating and characterizing the internal structure of the material using a digital flat panel detector, and generates the original digital image. The image preprocessing module is used to perform uniformity correction and normalization enhancement on the original digital image, construct a unified intensity reference for each processing parameter in the subsequent image processing, realize the preliminary distinction of different material regions, and generate an initial material mapping map. The feature extraction module is used to divide the original image data into different processing domains, and adaptively modulate the image processing parameters according to the local feature attributes of each processing domain to perform differentiated enhancement processing on the image data and generate a binary feature image. The quantitative rating module automatically identifies, classifies, and quantifies defects based on binary feature images, other intermediate images, and the initial material mapping map, generating a single inspection report. The defect traceability module is used to package the original digital images generated by the detection, intermediate processing results, single detection reports and operation logs into an encrypted data package, encrypt it with a symmetric encryption algorithm, and upload it to the system server to provide a data foundation for product quality traceability and process optimization. The human-computer interaction module provides quality inspectors with visual review and manual correction, and feeds back to the neural network model training queue to form a closed-loop learning mechanism to continuously optimize classification accuracy. The closed-loop learning module is used to obtain the results of manual review and to schedule training tasks to generate updated models when preset trigger conditions are met.