Contrast enhancement method for ultrasonic detection image of generator circuit breaker box

By using adaptive partitioning of processing units and grayscale mapping correction, the contradiction between detail enhancement and noise suppression in ultrasound detection images by the CLAHE algorithm is resolved, achieving both contrast enhancement and noise suppression, thus improving the overall image quality.

CN120876340AActive Publication Date: 2025-10-31SHAANXI JINXIN ELECTRIC APPLIANCE CO LTD

Patent Information

Application Number
CN202511375176.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2025-10-31
Estimated Expiration
2045-09-25

AI Technical Summary

Technical Problem

The existing CLAHE algorithm struggles to balance detail enhancement and noise suppression when processing ultrasonic inspection images. The fixed block size causes minor defect details to be smoothed or background noise to be amplified, affecting the image interpretation effect.

Method used

By calculating the information richness and the probability of suspected noise in the image, the processing units are adaptively divided, and histogram equalization and grayscale mapping correction are performed to generate an enhanced image with clear details and suppressed noise.

Benefits of technology

It effectively improves contrast, enhances detail clarity, significantly reduces noise, and improves image signal-to-noise ratio and defect identifiability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876340A_ABST
    Figure CN120876340A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of image processing, in particular to a contrast enhancement method for an ultrasonic detection image of a generator circuit breaker box, and the method comprises the steps: obtaining a to-be-processed image, and dividing the to-be-processed image into a plurality of initial region blocks; calculating the information richness of each initial region block, and merging or keeping the initial region blocks independent according to the information richness to obtain a plurality of adaptive sub-blocks; calculating a suspected noise possibility of each pixel point in the to-be-processed image; and performing histogram equalization processing on each adaptive sub-block, and correcting the equalized gray mapping relation according to the suspected noise possibility of each pixel point to obtain a final enhanced image. According to the technical scheme of the invention, noise amplification can be remarkably suppressed while the detail contrast of the image is effectively improved, so that the overall visual quality of the image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method for enhancing the contrast of ultrasonic inspection images of generator circuit breaker enclosures. Background Technology

[0002] In industrial production and quality control, ultrasonic testing technology is widely used due to its non-destructive nature, high penetration, and precise ability to locate internal defects. However, the raw images acquired by ultrasonic testing systems usually have inherent defects, namely extremely low contrast, very blurred grayscale boundaries between defective and intact areas, and a large amount of speckle noise.

[0003] Currently, the Contrast Limited Adaptive Histogram Equalization (CLAHE) algorithm is widely used to solve the above problems. The CLAHE algorithm divides the image into several rectangular sub-blocks, performs histogram equalization with peak clipping limitation on each sub-block independently, and finally smooths the boundaries between blocks through bilinear interpolation. This improves local contrast while avoiding the problem of excessive noise enhancement caused by global histogram equalization.

[0004] However, the traditional CLAHE algorithm, when processing ultrasound inspection images, typically divides the image into a fixed-size grid. When the set sub-block size is too large, the enhancement effect becomes too coarse for small regions containing fine defects, failing to effectively highlight details and potentially smoothing out minor defects. Conversely, when the set sub-block size is too small, although more refined enhancement can be achieved, the algorithm amplifies every tiny grayscale fluctuation in the image. This inevitably amplifies random noise in the background area into false textures, severely interfering with image interpretation. Therefore, how to adaptively adjust the processing scale according to the image content itself, effectively enhancing realistic details while suppressing noise amplification, is a technical challenge that existing technologies need to address. Summary of the Invention

[0005] To address the technical problem that the fixed block division in the existing CLAHE algorithm makes it difficult to simultaneously achieve detail enhancement and noise suppression, this application provides a contrast enhancement method for ultrasonic inspection images of generator circuit breaker enclosures, which can generate enhanced images with clear details and suppressed noise.

[0006] This application provides a contrast enhancement method for ultrasonic inspection images of generator circuit breaker enclosures, comprising: acquiring an image to be processed and dividing it into multiple initial region blocks; calculating the information richness of each initial region block, and merging or keeping the initial region blocks independent according to the information richness to obtain multiple adaptive sub-blocks; calculating the possible noise probability of each pixel in the image to be processed; performing histogram equalization on each adaptive sub-block, and correcting the grayscale mapping relationship after equalization according to the possible noise probability of each pixel to obtain the final enhanced image.

[0007] This application can comprehensively extract the information features of an image, then intelligently construct an adaptive processing unit based on the information richness, perform preliminary enhancement, and finally use the noise probability for precise correction, effectively solving the contradiction of fixed blocks and effectively suppressing noise.

