A low-quality LDR image enhancement method based on pseudo-HDR image generation

By converting the image to the HSV color space and performing Gaussian low-pass filtering and gradient region segmentation, combined with the statistics of pseudo-HDR images and HDR histogram equalization, the problems of halo and pseudo edge in image enhancement are solved, and contrast is enhanced and overall quality is improved.

CN116245760BActive Publication Date: 2025-09-23XIAN UNIV OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310159557.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-23
Publication Date
2025-09-23
Estimated Expiration
2043-02-23

AI Technical Summary

Technical Problem

Existing image enhancement methods are prone to produce halo phenomena and false edges when enhancing images, especially when processing large smooth areas, resulting in serious loss of details, making it difficult to effectively improve image quality.

Method used

The image is converted to the HSV color space, and the low-frequency and high-frequency components are generated by Gaussian low-pass filtering. The maximum information entropy image segmentation method is used to separate the gradient area, and the statistics of the pseudo-HDR image and the modified HDR histogram equalization are performed in the high gradient area to generate the final enhanced image.

Benefits of technology

It effectively enhances image contrast, reduces over-enhancement and pseudo-edge phenomena, and improves overall image quality, especially significantly improving the effect in image processing of large smooth areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116245760B_ABST
    Figure CN116245760B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of image processing, and more specifically to a low-quality LDR image enhancement method based on pseudo-HDR image generation. The method comprises obtaining a brightness image, original image chroma, and saturation; generating low-frequency and high-frequency components from the brightness image, calculating the gradient of the brightness image, and generating low-gradient regions and high-gradient regions; performing high-precision quantization on the low-frequency components to generate a corresponding pseudo-HDR image; performing statistics on the pixels of the pseudo-HDR image to generate a modified HDR histogram, and performing adaptive gradient threshold histogram equalization on the low-frequency components; fusing the equalized low-frequency components with the previously generated high-frequency components to obtain a preliminary enhanced image, and restoring the enhanced brightness image and the original image chroma and saturation from the HSV color gamut space to the RGB color space to obtain a final enhanced image. The method aims to improve the overall image contrast while avoiding image over-enhancement and the introduction of pseudo-edges.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and in particular to a low-quality LDR image enhancement method based on pseudo HDR image generation. Background Art

[0002] The image formation process is affected by various non-ideal factors, making it difficult to obtain images of satisfactory quality. Therefore, image enhancement technology is needed to obtain enhanced images suitable for display or conducive to post-processing.

[0003] Existing image enhancement methods are mainly divided into those based on Retinex theory and those based on histogram processing. Retinex-based methods often produce "halos" or "artifacts" in the enhanced image due to uneven illumination, while histogram-based methods merge a large number of grayscale levels with low probability of occurrence. When processing images with large smooth areas, they often suffer from loss of detail, the introduction of additional false edges in smooth areas, and over-enhancement. Summary of the Invention

[0004] The purpose of the present invention is to overcome the above-mentioned shortcomings and provide a low-quality LDR image enhancement method based on pseudo HDR image generation, which aims to reduce image over-enhancement and the introduction of pseudo edges and improve the overall image quality.

