A contrast enhancement method of generator circuit breaker tank ultrasonic detection image

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 a contrast enhancement effect with clear details and noise suppression.

CN120876340BActive Publication Date: 2025-12-09SHAANXI JINXIN ELECTRIC APPLIANCE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202511375176.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-25
Publication Date
2025-12-09
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 achieves full enhancement of details and effective suppression of noise during the contrast enhancement process, improves the signal-to-noise ratio and defect identifiability of the image, and obtains a clear and natural enhancement effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120876340B_ABST
    Figure CN120876340B_ABST
Patent Text Reader

Abstract

The application 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, which comprises the following steps: obtaining an image to be processed and dividing the image into multiple initial region blocks; calculating the information richness of each initial region block, and merging or keeping independent the initial region blocks according to the information richness to obtain multiple adaptive subblocks; calculating the suspected noise possibility of each pixel point in the image to be processed; performing histogram equalization processing on each adaptive subblock, and correcting the gray mapping relationship after equalization according to the suspected noise possibility of each pixel point to obtain a final enhanced image. Through the technical scheme, the image detail contrast can be effectively improved, and noise amplification can be significantly inhibited, 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] The present application relates to the technical field of image processing, in particular to a contrast enhancement method for generator circuit breaker box ultrasonic detection images. BACKGROUND

[0002] In industrial production and quality control, ultrasonic detection technology is widely used due to its non-destructive, high penetration and precise positioning ability for internal defects. However, the original images collected by the ultrasonic detection system usually have inherent defects, i.e., the contrast is extremely low, the gray scale boundary between the defect area and the intact area is very blurred, and there is 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, independently performs histogram equalization with peak clipping limitation for each sub-block, and finally smoothes the inter-block boundary through bilinear interpolation, thereby improving the local contrast while avoiding the problem of excessive noise enhancement caused by global histogram equalization.

[0004] However, when the traditional CLAHE algorithm processes ultrasonic detection images, the image is generally divided into fixed-size grids. When the set sub-block size is too large, the enhancement effect for small areas containing fine defects will be too rough, and the details cannot be effectively highlighted, which may cause the small defects to be smoothed out. Conversely, when the set sub-block size is too small, although more delicate enhancement can be achieved, the algorithm will amplify every small gray scale fluctuation in the image, which will inevitably amplify the random noise in the background area as false texture, seriously interfering with the interpretation of the image. Therefore, how to adaptively adjust the processing scale according to the image content itself, while effectively enhancing the real details and suppressing noise amplification, is a technical problem that needs to be solved by the existing technology. SUMMARY

[0005] In order to solve the technical problem that the existing CLAHE algorithm fixed block makes it difficult to balance detail enhancement and noise suppression, the present application provides a contrast enhancement method for generator circuit breaker box ultrasonic detection images, which can generate an enhanced image with clear details and suppressed noise.

[0006] The application provides a contrast enhancement method for an ultrasonic detection image of a generator circuit breaker box, comprising: acquiring 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 independent the initial region blocks according to the information richness to obtain a plurality of adaptive sub-blocks; calculating the suspected noise possibility of each pixel point in the to-be-processed image; performing histogram equalization processing on each adaptive sub-block, and correcting the gray scale mapping relationship after equalization according to the suspected noise possibility of each pixel point to obtain a final enhanced image.

[0007] The application can comprehensively extract the information features of an image, then intelligently construct adaptive processing units based on information richness, then preliminarily enhance, and finally accurately correct by using noise possibility, effectively solving the contradiction of fixed block division and effectively suppressing noise.

[0008] In one embodiment, the information richness satisfies the relationship: ; wherein, represents the information richness of an initial region block, represents the number of edge pixel points in the initial region block, is the total number of pixel points in the initial region block, represents the frequency of occurrence of a gray level , represents the frequency of occurrence of a gray level in the initial region block, and T is a preset total number of gray levels.

[0009] By constructing the information richness index, regions with clear structure and rich texture can be accurately identified, which enables the subsequent adaptive block division to divide more fine processing units for the real defect regions, thereby achieving sufficient enhancement of the details, while avoiding excessive processing of noise regions with only texture but no structure, and improving the signal-to-noise ratio and defect distinguishability of the final enhanced image.

[0010] In one embodiment, the merging or keeping independent of the initial region blocks according to the information richness to obtain a plurality of adaptive sub-blocks comprises: 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; taking each high-information region block as an adaptive sub-block independently; connecting a plurality of initial region blocks that are adjacent and belong to the low-information region blocks to form one or more low-information zones; and re-segmenting or keeping the whole of each low-information zone to form one or more adaptive sub-blocks.

