Locomotive detection image filtering processing method and system

By employing structure-guided regionalization and motion-aware local sharpening strategies, the interference problems of reflection, complex backgrounds, and slight motion blur in locomotive inspection are resolved, generating high-quality images and improving the accuracy and robustness of the inspection system.

CN121937441APending Publication Date: 2026-04-28GRAND & STABLE RAILWAY EQUIP CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GRAND & STABLE RAILWAY EQUIP CO LTD
Filing Date
2026-02-24
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing technologies for locomotive inspection suffer from problems such as loss of detail in reflective areas, false edges caused by complex backgrounds, and recognition difficulties due to slight motion blur, making it difficult to coordinate and cope with multiple interferences.

Method used

A collaborative strategy of structure-guided regionalization, motion-aware local sharpening, and quality feedback closed-loop optimization is adopted to generate high-quality locomotive inspection images through region division, customized reflection suppression, edge detection, adaptive smoothing filtering, and directional sharpening.

Benefits of technology

It significantly improves the clarity and detail of images of key locomotive components, reduces false detection and false negative rates, enhances the accuracy and robustness of the detection system, and adapts to changes in different environments and conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121937441A_ABST
    Figure CN121937441A_ABST
Patent Text Reader

Abstract

The invention discloses a locomotive detection image filtering processing method and system, and relates to the technical field of computer vision and image process.The locomotive detection image filtering processing method has the advantages that a multi-stage cooperative processing framework is constructed, structural priori knowledge is introduced for intelligent guidance, and compared with simple superposition of a traditional method, various noises are effectively suppressed, and meanwhile, the detection efficiency is improved. Important information such as micro textures and structure edges of key components is protected and enhanced, and the overall definition and detail integrity of the image are remarkably improved; according to the invention, by providing high-quality and low-noise image data, a solid and reliable foundation is provided for a subsequent automatic detection task; according to the method, a closed-loop optimization mechanism of quality evaluation and parameter dynamic feedback is introduced, so that the processing method can automatically adapt to different detection scenes, the processing effect can be self-diagnosed, internal parameters can be dynamically adjusted, and the stability and consistency of output image quality are ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and image processing technology, specifically relating to a method and system for filtering locomotive inspection images, which aims to improve the image quality of key locomotive components. Background Technology

[0002] As the core equipment of rail transit, the safe operation of locomotives is of paramount importance. Utilizing machine vision technology for automated, non-contact locomotive inspection is a crucial means to ensure safety and improve maintenance efficiency. This technology involves deploying industrial cameras alongside the track to capture images of locomotives in operation or at rest. Image processing and analysis algorithms then monitor the condition and identify defects in key components such as pantographs, bogies, wheels, and couplers. Image filtering, as the initial stage of the entire inspection process, directly determines the success or failure of subsequent feature extraction and intelligent recognition.

[0003] In existing technologies, filtering of industrial inspection images typically employs a range of general image processing techniques. For example, to improve the overall image quality, global enhancement methods such as histogram equalization or contrast stretching are used. To suppress random noise, smoothing algorithms such as Gaussian filtering and median filtering are applied. To extract target contours, edge detection algorithms such as the Sobel operator or Canny operator are used. In certain specific scenarios, de-reflection modules or motion deblurring algorithms may be applied individually to address a single problem.

[0004] However, in the specific application scenario of locomotive inspection, the aforementioned existing technologies have significant technical shortcomings. The numerous metal surfaces of the locomotive body are highly reflective under external light, and common enhancement methods often result in the complete loss of detail in reflective areas. Simultaneously, the locomotive's complex structure, with components surrounded by cables, pipes, and supporting structures, causes standard edge detection algorithms to generate numerous false edges in these background areas, severely interfering with the accurate segmentation of target components. Furthermore, even at low speeds, the relative motion between the locomotive and the inspection equipment can cause slight image blurring, making the identification of early defects such as fine cracks extremely difficult. These technologies often operate in isolation, making it difficult to coordinate and address multiple simultaneous interferences.

[0005] To address the aforementioned issues, this invention provides a locomotive inspection image filtering method. It employs a collaborative strategy of structure-guided regional processing, motion-sensing local sharpening, and quality feedback closed-loop optimization, which can effectively suppress various complex interferences while significantly improving the clarity and detail integrity of images of key components. Summary of the Invention

[0006] The purpose of this invention is to provide a method and system for filtering locomotive inspection images, which solves the problems existing in the background art.

