X-ray image detail and contrast enhancement method integrating histogram analysis and exposure fusion

The low dynamic range image is generated through normalization and sliding window technology, and combined with the exposure fusion method, the details blurring and contrast problems caused by high dynamic range and noise of X-ray images are solved, real-time enhancement of high-quality images is achieved.

CN119251120APending Publication Date: 2025-01-03SHENZHEN ZHUO MAO TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411447008.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-16
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

Digital X-ray images are difficult to observe and analyze due to the influence of high dynamic range and noise. The prior art methods are not effective in improving contrast of low dynamic range images, and require manual setting of thresholds and multi-exposure fusion, which limits applicability.

Method used

By normalizing the histogram of 16-bit high dynamic range images, the grayscale maximum value is calculated, the 8-bit low dynamic range image is generated and the sliding window sampling is performed. Combined with the exposure fusion method, the image fusion is used using saturation, contrast and exposure weights for the exposure fusion. , generate enhanced images.

Benefits of technology

It effectively improves the contrast and details of X-ray images, generates high-quality images without image registration and multiple exposures, shortens the image acquisition cycle, and achieves real-time online enhancement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119251120A_ABST
    Figure CN119251120A_ABST
Patent Text Reader

Abstract

The invention discloses an X-ray image detail and contrast enhancement method integrating histogram analysis and exposure fusion. The method comprises the following steps: S1, normalizing a histogram of a 16-bit high dynamic range image; s2, based on a histogram saturation maximum and minimum value calculation method, calculating a gray maximum value and a gray minimum value of the histogram obtained in S1; s3, generating a plurality of 8-bit low dynamic range images based on a histogram sliding window; and S4, based on an exposure fusion method, fusing the plurality of 8-bit low dynamic range images obtained in the S3 to generate an enhanced image. According to the invention, details in the image can be enhanced, and the X-ray high dynamic range image is converted into a high-quality X-ray image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and in particular to an X-ray image detail and contrast enhancement method integrating histogram analysis and exposure fusion. Background Art

[0002] In the radiographic imaging process of digital X-ray images, due to the complexity of the structure of the object being detected and the influence of various unfavorable factors such as X-ray scattering, electrical noise, and photon noise in the imaging system, the characteristics of digital X-ray images are different from those of general visible light grayscale images. The imaging characteristics are manifested in the image having a wide dynamic range, blurred details, poor contrast, and other problems. Since the grayscale dynamic range of X-ray images is wide, the details or contours in low grayscale areas or high grayscale areas are difficult for the human eye to observe due to the poor contrast and signal-to-noise ratio with the background area. For example Figure 1 The cathode area of ​​the laminated battery shown in the figure has foreign matter, but the background is too dark for the human eye to identify. Figure 2 The solder bubbles on the circuit board in the Pack battery shown are difficult to observe with the human eye due to the poor contrast between the bubbles and the background.

[0003] In order to improve the visual effect of images or convert images into a form suitable for human eyes or machine analysis, it is usually necessary to enhance the images, including contrast enhancement and detail enhancement.

[0004] In the prior art, patent document CN114066789A discloses an enhancement algorithm for X-ray high dynamic range images. This method is based on the Retinex theory. In the logarithmic domain of the image, the low-frequency component and the high-frequency component of the image are separated by filtering, and then different weights are assigned to the low-frequency component and the high-frequency component, and then the weights are added, and then the exponential operation is performed to obtain the enhanced result image. However, this method requires manual setting of the thresholds of the low-frequency and high-frequency components, and the parameters of different application scenarios cannot be adapted.

[0005] Patent document CN115423726A discloses a method for suppressing strong light and enhancing dark light without the need for multi-exposure fusion. This method uses multiple gamma factors to correct the input single original image, simulating hardware multi-exposure to obtain images with different overall brightness ranges; then, using the exposure fusion idea, the Gaussian-Laplacian image pyramid fusion is used to obtain the final result image of strong light suppression and dark light enhancement. However, using gamma correction to obtain low dynamic range images cannot improve the contrast between pixels of low dynamic range images, resulting in low contrast between the foreground and background of the image. Summary of the invention

[0006] The purpose of the present invention is to provide an X-ray image detail and contrast enhancement method integrating histogram analysis and exposure fusion, which can enhance the details in the image and convert the X-ray high dynamic range image into a high-quality X-ray image.

[0007] In order to achieve the above purpose, the following technical solutions are adopted:

[0008] A method for enhancing X-ray image details and contrast by integrating histogram analysis and exposure fusion comprises the following steps:

[0009] S1: Histogram of normalized 16-bit high dynamic range image;

[0010] S2: Based on the histogram saturation maximum value calculation method, calculate the grayscale maximum value and grayscale minimum value of the histogram obtained in S1;

[0011] S3: Generate several 8-bit low dynamic range images based on the histogram sliding window;