[0008] In one embodiment, the information richness satisfies the following relation: ;in, This indicates the information richness of the initial region block. This indicates the number of edge pixels within the initial region block. This represents the total number of pixels within the initial region block. Represents grayscale level , Represents grayscale level The frequency of occurrence within the initial region block, where T is the preset total number of gray levels.

[0009] By constructing an information richness index, regions with both clear structure and rich texture can be accurately identified. This allows subsequent adaptive segmentation to divide the real defect regions into finer processing units, thereby fully enhancing their details. At the same time, it avoids over-processing noisy regions that only have texture but no structure, improving the signal-to-noise ratio and defect identifiability of the final enhanced image.

[0010] In one embodiment, merging or maintaining the independence of the initial region blocks according to the information richness to obtain multiple adaptive sub-blocks includes: clustering all initial region blocks into high-information region blocks and low-information region blocks according to the information richness of each initial region block; treating each high-information region block as a separate adaptive sub-block; connecting multiple initial region blocks that are adjacent and belong to the same low-information region block to form one or more low-information regions; and further dividing or maintaining the low-information regions as a whole to form one or more adaptive sub-blocks.

[0011] In one embodiment, the probability of the suspected noise satisfies the following relationship: ;in, Possibly due to noise. The minimum grayscale difference in the neighborhood of the target pixel. Let x be the maximum grayscale difference in the neighborhood of the target pixel, and let x be the average grayscale value of the target pixel and its neighboring pixels. It is the average grayscale value of the neighboring pixels of the target pixel, excluding the target pixel itself.

[0012] The power function structure can sensitively amplify the difference between isolated pixels and their smooth neighborhood, while blunting the normal fluctuations of pixels in continuous edges or texture areas. This provides a reliable basis for subsequent correction steps, ensuring that only real noise points are enhanced and suppressed without damaging image details.

[0013] In one embodiment, the step of correcting the equalized grayscale mapping relationship based on the suspected noise probability of each pixel includes: determining whether the target pixel is a noise point to be corrected; if so, calculating the correction amount of the grayscale change amplitude based on the suspected noise probability of the target pixel and the information richness of its adaptive sub-block, and adjusting the mapped grayscale value obtained by the histogram equalization process.

[0014] The correction process effectively avoids the problem that traditional enhancement algorithms indiscriminately amplify all high-frequency signals, making the enhancement process more robust and able to effectively avoid noise while enhancing details.

[0015] In one embodiment, the correction amount for the grayscale change amplitude is calculated as follows: ;in, Indicates the first The first adaptive sub-block The grayscale change range of each noise point to be corrected. Indicates the first The first adaptive sub-block The original grayscale values ​​of the noise points to be corrected Indicates the first The first adaptive sub-block The original gray values ​​of the noise points to be corrected are obtained through equalization mapping. Indicates the first The first adaptive sub-block The probability of suspected noise at each noise point to be corrected. Indicates the first The information richness of each adaptive sub-block.

[0016] By forcefully suppressing suspected noise points in areas of intense enhancement and gently suppressing suspected noise points in areas of gentle enhancement, noise can be suppressed to the greatest extent while preserving the true details of all areas.

[0017] In one embodiment, the re-segmentation of each of the low-information regions includes: constructing a feature vector containing information richness, row coordinates, and column coordinates for each initial region block within the low-information region; clustering the feature vector using a mean-shift clustering algorithm; and segmenting the low-information region into multiple adaptive sub-blocks based on the clustering results.

[0018] In one embodiment, the edge pixels are obtained by performing LBP feature extraction on the image to be processed and then using the Canny edge detection algorithm.

[0019] The technical solution of this application has the following beneficial technical effects: This application comprehensively evaluates the information content of local regions of an image and dynamically determines the size of the enhancement processing unit, which can intelligently distinguish between detailed regions and flat regions in the image, thereby ensuring that key details are fully enhanced while effectively avoiding over-processing of the background region.

[0020] Furthermore, grayscale mapping correction can effectively quantify the probability that each pixel is an isolated noise point. When performing contrast enhancement, the amplitude of grayscale change will be dynamically adjusted to suppress the enhancement intensity of suspected noise points, thus achieving significant suppression of background noise while improving the target contrast. Attached Figure Description

[0021] Figure 1 This is a flowchart of a method for enhancing the contrast of ultrasonic inspection images of a generator circuit breaker enclosure according to an embodiment of this application.