[0011] In one embodiment, the suspected noise possibility satisfies the relationship: ; wherein, 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-dividing each of the low-information regions comprises: constructing a feature vector containing information richness, row coordinate and column coordinate for each initial region block in the low-information region; clustering the feature vectors using a mean shift clustering algorithm, and dividing the low-information region into a plurality of adaptive sub-blocks according to the clustering result.

[0018] In one embodiment, the edge pixel points are obtained by using a Canny edge detection algorithm after LBP feature extraction on the image to be processed.

[0019] The technical solution of the present application has the following beneficial technical effects:

[0020] The present application can intelligently distinguish between detail areas and flat areas in the image to be processed by comprehensively evaluating the information content of local areas of the image and dynamically determining the size of the enhancement processing unit, thereby effectively avoiding over-processing of the background area while ensuring that key details are sufficiently enhanced.

[0021] Further, the probability that each pixel point is an isolated noise point can be effectively quantified through gray scale mapping correction, the amplitude of gray scale change is dynamically adjusted when contrast enhancement is performed, the enhancement strength of suspected noise points is inhibited, and significant inhibition of background noise is achieved while improving the target contrast. BRIEF DESCRIPTION OF DRAWINGS

[0022] Figure 1 is a flowchart of a contrast enhancement method of an ultrasonic detection image of a generator circuit breaker box according to an embodiment of the present application.

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

[0024] Figure 3 is a schematic diagram of information richness according to an embodiment of the present application.

[0025] Figure 4 is a result image of adaptive sub-block division according to an embodiment of the present application.

[0026] Figure 5 is a schematic diagram of the possibility of suspected noise according to an embodiment of the present application.

[0027] Figure 6 is a result image after enhancement according to an embodiment of the present application.

[0028] Figure 7 is a comparison diagram of the final effect according to an embodiment of the present application. DETAILED DESCRIPTION

[0029] Clearly, the described embodiments are part of the present application, but not all embodiments of the present application.

[0030] Figure 1 is a flowchart of a contrast enhancement method of a generator circuit breaker box ultrasonic detection image according to an embodiment of the present application. As shown in Figure 1 , the contrast enhancement method of the generator circuit breaker box ultrasonic detection image includes steps S101-S104, which are described in detail below.

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

[0032] In one embodiment, as shown in Figure 1 , the generator circuit breaker box ultrasonic detection image to be processed is obtained, which 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 region blocks with a size of 4x4 pixels.

[0033] In this way, by obtaining the image and performing preliminary grid division, a data foundation is laid for subsequent content-based adaptive analysis and processing.

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

[0035] In one embodiment, in order to quantify the information richness, the edge and texture features of each initial region block can be extracted. Specifically, by performing LBP (Local Binary Pattern) feature extraction on the entire image to be processed and applying the Canny edge detection algorithm, all edge pixel points are identified. At the same time, the grayscale space of [0, 255] is quantized into 17 gray levels, and the frequency of each gray level in each 4x4 initial region block is counted.

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

[0037]

[0038] wherein, represents the information richness of the initial region block, represents the number of edge pixel points in the initial region block, is the total number of pixel points in the initial region block, and the corresponding number in each 4x4 initial region block is 16, represents the gray level , entropy of gray level The frequency of occurrence in the initial region block, T is the total number of preset gray levels, i.e. T is 17; Entropy of gray level in the initial region block, i.e. the degree of confusion of the gray level.

[0039] Specifically, The content of the edge pixel points in the initial region block in the entire initial region block, since the initial region block is a square region block, and the edge is usually linear, i.e. it does not occupy the entire region block, when more than half of the pixel points in the region block are edge pixel points, it indicates that the information content of the region block at this time is extremely rich, therefore, the coefficient 2 is used for enhancement here; when The greater, the higher the content of the edge pixel points in the initial region block, the greater the degree of richness of information in the initial region block; when The smaller, the lower the content of the edge pixel points in the initial region block, the smaller the degree of richness of information in the initial region block.

[0040] Further, the greater the value, the more inconsistent the gray levels to which the pixel points in the initial region block belong, i.e. the greater the degree of confusion of the distribution of the gray levels, the richer the information contained, and the greater the degree of richness of information in the initial region block. As shown in The greater the value, the more inconsistent the gray levels to which the pixel points in the initial region block belong, i.e. the greater the degree of confusion of the distribution of the gray levels, the richer the information contained, and the greater the degree of richness of information in the initial region block. As shown in Figure 3 The information richness diagram according to the embodiments of the present application.