[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:

[0006] A low-quality LDR image enhancement method based on pseudo HDR image generation comprises the following steps:

[0007] S1. Image Convert the RGB color space to the HSV color space to obtain the image Brightness image 、Original image chromaticity and saturation ;

[0008] S2. Use Gaussian low-pass filtering to process the brightness image and generate low-frequency components With high frequency components , calculate the brightness image Gradient , use the maximum information entropy image segmentation method to segment the image Separate and generate low gradient areas With high gradient area ;

[0009] S3. For low frequency components Perform high-precision quantization to generate the corresponding pseudo HDR image ;

[0010] S4. Only in high gradient areas For pseudo HDR images Count the pixels and generate a modified HDR histogram , using the modified HDR histogram For low frequency components Perform adaptive gradient threshold histogram equalization;

[0011] S5. Combine the low-frequency component and high-frequency component after equalization Fusion is performed to obtain a preliminary enhanced image, and the preliminary enhanced image and the original image chromaticity are combined. and saturation The HSV color space is restored to the RGB color space to obtain the final enhanced image.

[0012] The image described in S1 The specific conversion formula from RGB color gamut space to HSV color gamut space is:

[0013]

[0014]

[0015]

[0016] in, For color, is saturation, is brightness, is the red channel, It is a green channel. For the blue channel.

[0017] Use Gaussian low-pass filtering to process the brightness image as described in S2 The specific algorithm is to scan each pixel in the image through a Gaussian low-pass operator, where the size of the Gaussian low-pass operator is , is a positive integer, The values ​​of are 5, 6 and 7, and the variance coefficient of the Gaussian operator is 1.

[0018] The image is segmented using the maximum information entropy image segmentation method described in S2. An image is required for segmentation Sobel gradient, Sobel gradient threshold The calculation method is as follows:

[0019]

[0020]

[0021]

[0022] in, is the information entropy value of the low gradient area after threshold segmentation, is the information entropy value of the high gradient area after threshold segmentation, The gradient image has a gradient The probability of a pixel appearing is is the maximum gradient value in the gradient image.

[0023] S3 for low-frequency components The quantization resolution for high-precision quantization is 1 / 4, 1 / 16, and 1 / 64.

[0024] Generate the corresponding pseudo HDR image as described in S3 The high-precision quantization function is as follows:

[0025]

[0026] in is the quantization function used, The number of gray levels used for the HDR image.

[0027] S4 described only in high gradient areas For pseudo HDR images The pixels are counted and the pseudo HDR image is The gradient in is higher than the gradient threshold High gradient area The area is normalized.

[0028] The calculation method for generating the corrected HDR histogram described in S4 is as follows:

[0029]

[0030] in The grayscale of the pseudo HDR image in the high gradient area is k The number of pixels.

[0031] The use of the modified HDR histogram for low-frequency components as described in S4 The specific method for performing adaptive gradient threshold histogram equalization is as follows:

[0032] The cumulative distribution function is calculated using the modified HDR histogram, specifically:

[0033]

[0034] in, ,

[0035] According to the cumulative distribution function , generate grayscale mapping function Perform grayscale mapping, The specific calculation formula is:

[0036] , .

[0037] S5 describes the initial enhancement of the image and the original image chromaticity and saturation The conversion formula from HSV color gamut space to RGB color gamut space is:

[0038]

[0039] Three channels in an RGB image 、 and It can be calculated by the following formula: .

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] The present invention converts the image Convert the RGB color space to the HSV color space to obtain the image Brightness image 、Original image chromaticity and saturation ; Use Gaussian low-pass filtering to process the brightness image and generate low-frequency components With high frequency components , calculate the brightness image Gradient , use the maximum information entropy image segmentation method to segment the image Separate and generate low gradient areas With high gradient area ; For low frequency components Perform high-precision quantization to generate the corresponding pseudo HDR image ; Only in high gradient areas For pseudo HDR images Count the pixels and generate a modified HDR histogram , using the modified HDR histogram For low frequency components Perform adaptive gradient threshold histogram equalization; combine the equalized low-frequency component with the previously generated high-frequency component Fusion is performed to obtain a preliminary enhanced image, and the preliminary enhanced image and the original image chromaticity are combined. and saturation The final enhanced image is obtained by restoring the HSV color space to the RGB color space. The image enhancement algorithm provided by this invention effectively enhances image contrast and improves image quality while significantly suppressing over-enhancement and false edges, which are common in enhancing images with large smooth areas. This method reduces the introduction of over-enhancement and false edges, improving overall image quality.

[0042] Furthermore, only in high gradient regions For pseudo HDR images The pixels are counted and the pseudo HDR image is The gradient in is higher than the gradient threshold High gradient area Normalizing the area of ​​the image helps to enhance the overall image quality. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] Figure 1 is a flow chart of the method of the present invention;

[0044] Figure 2 This is a picture that has not been processed by the algorithm of the present invention;

[0045] Figure 3 This is the picture processed by the algorithm of the present invention. DETAILED DESCRIPTION

[0046] The present invention will be further described below with reference to the accompanying drawings.

[0047] like Figure 1 The flowchart of the method of the present invention is shown, which is a low-quality LDR image enhancement method based on pseudo HDR image generation, comprising the following steps:

[0048] S1. Image Convert the RGB color space to the HSV color space to obtain the image Brightness image 、Original image chromaticity and saturation ;

[0049] The image The specific conversion formula from RGB color gamut space to HSV color gamut space is:

[0050]

[0051]