[0022] Figure 2 This is a schematic diagram of the original image to be processed according to an embodiment of this application.

[0023] Figure 3 This is a schematic diagram illustrating the information richness according to an embodiment of this application.

[0024] Figure 4 This is a diagram showing the result of adaptive sub-block partitioning according to an embodiment of this application.

[0025] Figure 5 This is a schematic diagram illustrating the possible noise based on an embodiment of this application.

[0026] Figure 6 This is an enhanced result image based on an embodiment of this application.

[0027] Figure 7 These are comparison diagrams showing the final effects according to the embodiments of this application. Detailed Implementation

[0028] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.

[0029] Figure 1 This is a flowchart illustrating a method for enhancing the contrast of ultrasonic inspection images of a generator circuit breaker enclosure according to an embodiment of this application. Figure 1 As shown, the contrast enhancement method for ultrasonic inspection images of the generator circuit breaker enclosure includes steps S101 to S104, which are described in detail below.

[0030] S101, acquire the image to be processed and divide it into multiple initial region blocks.

[0031] In one embodiment, such as Figure 1 As shown, an ultrasonic inspection image of the generator circuit breaker enclosure to be processed is obtained. The image is an 8-bit grayscale image with a grayscale range of [0, 255]. Then, in order to perform local analysis, the image can be spatially divided into multiple non-overlapping square initial regions of size 4×4 pixels.

[0032] Thus, by acquiring images and performing preliminary gridding, a data foundation is laid for subsequent content-based adaptive analysis and processing.

[0033] S102, calculate the information richness of each initial region block, and merge or keep the initial region blocks independent according to the information richness to obtain multiple adaptive sub-blocks.

[0034] In one embodiment, to quantify information richness, edge and texture features of each initial region block can be extracted first. Specifically, LBP (Local Binary Pattern) feature extraction is performed on the entire image to be processed, and the Canny edge detection algorithm is applied to identify all edge pixels. At the same time, the grayscale space [0, 255] is quantized into 17 grayscale levels, and the frequency of occurrence of each grayscale level in each 4×4 initial region block is counted.

[0035] In this optional embodiment, for each initial region block, its corresponding information richness can be calculated, and the information richness satisfies the following relationship:

[0036] in, This indicates the information richness of the initial region block. This indicates the number of edge pixels within the initial region block. This represents the total number of pixels within the initial region block, which is 16 in each 4×4 initial region block. Represents grayscale level , Represents grayscale level The frequency of occurrence within the initial region block, where T is the preset total number of gray levels, i.e., T is 17; Used to represent the entropy of gray levels within the initial region block, i.e., the degree of disorder of gray levels.

[0037] Specifically, This represents the content of edge pixels within the initial region block. Since the initial region block is a square block, and the edges are usually linear, meaning they don't fill the entire block, when more than half of the pixels in the region block are edge pixels, it indicates that the region block has extremely rich information content. Therefore, a coefficient of 2 is used here for enhancement. The larger the value, the higher the content of edge pixels in the initial region block, and the greater the information richness within the initial region block; when... The smaller the value, the lower the content of edge pixels in the initial region block, and the less information richness within the initial region block.

[0038] Furthermore, when The larger the value, the more inconsistent the gray levels of the pixels within the initial region block, meaning a greater degree of disorder in the gray level distribution and richer information contained within the initial region block. For example... Figure 3 The diagram shown is an information richness diagram according to an embodiment of this application.

[0039] In an optional embodiment, the k-means clustering algorithm can be used to cluster all initial region blocks into high-information region blocks and low-information region blocks based on the information richness of each initial region block. Then, each high-information region block is directly treated as an independent adaptive sub-block. Multiple spatially adjacent initial region blocks belonging to the same low-information region block are connected and merged to form one or more low-information regions. Finally, each low-information region is further subdivided or kept as a whole to form one or more adaptive sub-blocks.

[0040] Specifically, to avoid excessively large low-information regions that might not effectively enhance subtle texture features, the re-segmentation process involves constructing feature vectors containing information richness, row coordinates, and column coordinates for each initial region within the low-information region. Then, mean-shift clustering is used to cluster these feature vectors. When the final number of clusters is greater than or equal to two, the current low-information region is divided into multiple adaptive sub-blocks based on the clustering results. For example... Figure 4 The diagram shown is a result of adaptive sub-block partitioning according to an embodiment of this application.