[0041] In an optional embodiment, the k-means clustering algorithm can be used to cluster all the initial region blocks into high information region blocks and low information region blocks according to the information richness of each initial region block. Then, each high information region block is directly taken as an independent adaptive sub-block, and multiple initial region blocks that are adjacent in space and belong to the low information region block are connected and merged to form one or more low information zones, and finally each low information zone is re-divided or kept as a whole, thereby forming one or more adaptive sub-blocks.

[0042] Specifically, in order to avoid that the low information zone is too large and the enhancement effect of the possible not obvious texture features contained therein is not good, the re-division process is to construct a feature vector containing the information richness, the row coordinate and the column coordinate for each initial region block in the low information zone, and then the mean shift clustering algorithm is used to cluster these feature vectors, and when the final clustering class number is greater than or equal to 2, the current low information zone is divided into multiple adaptive sub-blocks according to the clustering result. As shown in Figure 4 The result diagram of adaptive sub-block division according to the embodiments of the present application.

[0043] Thus, by calculating the information richness and clustering and merging according to the information richness, adaptive sub-blocks matching the actual content of the image are generated, so that the subsequent enhancement processing can be more targeted.

[0044] S103, calculate the suspected noise possibility of each pixel point in the image to be processed.

[0045] In one embodiment, the possibility of each pixel point in the image to be processed as an isolated noise point can be calculated independently. For any target pixel point in the image to be processed, the corresponding suspected noise possibility satisfies the relationship:

[0046]

[0047] wherein, is the suspected noise possibility, is the minimum gray scale difference of the neighborhood of the target pixel point, is the maximum gray scale difference of the neighborhood of the target pixel point, x is the average gray scale value of the target pixel point and the neighborhood pixel points, is the average gray scale value of the neighborhood pixel points of the target pixel point excluding the target pixel point itself.

[0048] Specifically, in the present embodiment, the neighborhood can be selected as a 24-neighborhood, i.e. the gray scale value difference between each pixel point and the pixel points in its 24-neighborhood is calculated, and is the minimum and maximum gray scale difference between the target pixel point and its 24-neighborhood pixel points, x is the average gray scale value of the 25 pixel points including the target pixel point, is the average gray scale value of the 24 neighborhood pixel points excluding the target pixel point.

[0049] For example, assuming that the gray scale value of a target pixel point is 180, and the gray scale values of its 24 neighborhood pixel points are all 100, then the neighborhood gray scale difference and are both 80, and the average gray scale value x is 103.2, is 100, then the calculated P value is 0.33. The corresponding suspected noise possibility of all pixel points is calculated, and finally a suspected noise possibility diagram as shown in Figure 5 is obtained, wherein the bright spots in the diagram represent pixel points with higher P value.

[0050] Thus, by calculating the suspected noise possibility of each pixel point, accurate pixel-level evaluation basis is provided for the subsequent noise correction process.

[0051] S104, perform histogram equalization processing on each adaptive sub-block, and correct the gray scale mapping relationship after equalization according to the suspected noise possibility of each pixel point, to obtain a final enhanced image.

[0052] In one embodiment, for each adaptive sub-block generated, a contrast limited histogram equalization process is performed separately, which includes the steps of histogram statistics for each sub-block, histogram clipping and re-distribution in a peak clipping and valley filling manner, and calculation of cumulative distribution function (CDF). The CDF constitutes the preliminary gray scale mapping relationship of the sub-block, through which the original gray scale value of each pixel in the sub-block is equalized and mapped to a new enhanced gray scale value .

[0053] Further, the equalized gray scale mapping relationship can be corrected according to the suspected noise likelihood of each pixel point. Specifically, for each target pixel point, if its corresponding suspected noise likelihood value is greater than a preset threshold, for example, the preset threshold is 0.6, it can be determined that the target pixel point is a pixel point to be corrected. At this time, the correction amount of the gray scale change amplitude can be calculated according to the suspected noise likelihood of the target pixel point and the information richness of the adaptive sub-block where the target pixel point is located, and the mapped gray scale value obtained by the histogram equalization process is adjusted.

[0054] Specifically, the correction amount of the gray scale change amplitude is calculated as follows:

[0055]

[0056] wherein, represents the corrected gray scale change amplitude of the i-th noise point to be corrected in the j-th adaptive sub-block, represents the original gray scale value of the i-th noise point to be corrected in the j-th adaptive sub-block, represents the gray scale value obtained by equalization mapping of the original gray scale value of the i-th noise point to be corrected in the j-th adaptive sub-block, represents the suspected noise likelihood of the i-th noise point to be corrected in the j-th adaptive sub-block, represents the information richness of the j-th adaptive sub-block.