[0012] S4: Based on the exposure fusion method, several 8-bit low dynamic range images obtained in S3 are fused to generate an enhanced image.

[0013] Furthermore, in S1, the image is normalized using the following formula:

[0014] p(i)=h(i) / w*h, where w is the width of the image, h is the height of the image, h(i) is the number of pixels with grayscale i, and the grayscale range in the image is [0, L-1].

[0015] Furthermore, the S2 specifically includes the following steps:

[0016] S21: Starting from grayscale 0, accumulate the histogram p(i). When the accumulated sum is greater than or equal to t black When , the current grayscale is taken as the minimum grayscale value h of the histogram min , the specific formula is

[0017] Among them, t black is the saturation at the minimum grayscale end of the histogram;

[0018] S22: Starting from grayscale L-1, accumulate the histogram p(i). When the accumulated sum is greater than or equal to t white , then take the current grayscale as the maximum grayscale value h of the histogram max , the specific formula is

[0019] Among them, t white It is the saturation at the maximum grayscale end of the histogram.

[0020] Furthermore, the S3 specifically includes the following steps:

[0021] S31: Use a window width of w width The sliding window is in the histogram grayscale interval [h min ,h max ] sliding sampling, where w width =h max -h min / n+1, where n is the number of 8-bit low dynamic range images;

[0022] S32: Generate an 8-bit low dynamic range image from the histogram in the sliding window. The specific formula is:

[0023] Where, I is the histogram of the input 16-bit high dynamic range image, I (x,y) It is the gray value of each point in the histogram of the 16-bit high dynamic range image.

[0024] Furthermore, the S4 uses the following calculation formula to perform image fusion:

[0025] I r =f(I low ,w s ,w c ,w e ), where w s is the saturation weight, w c is the contrast weight, w e is the exposure weight.

[0026] Furthermore, the w s =0,w c =w e =1.

[0027] By adopting the above scheme, the beneficial effects of the present invention are:

[0028] This method can effectively enhance X-ray high dynamic range images, that is, enhance the contrast and details of the image, and then generate a high-quality enhanced image. At the same time, this method generates a low dynamic range image for the 16-bit histogram by means of a sliding window, and then performs exposure fusion without the need for image registration. Compared with other exposure fusion methods, this method does not require the use of image acquisition hardware for multiple exposures, which greatly shortens the image acquisition cycle and can be enhanced online in real time. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a flow chart of the present invention;

[0030] Figure 2 This is an image of foreign matter in the cathode area of ​​a laminated battery;

[0031] Figure 3 This is an image of solder bubbles on the circuit board in the Pack battery;

[0032] Figure 4 Based on this method Figure 2 The enhanced image;

[0033] Figure 5 Based on this method Figure 3 The enhanced image. DETAILED DESCRIPTION

[0034] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments.

[0035] Reference Figures 1 to 5 As shown, the present invention provides an X-ray image detail and contrast enhancement method integrating histogram analysis and exposure fusion, comprising the following steps:

[0036] S1: Histogram of a normalized 16-bit high dynamic range image.

[0037] In S1, the following formula is used to normalize the image:

[0038] p(i)=h(i) / w*h, where w is the width of the image, h is the height of the image, h(i) is the number of pixels with grayscale i, and the grayscale range in the image is [0, L-1].

[0039] In this step, it is first necessary to perform histogram statistical analysis on the 16-bit high dynamic range image obtained from the X-ray flat panel detector, that is, to normalize the histogram of the 16-bit high dynamic range image. For the input high dynamic range image, it is assumed that the grayscale range in the image is [0, L-1], and then normalization is performed based on the above formula.

[0040] S2: Based on the histogram saturation maximum value calculation method, calculate the grayscale maximum and grayscale minimum of the histogram obtained in S1.

[0041] The S2 specifically includes the following steps:

[0042] S21: Starting from grayscale 0, accumulate the histogram p(i). When the accumulated sum is greater than or equal to t black When , the current grayscale is taken as the minimum grayscale value h of the histogram min , the specific formula is

[0043] Among them, t black is the saturation at the minimum grayscale end of the histogram;

[0044] S22: Starting from grayscale L-1, accumulate the histogram p(i). When the accumulated sum is greater than or equal to t white , then take the current grayscale as the maximum grayscale value h of the histogram max , the specific formula is

[0045] Among them, t white It is the saturation at the maximum grayscale end of the histogram.

[0046] Since the imaging process of X-Ray images is easily disturbed by various types of noise, for example, images collected using an uncorrected X-Ray flat-panel detector are very susceptible to salt and pepper noise generated by failed pixels on the flat-panel detector. Therefore, in the process of calculating the histogram maximum, it is necessary to filter some outliers to find a relatively robust maximum. In the present invention, a histogram saturation maximum calculation method is used to calculate the histogram maximum.