[0041] In this way, by calculating the information richness and clustering and merging accordingly, adaptive sub-blocks that match the actual content of the image are generated, making subsequent enhancement processing more targeted.

[0042] S103, calculate the probability of suspected noise for each pixel in the image to be processed.

[0043] In one embodiment, the probability of each pixel in the image to be processed being an isolated noise point can be calculated independently. For any target pixel in the image to be processed, its corresponding probability of being suspected noise satisfies the following relationship:

[0044] in, Possibly due to noise. The minimum grayscale difference in the neighborhood of the target pixel. Let x be the maximum grayscale difference in the neighborhood of the target pixel, and let x be the average grayscale value of the target pixel and its neighboring pixels. It is the average grayscale value of the neighboring pixels of the target pixel, excluding the target pixel itself.

[0045] Specifically, in this embodiment, the neighborhood can be selected as a 24-neighborhood, that is, the gray value difference between each pixel and the pixels in its 24-neighborhood is calculated. and Let x be the minimum and maximum grayscale difference between the target pixel and its 24 neighboring pixels, and let x be the average grayscale value of the 25 pixels including the target pixel. It is the average grayscale value of 24 neighboring pixels, excluding the target pixel.

[0046] For example, suppose a target pixel has a grayscale value of 180, and its 24 neighboring pixels all have a grayscale value of 100. Then the neighborhood grayscale difference is... and All are 80, and the mean grayscale value x is 103.2. If the value is 100, then the calculated P-value is 0.33. The probability of suspected noise is calculated for each pixel, and the final result is as follows: Figure 5 The diagram shows the possible noise levels, with bright spots representing pixels with higher P values.

[0047] In this way, by calculating the probability of noise for each pixel, a precise pixel-level evaluation basis is provided for the subsequent noise correction process.

[0048] S104, Histogram equalization is performed on each adaptive sub-block, and the gray-level mapping relationship after equalization is corrected according to the possible noise probability of each pixel to obtain the final enhanced image.

[0049] In one embodiment, for each generated adaptive sub-block, contrast-limited histogram equalization can be performed. This process includes calculating the histogram for each sub-block, performing peak-shaving and valley-filling histogram cropping and redistribution, and calculating the cumulative distribution function (CDF). The CDF constitutes the initial grayscale mapping relationship for the sub-block, through which the original grayscale value of each pixel within the sub-block is determined. It is equalized and mapped to a new enhanced grayscale value. .

[0050] Furthermore, the grayscale mapping relationship after equalization can be corrected according to the suspected noise probability of each pixel. Specifically, for each target pixel, if its corresponding suspected noise probability value is greater than a preset threshold, for example, the preset threshold is 0.6, then the target pixel can be determined as a pixel to be corrected. At this time, the correction amount of grayscale change amplitude can be calculated according to the suspected noise probability of the target pixel and the information richness of its adaptive sub-block, and the mapped grayscale value obtained by histogram equalization processing can be adjusted.

[0051] Specifically, the calculation method for the correction amount of grayscale variation is as follows:

[0052] in, Indicates the first The first adaptive sub-block The grayscale change range of each noise point to be corrected. Indicates the first The first adaptive sub-block The original grayscale values ​​of the noise points to be corrected Indicates the first The first adaptive sub-block The original gray values ​​of the noise points to be corrected are obtained through equalization mapping. Indicates the first The first adaptive sub-block The probability of suspected noise at each noise point to be corrected. Indicates the first The information richness of each adaptive sub-block.

[0053] For example, let the original grayscale value of the pixel determined to be the one to be corrected be... The enhanced grayscale value is 120. If the value is 200, the suspected noise probability of this pixel is 0.7, and the information richness corresponding to the adaptive sub-block it belongs to is 0.8, then the corrected grayscale change range is... for If this grayscale change is applied to the corresponding original grayscale value, then the result is 120 + 4.8. 125.

[0054] Thus, by first equalizing the adaptive sub-blocks and then correcting the mapping relationship using the probability of suspected noise, a clear and natural enhanced image is obtained while effectively avoiding over-amplification of isolated noise points, thereby enhancing the real image structure. Figure 6 The image shown is an enhanced result image according to an embodiment of this application, and as... Figure 7 The image shown is a comparison chart that juxtaposes the original image to be processed, the standard CLAHE result, and the result of the present invention. It can be seen that compared with the standard CLAHE, the result of the present invention can effectively improve the contrast between defects and background, better preserve details, and significantly suppress noise in flat areas, resulting in a more natural overall visual effect of the image.