[0057] For example, assuming that the original gray scale value of the pixel point to be corrected is 120, the enhanced gray scale value is 200, the suspected noise likelihood of the pixel point is 0.7, and the information richness of the adaptive sub-block corresponding to the pixel point is 0.8, then the corrected gray scale change amplitude ​​​​​​​​​​​​​Then the gray scale change amplitude is applied to the corresponding original gray scale value, which is 120+4.8 125.

[0058] Thus, by first equalizing the adaptive sub-block, and then correcting the mapping relationship using the suspected noise possibility, the real image structure is enhanced while effectively avoiding over-amplification of isolated noise points, and a clear and natural enhanced image is obtained. As shown in FIG. 6, it is the result image after enhancement according to the embodiment of the present application, and as shown in FIG. 7, it is a comparison chart in which the original image to be processed, the standard CLAHE result and the result of the present application are placed together. It can be seen that compared with the standard CLAHE, the result of the present application can better preserve details while effectively improving the contrast between defects and background, and the noise in the flat area is significantly suppressed, and the overall visual effect of the image is more natural. Figure 6 Figure 7

[0059] It should be noted that, for those skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are all within the scope of the present application. Therefore, the protection scope of the present application patent should be subject to the appended claims.​​

Claims

1. A method of contrast enhancement of an ultrasonic inspection image of a generator circuit breaker tank, characterized by, The method comprises the following steps: acquiring an image to be processed and dividing the image into a plurality of initial region blocks; calculating information richness of each initial region block and merging or keeping independent the initial region blocks according to the information richness, to obtain a plurality of adaptive sub-blocks; the information richness satisfies the following relationship: wherein, represents the information richness of the initial region block, represents the number of edge pixel points within the initial region block, is the total number of pixel points within the initial region block, represents the frequency of occurrence of a gray level , represents the frequency of occurrence of a gray level within the initial region block, and T is the total number of preset gray levels. calculating a suspected noise possibility of each pixel point in the image to be processed; the suspected noise possibility satisfies the following relationship: wherein, is a likelihood of being noise, is a neighborhood minimum gray level difference of the target pixel, is a neighborhood maximum gray level difference of the target pixel, x is a mean value of the gray level of the target pixel and the neighborhood pixels, is a mean value of the gray level of the neighborhood pixels of the target pixel excluding the target pixel itself. performing histogram equalization processing on each adaptive sub-block and correcting a gray scale mapping relationship after equalization according to the suspected noise possibility of each pixel point, to obtain a final enhanced image, comprising: judging whether a target pixel point is a noise point to be corrected; if yes, calculating a correction amount of a gray scale variation amplitude according to the suspected noise possibility of the target pixel point and the information richness of the adaptive sub-block where the target pixel point is located, and adjusting a mapped gray scale value obtained by the histogram equalization processing; the correction amount of the gray scale variation amplitude is calculated in the following manner: wherein, denotes the gray level variation amplitude of the -th to-be-corrected noise point in the -th adaptive sub-block after correction, denotes the original gray level value of the -th to-be-corrected noise point in the -th adaptive sub-block, denotes the gray level value of the -th to-be-corrected noise point in the -th adaptive sub-block obtained through equalization mapping, denotes the suspected noise possibility of the -th to-be-corrected noise point in the -th adaptive sub-block, denotes the information richness of the -th adaptive sub-block.

2. The method of claim 1, wherein the method further comprises: the merging or keeping independent the initial region blocks according to the information richness, to obtain a plurality of adaptive sub-blocks, comprises: 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; separately taking each high information region block as an adaptive sub-block; connecting a plurality of initial region blocks which are adjacent and belong to the low information region blocks, to form one or more low information zones; performing re-segmentation or keeping integral on each low information zone, to form one or more adaptive sub-blocks.

3. The method of claim 2, wherein the method further comprises: the re-segmentation of each low information zone, comprises: constructing a feature vector comprising information richness, row coordinate and column coordinate for each initial region block in the low information zone; performing clustering on the feature vector by using a mean shift clustering algorithm, and segmenting the low information zone into a plurality of adaptive sub-blocks according to the clustering result.

4. The method of claim 1, wherein the method further comprises: the edge pixel point is obtained by performing LBP feature extraction on the image to be processed and then using a Canny edge detection algorithm.

Citation Information

Patent Citations

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

    CN120598960A