[0047] S3: Generate several 8-bit low dynamic range images based on the histogram sliding window.

[0048] The S3 specifically includes the following steps:

[0049] S31: Use a window width of w width The sliding window is in the histogram grayscale interval [h min ,h max ] sliding sampling, where w width =h max -h min / n+1, where n is the number of 8-bit low dynamic range images;

[0050] S32: Generate an 8-bit low dynamic range image from the histogram in the sliding window. The specific formula is: Where, I is the histogram of the input 16-bit high dynamic range image, I (x,y) It is the gray value of each point in the histogram of the 16-bit high dynamic range image.

[0051] For the histogram maximum value h obtained in step S3 min With h max , using a window width of w width The sliding window in the histogram [h min ,h max ] Slide sampling, where, in order to facilitate the calculation of the window width w width , the number of images n in the low dynamic range image sequence is used as the setting parameter. According to Shannon sampling theorem, the sliding distance of the sliding window cannot be greater than 0.5 times the window. Here, the sliding distance is set to 0.5 times w width, and then calculate based on the above formula.

[0052] S4: Based on the exposure fusion method, several 8-bit low dynamic range images obtained in S3 are fused to generate an enhanced image.

[0053] The S4 uses the following calculation formula to perform image fusion:

[0054] I r =f(I low ,w s ,w c ,w e ), where w s is the saturation weight, w c is the contrast weight, w e is the exposure weight.

[0055] Exposure fusion algorithm for low dynamic range image sequences I low For pixels at the same position in the image, contrast, exposure and saturation are used as evaluation indicators to calculate weights and generate a weighted image sequence W. low , and then use the Laplace pyramid to transform I low With W low To perform image fusion and generate high-quality images, refer to the above formula. Considering that X-Ray images are single-channel images, here w s =0,w c =w e =1.

[0056] Reference Figure 4 As shown in the figure, the Figure 2 In the enhanced result image, the point-shaped foreign matter in the cathode area of ​​the battery is clearly visible, with a high contrast with the background; Figure 5 This method is for Figure 3 The enhanced result graph shows that the welding bubbles on the circuit board in the Pack battery have a high degree of recognition, which is convenient for subsequent extraction and calculation.

[0057] The above are only preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for enhancing X-ray image detail and contrast by integrating histogram analysis and exposure fusion, characterized in that: The steps include: S1: Histogram of normalized 16-bit high dynamic range image; S2: Based on the histogram saturation maximum value calculation method, calculate the grayscale maximum value and grayscale minimum value of the histogram obtained in S1; S3: Generate several 8-bit low dynamic range images based on the histogram sliding window; S4: Based on the exposure fusion method, several 8-bit low dynamic range images obtained in S3 are fused to generate an enhanced image.

2. The X-ray image detail and contrast enhancement method integrating histogram analysis and exposure fusion according to claim 1, characterized in that: In S1, the following formula is used to normalize the image: p(i)=h(i) / w*h, where w is the width of the image, h is the height of the image, h(i) is the number of pixels with grayscale i, and the grayscale range in the image is [0, L-1].

3. The X-ray image detail and contrast enhancement method integrating histogram analysis and exposure fusion according to claim 2, characterized in that: The S2 specifically includes the following steps: S21: Starting from grayscale 0, accumulate the histogram p(i). When the accumulated sum is greater than or equal to t black When , the current grayscale is taken as the minimum grayscale value h of the histogram min , the specific formula is Among them, t black is the saturation at the minimum grayscale end of the histogram; S22: Starting from grayscale L-1, accumulate the histogram p(i). When the accumulated sum is greater than or equal to t white , then take the current grayscale as the maximum grayscale value h of the histogram max , the specific formula is Among them, t white It is the saturation at the maximum grayscale end of the histogram.

4. The X-ray image detail and contrast enhancement method integrating histogram analysis and exposure fusion according to claim 3, characterized in that: The S3 specifically includes the following steps: S31: Use a window width of w width The sliding window is in the histogram grayscale interval [h min ,h max ] sliding sampling, where w width =h max -h min / n+1, where n is the number of 8-bit low dynamic range images; S32: Generate an 8-bit low dynamic range image from the histogram in the sliding window. The specific formula is: Where, I is the histogram of the input 16-bit high dynamic range image, I (x,y) It is the gray value of each point in the histogram of the 16-bit high dynamic range image.

5. The X-ray image detail and contrast enhancement method integrating histogram analysis and exposure fusion according to claim 4, characterized in that: The S4 uses the following calculation formula to perform image fusion: I r =f(I low ,w s ,w c ,w e ), where w s is the saturation weight, w c is the contrast weight, w e is the exposure weight.

6. The X-ray image detail and contrast enhancement method integrating histogram analysis and exposure fusion according to claim 5, characterized in that: The w s =0,w c =w e =1.