[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: The first aspect of the present invention provides a locomotive inspection image filtering processing method, comprising: S1, acquiring an original image of locomotive inspection, dividing the original image into multiple illumination characteristic sub-regions according to the locomotive structural features and reflection patterns, generating region division information, wherein the region division information includes different illumination characteristic sub-regions, and the illumination characteristic sub-regions include strong reflective sub-regions and texture-rich sub-regions.

[0008] S2. Based on the region division information, perform customized reflection suppression operation on each sub-region to obtain a preliminary processed image. Use a preset locomotive component geometric model to extract structural features from the preliminary processed image and generate a structural saliency map.

[0009] S3. Based on the structural saliency map, dynamically adjust the edge detection parameters, perform multi-scale edge detection on the preliminary processed image, generate a refined edge map, and fuse the local texture statistical features of the refined edge map and the preliminary processed image to identify background interference areas.

[0010] S4. Perform adaptive smoothing filtering based on the texture clutter level of the background interference area to obtain a background-suppressed image. Analyze the edge sharpness of each region in the refined edge image and estimate the local motion blur parameters.

[0011] S5. Based on the local motion blur parameters, perform adaptive sharpening processing with directional constraints on the background suppression image to generate an optimized image.

[0012] S6. Calculate the overall sharpness index of the optimized image in the key component area, and dynamically adjust the reflection suppression intensity or background smoothing intensity parameter of the corresponding low-quality sub-region.

[0013] A second aspect of the present invention provides a system for performing the locomotive inspection image filtering processing method described in the present invention, including an image acquisition module configured to acquire original locomotive inspection images.

[0014] The region analysis module is configured to perform region division and reflection suppression operations.

[0015] The structure guidance module is configured to generate and apply structure saliency maps.

[0016] The background stripping module is configured to perform background interference identification and adaptive smoothing.

[0017] The motion compensation module is configured to perform local motion estimation and directional sharpening.

[0018] The quality assessment feedback module is configured to calculate the overall sharpness index and trigger parameter adjustments.

[0019] The dynamic parameter adjustment module responds to the output of the quality assessment feedback module and optimizes the processing parameters of the region analysis module and the background stripping module in real time.

[0020] The beneficial effects of the present invention are as follows: (1) The present invention constructs a multi-stage collaborative processing framework and introduces prior structural knowledge for intelligent guidance, collaboratively processing various composite interferences such as strong metal reflection, complex background and slight motion blur. Compared with the simple superposition of traditional methods, the present invention achieves effective suppression of various noises while protecting and enhancing important information such as the micro-texture and structural edges of key components, significantly improving the overall clarity and detail integrity of the image.

[0021] (2) This invention provides a solid and reliable foundation for subsequent automated inspection tasks by providing high-quality, low-noise image data. The clear images enable machine vision-based algorithms for defect identification, size measurement, and condition assessment to operate more accurately, effectively reducing the false detection rate and false negative rate of the system, thereby comprehensively improving the accuracy and reliability of the locomotive automated inspection system.

[0022] (3) This invention introduces a closed-loop optimization mechanism of quality assessment and dynamic parameter feedback, enabling the processing method to automatically adapt to different detection scenarios. Faced with different locomotive models, changing lighting conditions, or different degrees of contamination, this invention can self-diagnose the processing effect and dynamically adjust internal parameters to ensure the stability and consistency of the output image quality, significantly enhancing the robustness and environmental adaptability of the method. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a schematic diagram of the implementation steps of the method of the present invention.

[0025] Figure 2 Flowchart for image acquisition.

[0026] Figure 3 This is a flowchart for area analysis and reflection suppression.

[0027] Figure 4 Generate a flowchart for the structural saliency map.

[0028] Figure 5 This is a flowchart of background stripping and edge refining.

[0029] Figure 6 This is a flowchart of motion blur estimation and adaptive sharpening.

[0030] Figure 7 This is a schematic diagram of the system modules of the present invention. Detailed Implementation

[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] Reference Figure 1 As shown, the present invention provides a method for filtering and processing locomotive inspection images, including: S1, acquiring an original image of locomotive inspection, dividing the original image into multiple illumination characteristic sub-regions according to the locomotive structural features and reflection patterns, generating region division information, wherein the region division information includes different illumination characteristic sub-regions, and the illumination characteristic sub-regions include strong reflective sub-regions and texture-rich sub-regions.

[0033] It should be noted that the process of dividing the original image into multiple illumination characteristic sub-regions based on the locomotive's structural features and reflection patterns, and generating region division information, specifically includes: A pre-set locomotive component structure model library is invoked. This library stores the geometric features and positional patterns of key components for different locomotive models, thereby delineating the range of each structural feature from the original image.

[0034] Brightness distribution analysis is performed on the original image to capture the reflective characteristics of the metal parts, thereby identifying the reflective patterns of each structural feature range in the original image. The existing technology for brightness distribution analysis is relatively mature and will not be elaborated here.

[0035] Areas whose structural features are located as metal parts and whose reflection mode is localized highlighting and loss of detail are defined as strongly reflective sub-regions, while areas whose structural features are located as key components and whose reflection mode is uniform brightness and discernible texture are defined as texture-rich sub-regions.

[0036] S2. Based on the region division information, perform customized reflection suppression operations on each sub-region, bind the above two targeted processing operations with the region division information, integrate the processing results of all sub-regions, and generate a complete preliminary processed image, which is the preliminary processed image. Use the preset locomotive component geometric model to extract structural features from the preliminary processed image and generate a structural saliency map.

[0037] In a specific embodiment of the present invention, performing customized reflection suppression operation includes: for strongly reflective sub-regions, reflection suppression is performed by combining polarization characteristic analysis or multi-scale brightness remapping, the multi-scale brightness remapping process being described by the following formula:

[0038] in, The preliminary processed image obtained from the calculation is in coordinates Pixel value at that location, It is the pixel intensity value at the corresponding coordinates obtained from the strongly reflective sub-region of the original image. This represents the i-th Gaussian blur kernel with different scale parameters. It estimates the illumination components at different scales by smoothing the original image to different degrees. The symbol * denotes convolution operation. ε is the weight coefficient for the i-th scale, and the sum of all weight coefficients is 1. By adjusting the weights at each scale, the dynamic range compression and color fidelity of the image are balanced. ε is a very small positive number used to avoid performing logarithmic operations on pixels with zero values. Through multi-scale processing, large areas of strong reflections can be effectively suppressed while preserving the detail information at the edges of reflective areas.

[0039] For example, suppose that in the original image, there is a highly reflective area on the pantograph bracket of the locomotive: Original state: The brightness of the reflective area is extremely high, that is, the pixel value is 200, the pixel value of the surrounding normal area is 80, and the small cracks on the edge of the bracket, such as the pixel value of 70-90, are covered by the reflection and cannot be detected.

[0040] Multi-scale brightness remapping processing is adopted: Two blur kernels, 3*3 and 7*7, are used to obtain two blur images.

[0041] Calculate the logarithmic difference: primitive logarithm: .

[0042] 3x3 fuzzy graph logarithm: .

[0043] Logarithm of a 7x7 fuzzy image: log(190+0.001)≈5.247.

[0044] The differences were 0.105 and 0.051, respectively.

[0045] Weighted summation, such as a 3x3 matrix with a weight of 0.6 and a 7x7 matrix with a weight of 0.4, yields 0.105*0.6 + 0.051*0.4 ≈ 0.0834. Reverse calculation yields the processed brightness ≈ .

[0046] Post-processing effect: The brightness of the reflective area decreased from 200 to 180, the difference with the surrounding normal area was reduced, the small cracks that were originally covered by reflection were clearly visible, and the details of the bracket edge were not lost.

[0047] In another embodiment, in a system equipped with polarization imaging hardware, polarization light characteristic analysis is used to calculate the diffuse reflection component of the acquired image at different polarization angles, thereby directly separating and removing specular reflection light to achieve the purpose of reflection suppression.

[0048] For example, suppose that when photographing a locomotive wheel hub, the camera takes three images of the hub at polarization angles of 0, 90, and 180 degrees. The algorithm analyzes the brightness distribution of the three images: specular reflection is brightest at a polarization angle of 0 degrees, with a pixel value of 220, and darkest at a polarization angle of 90 degrees, with a pixel value of 100. Diffuse reflection has a stable brightness of 80 at all three angles. The diffuse reflection component is then calculated, and the part with the most stable brightness among the three hub images, i.e., 80, is taken. The specular reflection part that varies with the polarization angle is removed, i.e., 220-80=140. After processing, the glaring reflection on the hub surface, i.e., 140, is completely removed, and the tiny wear marks on the hub are clearly visible.

[0049] For textured sub-regions, to prevent details from being smoothed or over-enhanced during processing, local contrast constraints are used to protect detail features. Specifically, a local neighborhood is defined centered on a pixel, and a gray-level histogram within the neighborhood is calculated. Pixel frequencies exceeding a preset contrast threshold in the gray-level histogram are cropped, and the cropped portions are evenly redistributed to other gray levels in the histogram. Based on the constrained and redistributed local histogram, the gray value of the central pixel is remapped. This process ensures that while enhancing local contrast, artifacts are not generated due to excessive amplification of noise or small high-frequency signals, thus accurately protecting key detail features such as welds, rivets, and minor wear marks.

[0050] The reflection suppression operation is tied to the illumination characteristics of the sub-region.

[0051] The aforementioned method, through refined region division of locomotive images and the application of customized reflection suppression and detail preservation strategies to different regions, avoids the drawback of traditional global filtering methods that inevitably damage details in non-reflective areas when suppressing strong reflections. It also solves the problem of amplifying reflection noise when only enhancing details. This differentiated processing achieves a synergistic effect between reflection suppression and detail preservation. That is, while effectively eliminating high-brightness glare interference from metal surfaces, it maximizes the preservation of the microscopic texture and structural edge information of key components. This results in a significant improvement in both the overall visual quality and information integrity of the final pre-processed image, laying a solid foundation for subsequent more accurate structural analysis and defect identification.

[0052] S3. Based on the structural saliency map, dynamically adjust the edge detection parameters, perform multi-scale edge detection on the preliminary processed image, generate a refined edge map, and fuse the local texture statistical features of the refined edge map and the preliminary processed image to identify background interference areas.

[0053] In a specific embodiment of the present invention, the dynamic adjustment of edge detection parameters includes: in the highly saliency region marked by the structural saliency map, edge extraction is performed using a preset first-scale gradient threshold and a preset first-size filter kernel.

[0054] In low saliency regions, a preset second-scale gradient threshold and a preset second-size filter kernel are used to suppress background edges, wherein the first-scale gradient threshold is smaller than the second-scale gradient threshold, and the first-size filter kernel is smaller than the second-size filter kernel.

[0055] It should be noted that the scale gradient threshold and the size filter kernel are the core parameters of edge detection. The scale gradient threshold specifically determines the magnitude of brightness change that constitutes an edge. The lower the scale gradient threshold, the easier it is to detect weak edges. The size filter kernel specifically determines the smoothness before edge detection. The smaller the size filter kernel, the more details are preserved, and the larger the kernel, the better noise is suppressed.

[0056] It should be noted that the structural saliency map is a mapping. The value of each pixel in the structural saliency map represents the probability or confidence that the position belongs to a key locomotive component. The specific generation method is as follows: according to the preset saliency threshold, the structural saliency map is divided into high saliency region and low saliency region, and two corresponding binary masks are generated.

[0057] For highly saliency regions—those marked by the structural saliency map as potentially containing critical components—the goal of edge detection is to capture as much detail as possible. Therefore, in highly saliency regions, a fine-scale parameter is employed. Specifically, the Gaussian smoothing kernel size of the Canny operator is set to a small value, i.e., a preset first-size filter kernel, such as 3x3, to minimize the smoothing effect on the original edges. Simultaneously, a low gradient threshold is set, i.e., a preset first-scale gradient threshold, so that even weak edges caused by tiny cracks or slight wear can be detected.

[0058] For low-saliency regions, i.e., background or non-critical structural areas, the goal of edge detection is to suppress noise and cluttered textures, avoiding the generation of false edges. Therefore, coarse-scale parameters are used in low-saliency regions. Specifically, the Gaussian smoothing kernel size is set to a large value, i.e., a preset second-size filter kernel, such as 7x7 or higher, to effectively smooth out background textures and random noise. At the same time, a high gradient threshold is set, i.e., a preset second-scale gradient threshold, to ensure that only sufficiently strong and well-defined structural edges are preserved. The edge detection results obtained after processing the two regions separately are merged to generate a complete and refined edge map.

[0059] The method described above utilizes structural saliency maps as prior knowledge to achieve spatially adaptive parameterized control of the edge detection process, resolving the inherent contradiction between sensitivity and robustness in traditional single-parameter edge detection algorithms. In high-value critical component regions, it achieves high-precision detail capture, ensuring the integrity of edges with minute defects. In complex background regions, it effectively suppresses noise and irrelevant texture interference, significantly reducing the generation of false edges. This collaborative processing approach results in a refined edge map that is both clean and information-rich, accurately distinguishing the target structure from the background, providing high-quality and reliable input for subsequent image analysis tasks.

[0060] In a specific embodiment of the present invention, the identification of background interference regions specifically includes: Specifically, this step is based on the preliminary processed image and structural saliency map generated in the previous steps, and aims to perform deeper semantic segmentation of the image content in order to identify background interference regions that require special processing and key regions that require special protection.

[0061] The calculation of the local texture entropy map for the pre-processed image is as follows: This calculation is performed at each pixel of the image. A neighborhood window is taken centered on a certain pixel, and the gray level distribution of all pixels within the window is statistically analyzed to form a local gray level histogram. The local texture entropy value is then calculated based on this histogram, and the formula can be expressed as:

[0062] Here, E is the local texture entropy value of the center pixel, representing the degree of texture complexity or disorder in that local region. It is the probability of gray level i appearing within the neighborhood window, which is obtained by dividing the number of pixels of gray level i by the total number of pixels in the window.

[0063] It should be noted that the local texture entropy value is a value calculated based on the grayscale distribution of the pixel neighborhood. High values ​​typically correspond to complex, disordered textures, such as cable bundles or ballast. Low values ​​correspond to smooth, uniform areas, such as the smooth metal surface of a locomotive.

[0064] After obtaining the local texture entropy map, a low-saliency region mask generated by the structure saliency map is used to filter out all pixels belonging to the background. For all background pixels, their local texture entropy values ​​are compared with a preset high entropy threshold. If the entropy value of a background pixel is higher than this threshold, it is marked as a high-interference background area. Using a high-saliency region mask, all pixels belonging to key components are filtered out. For the pixels of these key components, their local texture entropy values ​​are compared with a preset low entropy threshold. If the entropy value of a component pixel is lower than this threshold, it is marked as a protected area.

[0065] It should be noted that the refined edge map generated in step S3 is essentially an optimization of the preliminary edge detection results. In other words, the core information of the refined edge map, namely edge features, is indirectly incorporated into the structural saliency map mentioned above.

[0066] The aforementioned method, by fusing prior structural information and local texture statistical characteristics, achieves refined classification of image regions, surpassing the simple target-background dichotomy. It accurately identifies cluttered areas in the background requiring strong smoothing (high-interference background areas) and smooth surfaces on target components that require no loss of detail (protected areas). This collaborative analysis makes subsequent filtering operations more targeted, effectively suppressing genuine noise sources while precisely protecting critical information. It avoids the information loss or noise residue caused by the one-size-fits-all approach of traditional methods, significantly improving the intelligence level and final quality of image processing.

[0067] S4. Perform adaptive smoothing filtering based on the texture clutter level of the background interference area to obtain a background-suppressed image. Analyze the edge sharpness of each region in the refined edge image and estimate the local motion blur parameters.

[0068] In a specific embodiment of the present invention, estimating the local motion blur parameters includes: specifically, this step aims to estimate the local motion blur parameters caused by slight locomotive movement or camera vibration from the image, with the core input being the refined edge map generated in the previous step. This refined edge map, due to its low background noise and clear target edges, provides a high-quality data foundation for blur analysis.

[0069] The first step is to calculate the edge blur index to determine the presence of blur. This process involves dividing the refined edge map into several local regions. Within each local region, the gradient magnitude distribution of edge pixels belonging to that region is analyzed; these edge pixels are specifically those marked by an edge detection algorithm. For sharp edges, the gradient magnitude is typically high and concentrated. For blurred edges, the gradient magnitude decreases and diffuses into low-value areas. Therefore, the edge blur index can be defined as the proportion of edge pixels in that region whose gradient magnitude is lower than a preset threshold. When the calculated edge blur index exceeds the preset threshold, it is determined that there is significant motion blur in that local region.

[0070] The second step involves estimating the local motion direction within the identified blurred region based on the edge direction distribution. A typical characteristic of motion blur is its selective weakening of edges perpendicular to the motion direction, while having less impact on edges parallel to the motion direction. Therefore, by analyzing the orientation histogram of all edge pixels within this locally blurred region, it can be observed that the edge response is significantly weakened at angles perpendicular to the motion direction. Consequently, the direction with the weakest histogram response or the lowest point is identified as the local motion direction.

[0071] The third step involves determining the blur level parameter by combining the change in edge width, as the degree of blur is directly reflected in the edge widening effect. After determining the direction of motion, edge segments perpendicular to the direction of motion are selected, and their gradient profiles are analyzed. The edge width can be quantified by measuring the full width at half maximum (FWHM) of the gradient profile function or other relevant width metrics. This width is compared with the baseline edge width measured in the clear region, and the increment or ratio can be used as the blur level parameter for that region. The clear region is defined as the region without blur, and this parameter is directly related to the point spread function length of motion blur. The motion direction and blur level parameter of each blurred region are integrated to generate a local motion blur parameter map describing the blur state of the entire image.

[0072] The aforementioned method utilizes high-quality refined edge maps as the basis for analysis, achieving localized, multi-dimensional motion blur parameter estimation. This overcomes the limitations of global blur models in adapting to complex scenes, accurately identifying the blur state of different regions in the image and quantifying its direction and degree. This analysis based on edge physical characteristics ensures that the blur estimation is both accurate and physically meaningful. This collaborative process, using the clear edge information obtained from preprocessing to guide subsequent blur parameter estimation, ensures the accuracy of the estimation and provides precise guiding parameters for the next step of targeted, directionally constrained adaptive sharpening processing. This is a crucial prerequisite for achieving high-fidelity image restoration.

[0073] S5. Based on the local motion blur parameters, perform adaptive sharpening processing with directional constraints on the background suppression image to generate an optimized image.

[0074] In a specific embodiment of the present invention, the adaptive sharpening process of the directional constraint includes: applying a high-intensity sharpening kernel along the direction perpendicular to the local motion in the motion blur region.

[0075] The core of this processing is the application of an improved desharpening mask technique, whose sharpening intensity and direction are dynamically adjusted based on the motion blur parameters of each pixel or local region. Its general processing flow can be represented by the following formula:

[0076] in, The output optimized image in coordinates Pixel value at that location, It is the pixel value of the input background suppression image at the corresponding coordinates. It is a spatially variable sharpening intensity factor. In coordinates The high-frequency detail components of the image are calculated at this location.

[0077] The innovation of this method lies in the sharpening intensity factor. and high-frequency detail components Adaptive generation.

[0078] For pixels identified as motion-blurred regions, their high-frequency detail components The local motion direction information is extracted using a directionally constrained high-pass filter. This filter's kernel is a high-intensity sharpening kernel, its shape and coefficient distribution designed to have the strongest response perpendicular to the local motion direction and the weakest response parallel to the motion direction. The sharpening operation is forcibly applied perpendicular to the edges stretched by the motion blur, thus most effectively restoring their sharpness. The local motion direction information here is directly derived from the input local motion blur parameters.

[0079] Sharpening Intensity Factor The value is positively correlated with the input fuzziness parameter and is increased according to a preset increase ratio. That is, within a certain region, the larger the estimated fuzziness parameter, the greater the corresponding... The larger the value, the stronger the sharpening effect will be to compensate for more severe blurring.

[0080] In areas with clear sharpness, a standard sharpening kernel is used for slight enhancement.

[0081] For pixels identified as sharp areas, the standard processing flow, namely the high-frequency detail component, is applied. Extracted using a standard, isotropic Laplacian kernel or a similar standard sharpening kernel, and the sharpening intensity factor... The data is set to a fixed value preset in the data warehouse. This fixed value is relatively small, allowing for a slight enhancement of sharp areas to improve the overall visual effect. The processing results from all areas are then integrated to generate the final optimized image.

[0082] The sharpening factor is specifically determined based on the preset enhancement ratio of the sharpening intensity factor and the blur level parameter defined in the data warehouse. The sharpening intensity and the blur level parameter are positively correlated.

[0083] The method described above achieves precise targeted repair of motion blur by tightly coupling the sharpening operation with previously accurately estimated local motion blur parameters. In severely blurred areas, strong and correctly oriented sharpening effectively restores key structural details obscured by the blur. In clear areas, only gentle enhancement is performed to avoid image artifacts such as ringing and oversharpening. This synergistic effect—using the accurately diagnosed blur parameters from the previous step to guide the precise treatment in the subsequent directional sharpening—ensures that the final optimized image output restores blurred details while maintaining a high degree of naturalness and fidelity, far surpassing the performance of global or non-adaptive sharpening algorithms.

[0084] In a specific embodiment of the present invention, the generation of the structural saliency map includes: loading a preset locomotive component outline template library.

[0085] It should be noted that the locomotive component outline template library is not a simple collection of images, but a series of structured data. Each template corresponds to a specific locomotive component, such as a wheel, bogie, or pantograph, and stores its key outline, geometric parameters, or a set of feature points that remain unchanged under different viewing angles and lighting conditions.

[0086] The component area is initially located by template matching.

[0087] It should be noted that the preliminary location of the component region through template matching specifically involves: calculating the similarity score between the template features and the features of the local region of the preliminary processed image, and identifying the local region of the preliminary processed image with the highest score as the initial candidate region of the component.

[0088] To improve positioning accuracy, this method then refines the boundaries of the initial candidate region using edge continuity features. Edge information near the candidate region boundary is analyzed; this edge information is obtained from preliminary edge detection of the pre-processed image, and the edge path that is most similar to the template contour and has the strongest continuity is sought. Through this process, the initial coarse boundary is snapped onto this continuous edge representing the contour of the real object, thereby obtaining a precise component boundary.

[0089] The process described above, which uses edge continuity features to correct the boundaries of the initial candidate regions, can be implemented using existing technologies. Its core technology modules, such as edge detection, shape similarity matching, edge continuity measurement, and boundary snapping, are all mature technologies in the fields of computer vision and image processing, and will not be elaborated here.

[0090] By combining edge continuity features to correct component boundaries, a structural saliency map with confidence scores is generated.

[0091] The confidence level of each component region in the structural saliency diagram is specifically represented by the following conceptual formula:

[0092] in, For the final confidence score, This represents a weighted combination function. It is the highest similarity score obtained from the template matching stage. This is the boundary fit score, calculated by the distance error between the corrected boundary and the actual edge path. The smaller the error, the higher the score. It is a texture consistency score, which is obtained by comparing the texture features inside the region with the expected texture pattern of the component template. In the final generated structural saliency map, high-scoring regions are likely to correspond to key components, while low-scoring regions are background or uncertain regions.

[0093] The aforementioned method combines template matching based on prior models with edge correction based on real-time image features, achieving a synergistic effect of top-down guidance and bottom-up verification. This overcomes the sensitivity to deformation, occlusion, and viewpoint changes inherent in template matching alone, and also addresses the issue of susceptibility to noise and complex background interference when relying solely on low-level features for segmentation. This synergistic mechanism ensures accurate and robust part localization. Furthermore, the generated structural saliency map with confidence scores provides quantitative and reliable guidance for subsequent adaptive processing steps. This allows the system to determine the filtering, enhancement, or sharpening strategies and intensities based on the confidence level, forming a crucial foundation for the targeted and efficient nature of the entire intelligent filtering framework.

[0094] S6. Calculate the overall sharpness index of the optimized image in the key component area, and dynamically adjust the reflection suppression intensity or background smoothing intensity parameter of the corresponding low-quality sub-region.

[0095] In a specific embodiment of the present invention, the overall sharpness index of the optimized image in the key component region is calculated.

[0096] Its calculation can be expressed by the following exemplary formula:

[0097] Where Q is the final calculated overall sharpness index. Representing the normalized average gradient magnitude of all pixels within the critical component region, it is calculated by determining the average gradient magnitude within the region from the gradient map of the optimized image, directly reflecting the sharpness of the edges. Normalized local contrast, representing the region of key components, is obtained by calculating the contrast of the local neighborhood of each pixel within the region and averaging the results. It reflects the richness of texture details. and It is a preset weighting coefficient used to balance the importance of edge sharpness and texture detail in the overall sharpness index evaluation, and the sum of the two is 1.

[0098] When the overall sharpness index is lower than the preset threshold, it indicates that the current combination of processing parameters has failed to achieve the expected image quality and needs to be adjusted. The sharpness index is calculated separately in each sub-region defined by the region division information, so as to accurately locate the low-quality sub-region that is causing the overall quality to decline.

[0099] For example, calculation is performed separately for each sub-region. and Compare each sub-region and Compared with the preset gradient assignment threshold and contrast threshold, if or If the value is below the gradient assignment threshold or contrast threshold, the sub-region is determined to be a low-quality sub-region.

[0100] Dynamically adjust the reflection suppression intensity or background smoothing intensity parameters for the corresponding low-quality sub-regions.

[0101] Specifically, if a low-quality sub-region identified as highly reflective lacks sufficient sharpness, it is determined that the reflection suppression intensity is insufficient, and measures such as increasing the compensation coefficient of multi-scale brightness remapping or sharpening intensity can be taken. If a background region causes blurring of its boundary with foreground components due to over-smoothing, the background smoothing intensity parameter applied to that region is reduced. These adjustments will take effect when processing the next frame or when re-iterendering the current image.

[0102] The quality assessment feedback step introduced in the above method transforms the original open-loop serial processing flow into a closed-loop intelligent system with self-diagnosis and self-correction capabilities. This gives the entire filtering method strong environmental adaptability and robustness, enabling it to automatically find the optimal combination of processing parameters based on the specific conditions of the input image, such as different lighting conditions, different locomotive models, or degrees of contamination. This closed-loop control mechanism ensures the stability and high level of output image quality, exceeding the performance limits of fixed-parameter processing systems and achieving continuous optimization and self-improvement of the processing effect.

[0103] This invention introduces a closed-loop optimization mechanism of quality assessment and dynamic parameter feedback, enabling the processing method to automatically adapt to different detection scenarios. Faced with different locomotive models, varying lighting conditions, or different levels of contamination, this invention can self-diagnose processing effects and dynamically adjust internal parameters, ensuring the stability and consistency of output image quality and significantly enhancing the method's robustness and environmental adaptability.

[0104] In a specific embodiment of the present invention, the dynamic adjustment includes: for persistently low-resolution, strongly reflective sub-regions, the cause is determined to be insufficient initial reflection suppression processing intensity. To solve this problem, a compensation coefficient is automatically increased during the multi-scale brightness remapping process. This compensation coefficient is typically used in the processing model as a gain factor for the difference between the detail layer (i.e., the original image) and the illumination base layer. Increasing this coefficient means that when synthesizing the final image, the weak detail signals extracted from the strong reflections will be amplified and superimposed more strongly, thereby directly counteracting the detail overwhelming effect caused by reflections and improving the sharpness and contrast of the area.

[0105] Specifically, the determination criteria for the persistently low-resolution strongly reflective region are as follows: if the resolution is still lower than a preset resolution threshold after a preset number of processing steps, it is determined to be a persistently low-resolution strongly reflective region.

[0106] For critical component regions identified as experiencing decreased sharpness due to misprocessing, the cause is determined to be an incorrectly applied excessively strong background smoothing filter. To correct this error, the background smoothing intensity parameter applied to that specific location is reduced. This intensity parameter is typically associated with the size of the smoothing filter kernel or the intensity factor of the filtering algorithm, such as the spatial domain and standard deviation of the range in bilateral filtering. By reducing this parameter, the smoothing effect applied to that region will be weakened in the next iteration or when processing the next frame, thereby protecting and restoring the fine edges and textures that originally belonged to the critical components, ensuring that their features are not incorrectly suppressed. These adjusted parameters will be updated and used in subsequent image processing flows.

[0107] Specifically, the key component region that is misidentified as background refers to the region with contradictory confidence levels in the structural saliency map. That is, the region that should be a key component according to the preset component model, but is marked as a low-confidence region and thus judged as background in the structural saliency map.

[0108] The specific values ​​for increasing the compensation coefficient or sharpening intensity of the multi-scale brightness remapping and reducing the background smoothing intensity parameters applied to the region are determined based on the sharpness gap and the pre-set mapping relationship between each adjustment parameter and the sharpness gap in the data warehouse. The larger the sharpness gap, the greater the adjustment range; the smaller the sharpness gap, the smaller the adjustment range.

[0109] The aforementioned method significantly improves the efficiency and accuracy of the entire feedback loop by establishing a clear correspondence between problem diagnosis and parameter adjustment. It breaks down ambiguous quality assessments into specific, attributable diagnostic conclusions such as insufficient reflection suppression or excessive background smoothing, and then executes precise, targeted parameter corrections accordingly. This diagnostic parameter adjustment strategy avoids the side effects that may result from global or blind parameter tuning, achieving deep collaboration and intelligent linkage between different processing modules. This allows the entire system to quickly and stably converge to the optimal processing state in a manner similar to expert experience, ensuring that the output images achieve a high standard and consistent quality level in various complex and changing detection scenarios.

[0110] This invention constructs a multi-stage collaborative processing framework and introduces prior structural knowledge for intelligent guidance to collaboratively process various complex interferences such as strong metallic reflections, complex backgrounds, and slight motion blur. Compared to the simple superposition of traditional methods, this invention effectively suppresses various types of noise while protecting and enhancing important information such as the microscopic texture and structural edges of key components, significantly improving the overall clarity and detail integrity of the image.

[0111] This invention provides a solid and reliable foundation for subsequent automated inspection tasks by offering high-quality, low-noise image data. The clear images enable machine vision-based algorithms for defect identification, dimensional measurement, and condition assessment to operate more accurately, effectively reducing the false positive and false negative rates of the system, thereby comprehensively improving the accuracy and reliability of the locomotive automated inspection system.

[0112] A second aspect of the present invention provides a system for performing the locomotive inspection image filtering processing method described in the present invention, including an image acquisition module configured to acquire original locomotive inspection images.

[0113] The region analysis module is configured to perform region division and reflection suppression operations.

[0114] The structure guidance module is configured to generate and apply structure saliency maps.

[0115] The background stripping module is configured to perform background interference identification and adaptive smoothing.

[0116] The motion compensation module is configured to perform local motion estimation and directional sharpening.

[0117] The quality assessment feedback module is configured to calculate the overall sharpness index and trigger parameter adjustments.

[0118] The dynamic parameter adjustment module responds to the output of the quality assessment feedback module and optimizes the processing parameters of the region analysis module and the background stripping module in real time.

[0119] It should be noted that the various thresholds in this invention are not subjectively set, but rather based on the industry requirements of locomotive inspection, general image processing theories, and industrial practice standards. Each threshold corresponds to a specific detection target, such as capturing cracks, suppressing background, and judging ambiguity, and falls within the general parameter range of industrial machine vision. This avoids blindly pursuing high precision, which could lead to overprocessing (e.g., excessively high thresholds causing extensive rework), or lowering standards, which could result in quality risks (e.g., excessively low thresholds leading to missed defects). This setting logic fully aligns with the core industry requirement of locomotive inspection to balance safety, efficiency, and economy, while also adhering to general image processing theories such as Shannon entropy, gradient analysis, and confidence assessment, demonstrating sufficient rationality and scientific validity.

[0120] The above content is merely an example and illustration of the concept of the present invention. Those skilled in the art can make various modifications or additions to the specific embodiments described, or use similar methods to replace them, as long as they do not deviate from the concept of the invention or exceed the scope defined by the present invention, and all such modifications and additions should fall within the protection scope of the present invention.

Claims

1. A method for filtering and processing locomotive inspection images, characterized in that, include: S1. Acquire the original image of the locomotive for inspection, and divide the original image into multiple illumination characteristic sub-regions according to the locomotive's structural features and reflection patterns, and generate region division information. The region division information includes different illumination characteristic sub-regions, including strong reflective sub-regions and texture-rich sub-regions. S2. Based on the region division information, perform customized reflection suppression operation on each sub-region to obtain a preliminary processed image. Use a preset locomotive component geometric model to extract structural features from the preliminary processed image and generate a structural saliency map. S3. Based on the structural saliency map, dynamically adjust the edge detection parameters, perform multi-scale edge detection on the preliminary processed image, generate a refined edge map, and fuse the local texture statistical features of the refined edge map and the preliminary processed image to identify background interference areas; S4. Perform adaptive smoothing filtering based on the texture disorder of the background interference area to obtain a background suppressed image; analyze the edge sharpness of each region in the refined edge image and estimate the local motion blur parameters. S5. Based on the local motion blur parameters, perform adaptive sharpening processing with directional constraints on the background suppression image to generate an optimized image.

2. The locomotive inspection image filtering processing method according to claim 1, characterized in that, Performing customized reflection suppression operations includes: For regions with strong reflectivity, reflection suppression is achieved by combining polarization characteristic analysis or multi-scale brightness remapping. The multi-scale brightness remapping process is described by the following formula:

3. Among them, The preliminary processed image obtained from the calculation is in coordinates Pixel value at that location, It is the pixel intensity value at the corresponding coordinates obtained from the strongly reflective sub-region of the original image. This represents the i-th Gaussian blur kernel with different scale parameters. It estimates the illumination components at different scales by smoothing the original image to different degrees. The symbol * denotes convolution operation. ε is the weight coefficient of the i-th scale, and the sum of all weight coefficients is 1. By adjusting the weights of each scale, the dynamic range compression and color fidelity of the image are balanced. ε is a very small positive number used to avoid performing logarithmic operations on pixels with zero values. For texture-rich sub-regions, local contrast constraints are used to protect detailed features. Specifically, a local neighborhood is defined with the pixel as the center, the gray-level histogram within the neighborhood is calculated, the frequency of pixels in the gray-level histogram that exceeds the preset contrast threshold is clipped, and the clipped part is evenly redistributed to other gray levels in the histogram. Based on the constrained and redistributed local histogram, the gray value of the center pixel is remapped. The reflection suppression operation is tied to the illumination characteristics of the sub-region.

4. The locomotive inspection image filtering processing method according to claim 1, characterized in that, The dynamically adjusted edge detection parameters include: In the highly saliency regions marked on the structural saliency map, edge extraction is performed using a preset first-scale gradient threshold and a preset first-size filter kernel; In low saliency regions, a preset second-scale gradient threshold and a preset second-size filter kernel are used to suppress background edges, wherein the first-scale gradient threshold is smaller than the second-scale gradient threshold, and the first-size filter kernel is smaller than the second-size filter kernel.

5. The locomotive inspection image filtering processing method according to claim 3, characterized in that, The specific areas to be identified as background interference regions include: The calculation of the local texture entropy map for the pre-processed image is as follows: This calculation is performed at each pixel of the image. A neighborhood window is taken centered on a certain pixel, and the gray level distribution of all pixels within the window is statistically analyzed to form a local gray level histogram. The local texture entropy value is then calculated based on this histogram, and the formula can be expressed as:

6. Here, E is the local texture entropy value of the center pixel, representing the degree of texture complexity or disorder in that local region. It is the probability of gray level i appearing within the neighborhood window, which is obtained by dividing the number of pixels of gray level i by the total number of pixels in the window; After obtaining the local texture entropy map, a low-saliency region mask generated by the structure saliency map is used to filter out all pixels belonging to the background. For all background pixels, their local texture entropy values ​​are compared with a preset high entropy threshold. If the entropy value of a background pixel is higher than this threshold, it is marked as a high-interference background area. Using a high-saliency region mask, all pixels belonging to key components are filtered out. For the pixels of these key components, their local texture entropy values ​​are compared with a preset low entropy threshold. If the entropy value of a component pixel is lower than this threshold, it is marked as a protected area.

7. The locomotive inspection image filtering processing method according to claim 5, characterized in that, It also includes a quality feedback step: Calculate the overall sharpness index of the optimized image in the key component region; Its calculation can be expressed by the following exemplary formula:

8. Among them, Q represents the final calculated overall sharpness index. Representing the normalized average gradient magnitude of all pixels within the critical component region, it is calculated by determining the average gradient magnitude within the region from the gradient map of the optimized image, directly reflecting the sharpness of the edges. Normalized local contrast, representing the region of key components, is obtained by calculating the contrast of the local neighborhood of each pixel within the region and averaging the results. It reflects the richness of texture details. and It is a preset weighting coefficient used to balance the importance of edge sharpness and texture detail in the overall sharpness index evaluation, and the sum of the two is 1; When the overall clarity index is lower than a preset threshold, low-quality sub-regions are located based on the region division information. Dynamically adjust the reflection suppression intensity or background smoothing intensity parameters for the corresponding low-quality sub-regions.

9. The locomotive inspection image filtering processing method according to claim 7, characterized in that, The dynamic adjustment content includes: For regions with persistently low resolution and strong reflectivity, increase the compensation coefficient for multi-scale brightness remapping; For critical component areas identified as having reduced clarity due to misprocessing, reduce the background smoothing intensity at the corresponding locations.

10. A method for filtering locomotive inspection images according to any one of claims 1-8, characterized in that, The generation of the structural saliency map includes: Load the preset locomotive component outline template library; Initially locate component areas using template matching; By combining edge continuity features to correct component boundaries, a structural saliency map with confidence scores is generated; The confidence level of each component region in the structural saliency diagram is specifically represented by the following conceptual formula: ; in, For the final confidence score, This represents a weighted combination function. It is the highest similarity score obtained from the template matching stage. It is a boundary fit score, obtained by calculating the distance error between the corrected boundary and the actual edge path. It is a texture consistency score, obtained by comparing the texture features within a region with the expected texture pattern of the component template; A system for performing the locomotive inspection image filtering processing method according to any one of claims 1-9, characterized in that, Includes an image acquisition module, configured to acquire raw images of locomotive inspection; The region analysis module is configured to perform the region division and reflection suppression operations of claim 1; A structure guidance module configured to generate and apply a structure saliency map of claim 1; The background stripping module is configured to perform background interference identification and adaptive smoothing as claimed in claim 1; The motion compensation module is configured to perform local motion estimation and directional sharpening as claimed in claim 1; The quality assessment feedback module is configured to calculate the overall sharpness index and trigger parameter adjustments. The dynamic parameter adjustment module responds to the output of the quality assessment feedback module and optimizes the processing parameters of the region analysis module and the background stripping module in real time.

Citation Information

Cited By

  • A Machine Learning-Based Image Filtering Method

    CN122312389A