[0055] It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the scope of protection of this application. Therefore, the scope of protection of this patent application shall be determined by the appended claims.

Claims

1. A method for enhancing the contrast of ultrasonic inspection images of generator circuit breaker enclosures, characterized in that, include: Acquire the image to be processed and divide it into multiple initial region blocks; Calculate the information richness of each initial region block, and merge or keep the initial region blocks independent according to the information richness to obtain multiple adaptive sub-blocks; Calculate the probability of suspected noise for each pixel in the image to be processed; Histogram equalization is performed on each of the adaptive sub-blocks, and the gray-level mapping relationship after equalization is corrected according to the probability of suspected noise at each pixel to obtain the final enhanced image.

2. The method for enhancing the contrast of ultrasonic inspection images of a generator circuit breaker enclosure according to claim 1, characterized in that, The information richness satisfies the following relation: in, This indicates the information richness of the initial region block. This indicates the number of edge pixels within the initial region block. This represents the total number of pixels within the initial region block. Represents grayscale level , Represents grayscale level The frequency of occurrence within the initial region block, where T is the preset total number of gray levels.

3. The method for enhancing the contrast of ultrasonic inspection images of a generator circuit breaker enclosure according to claim 1, characterized in that, The initial region blocks are merged or kept independent based on the information richness to obtain multiple adaptive sub-blocks, including: Based on the information richness of each initial region block, all initial region blocks are clustered into high-information region blocks and low-information region blocks; Each of the high-information regions is treated as a separate adaptive sub-block; Connect multiple initial region blocks that are adjacent and belong to the same low-information region block to form one or more low-information areas; Each of the low-information regions may be further subdivided or kept as a whole to form one or more adaptive sub-blocks.

4. The method for enhancing the contrast of ultrasonic inspection images of a generator circuit breaker enclosure according to claim 1, characterized in that, The probability of the suspected noise satisfies the following relationship: in, Possibly due to noise. The minimum grayscale difference in the neighborhood of the target pixel. Let x be the maximum grayscale difference in the neighborhood of the target pixel, and let x be the average grayscale value of the target pixel and its neighboring pixels. It is the average grayscale value of the neighboring pixels of the target pixel, excluding the target pixel itself.

5. A method for enhancing the contrast of ultrasonic inspection images of a generator circuit breaker enclosure according to claim 1 or 4, characterized in that, The step of correcting the equalized grayscale mapping relationship based on the suspected noise probability of each pixel includes: Determine whether the target pixel is a noise point to be corrected; If so, the correction amount for the grayscale change amplitude is calculated based on the suspected noise probability of the target pixel and the information richness of its adaptive sub-block, and the mapped grayscale value obtained by the histogram equalization process is adjusted.

6. The method for enhancing the contrast of ultrasonic inspection images of a generator circuit breaker enclosure according to claim 5, characterized in that, The correction amount for the grayscale change range is calculated as follows: in, Indicates the first The first adaptive sub-block The grayscale change range of each noise point to be corrected. Indicates the first The first adaptive sub-block The original grayscale values ​​of the noise points to be corrected Indicates the first The first adaptive sub-block The original gray values ​​of the noise points to be corrected are obtained through equalization mapping. Indicates the first The first adaptive sub-block The probability of suspected noise at each noise point to be corrected. Indicates the first The information richness of each adaptive sub-block.

7. The method for enhancing the contrast of ultrasonic inspection images of a generator circuit breaker enclosure according to claim 3, characterized in that, The re-segmentation of each of the low-information regions includes: For each initial region block within the low-information region, construct a feature vector containing information richness, row coordinates, and column coordinates; The feature vectors are clustered using the mean-shift clustering algorithm, and the low-information regions are divided into multiple adaptive sub-blocks based on the clustering results.

8. The method for enhancing the contrast of ultrasonic inspection images of a generator circuit breaker enclosure according to claim 2, characterized in that, The edge pixels are obtained by extracting LBP features from the image to be processed and then using the Canny edge detection algorithm.

Citation Information

Patent Citations

  • Image subjective visual effect enhancement method based on Laplace pyramid

    CN111292267A

  • Block-based contrast enhancement method and system

    CN118570112A

  • Improved histogram equalization low-illumination image enhancement method

    CN119168875A

  • Anti-collision beam weld defect detection method and system based on image processing

    CN120598960A

  • Global based adaptive-contrast limited adaptive histogram equalization

    WO2022046015A1

Cited By

  • Self-adaptive image contrast adjustment method and device, equipment and storage medium

    CN121685348A