[0052]

[0053] in, For color, is saturation, is brightness, is the red channel, It is a green channel. For the blue channel.

[0054] S2. Use Gaussian low-pass filtering to process the brightness image and generate low-frequency components With high frequency components , calculate the brightness image Gradient , use the maximum information entropy image segmentation method to segment the image Separate and generate low gradient areas With high gradient area , the information is given by a binary image, where the low gradient areas Assign a value of 1, high gradient area Assign a value of 0;

[0055] Use Gaussian low-pass filtering to process the brightness image The specific algorithm is to scan each pixel in the image through a Gaussian low-pass operator, where the size of the Gaussian low-pass operator is , is a positive integer, The values ​​of are 5, 6 and 7, the variance coefficient of the Gaussian operator is 1, and the side length of the Gaussian filter window is 11, 13 and 15.

[0056] Use the maximum information entropy image segmentation method to An image is required for segmentation Sobel gradient, Sobel gradient threshold The calculation method is as follows:

[0057]

[0058]

[0059]

[0060] in, is the information entropy value of the low gradient area after threshold segmentation, is the information entropy value of the high gradient area after threshold segmentation, The gradient image has a gradient The probability of a pixel appearing is is the maximum gradient value in the gradient image.

[0061] S3. For low frequency components Perform high-precision quantization to generate the corresponding pseudo HDR image ;

[0062] For low frequency components The quantization resolution for high-precision quantization is 1 / 4, 1 / 16, and 1 / 64.

[0063] Generate the corresponding pseudo HDR image The high-precision quantization function is as follows:

[0064]

[0065] in is the quantization function used, The number of gray levels used for the HDR image. Commonly used numbers are 1024, 4096, and 16384. is the number of gray levels of the LDR image, usually 256.

[0066] S4. Only in high gradient areas For pseudo HDR images Count the pixels and generate a modified HDR histogram , using the modified HDR histogram For low frequency components Perform adaptive gradient threshold histogram equalization to generate low-frequency components of the image after contrast enhancement;

[0067] Furthermore, using the modified HDR histogram For low frequency components The input of adaptive gradient threshold histogram equalization is the pseudo HDR image output by S3, and the output is an LDR image, whose grayscale mapping curve is calculated by the statistical histogram.

[0068] Preferably, only in high gradient regions For pseudo HDR images The pixels are counted and the pseudo HDR image is The gradient is higher than the gradient threshold High gradient area Normalizing the area of ​​the image helps to enhance the overall image quality.

[0069] The calculation method to generate the corrected HDR histogram is as follows:

[0070]

[0071] in The grayscale of the pseudo HDR image in the high gradient area is kThe number of pixels.

[0072] Use the modified HDR histogram to reduce the low frequency components The specific method for performing adaptive gradient threshold histogram equalization is as follows:

[0073] The cumulative distribution function is calculated using the modified HDR histogram, specifically:

[0074]

[0075] in, ,

[0076] According to the cumulative distribution function , generate grayscale mapping function Perform grayscale mapping, The specific calculation formula is:

[0077] , .

[0078] S5. Compare the low-frequency component and high-frequency component of the image after contrast enhancement Fusion is performed to obtain a preliminary enhanced image, and the preliminary enhanced image and the original image chromaticity are combined. and saturation The HSV color space is restored to the RGB color space to obtain the final enhanced image.

[0079] The initial enhanced image and original image chromaticity and saturation The conversion formula from HSV color gamut space to RGB color gamut space is:

[0080]

[0081] Three channels in an RGB image 、 and It can be calculated by the following formula: .

[0082] Preferably, Figure 2 The pictures shown are those that have not been processed by the algorithm of the present invention. Figure 3 This is the picture processed by the algorithm of the present invention. Convert the RGB color space to the HSV color space to obtain the image Brightness image 、Original image chromaticity and saturation , which is convenient for subsequent preservation of color data. Use Gaussian low-pass filter to process brightness image and generate low-frequency components With high frequency components , calculate the brightness image Gradient , use the maximum information entropy image segmentation method to segment the image Separate and generate low gradient areas With high gradient area . For low frequency components Perform high-precision quantization to generate the corresponding pseudo HDR image Only in high gradient areas For pseudo HDR images Count the pixels and generate a modified HDR histogram , using the modified HDR histogram For low frequency components Perform adaptive gradient threshold histogram equalization. The low-frequency component after equalization is combined with the high-frequency component generated previously. Fusion is performed to obtain a preliminary enhanced image, and the preliminary enhanced image and the original image chromaticity are combined. and saturation The final enhanced image is obtained by restoring the HSV color space to the RGB color space. The image enhancement algorithm provided by this invention effectively enhances image contrast and improves image quality while significantly suppressing over-enhancement and false edges, which are common in enhancing images with large smooth areas. This method reduces the introduction of over-enhancement and false edges, improving overall image quality.

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

Claims

1. A low-quality LDR image enhancement method based on pseudo-HDR image generation, characterized in that: The following steps are involved: S1. Image Convert the RGB color space to the HSV color space to obtain the image Brightness image 、Original image chromaticity and saturation ; S2. Use Gaussian low-pass filtering to process the brightness image and generate low-frequency components With high frequency components , calculate the brightness image Gradient , use the maximum information entropy image segmentation method to segment the image Separate and generate low gradient areas With high gradient area ; S3. For low frequency components Perform high-precision quantization to generate the corresponding pseudo HDR image ; S4. Only in high gradient areas For pseudo HDR images Count the pixels and generate a modified HDR histogram , using the modified HDR histogram For low frequency components Perform adaptive gradient threshold histogram equalization; S5. Combine the low-frequency component and high-frequency component after equalization Fusion is performed to obtain a preliminary enhanced image, and the preliminary enhanced image and the original image chromaticity are combined. and saturation Restore the HSV color space to the RGB color space to obtain the final enhanced image; Use Gaussian low-pass filtering to process the brightness image as described in S2 The specific algorithm is to scan each pixel in the image through a Gaussian low-pass operator, where the size of the Gaussian low-pass operator is , is a positive integer, The values ​​of are 5, 6 and 7, and the variance coefficient of the Gaussian operator is 1; The image is segmented using the maximum information entropy image segmentation method described in S2. An image is required for segmentation Sobel gradient, Sobel gradient threshold The calculation method is as follows: in, is the information entropy value of the low gradient area after threshold segmentation, is the information entropy value of the high gradient area after threshold segmentation, The gradient image has a gradient The probability of a pixel appearing is is the maximum gradient value in the gradient image; S3 for low-frequency components The quantization resolution for high-precision quantization is 1 / 4, 1 / 16, and 1 / 64; Generate the corresponding pseudo HDR image as described in S3 The high-precision quantization function is as follows: in is the quantization function used, The number of gray levels used for the HDR image.

2. A low-quality LDR image enhancement method based on pseudo HDR image generation according to claim 1, characterized in that: The image described in S1 The specific conversion formula from RGB color gamut space to HSV color gamut space is: in, For color, is saturation, is brightness, is the red channel, It is a green channel. For the blue channel.

3. The low-quality LDR image enhancement method based on pseudo HDR image generation according to claim 1, characterized in that: S4 described only in high gradient areas For pseudo HDR images The pixels are counted and the pseudo HDR image is The gradient in is higher than the gradient threshold High gradient area The area is normalized.

4. The low-quality LDR image enhancement method based on pseudo HDR image generation according to claim 1, characterized in that: The calculation method for generating the corrected HDR histogram described in S4 is as follows: in The grayscale of the pseudo HDR image in the high gradient area is k The number of pixels.

5. The low-quality LDR image enhancement method based on pseudo HDR image generation according to claim 1, characterized in that: The use of the modified HDR histogram for low-frequency components as described in S4 The specific method for performing adaptive gradient threshold histogram equalization is as follows: The cumulative distribution function is calculated using the modified HDR histogram, specifically: in, , According to the cumulative distribution function , generate grayscale mapping function Perform grayscale mapping, The specific calculation formula is: , 。 6. The low-quality LDR image enhancement method based on pseudo HDR image generation according to claim 1, characterized in that: S5 describes the initial enhancement of the image and the original image chromaticity and saturation The conversion formula from HSV color gamut space to RGB color gamut space is: Three channels in an RGB image 、 and It can be calculated by the following formula: .

Citation Information

Patent Citations

  • Infrared enhancement method based on gradient histogram

    CN113592750A

  • Methods for adaptive and progressive gradient-based multi-resolution color image segmentation and systems thereof

    US20100183225A1