A color enhancement method based on image brightness gain

By calculating weighted curves and brightness gain in image processing, and combining data offset and enhancement of chromaticity components, the problem of color cast and saturation reduction caused by changes in image brightness is solved, and color saturation and visual effect are maintained while brightness is enhanced.

CN119941597BActive Publication Date: 2026-07-03HEFEI JUNZHENG TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HEFEI JUNZHENG TECH CO LTD
Filing Date
2023-11-01
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

In existing image processing technologies, histogram equalization algorithms only process the luminance image Y and not the chrominance components U and V, resulting in color cast and reduced saturation after image contrast enhancement.

Method used

By calculating weighted curves and luminance gain, combined with data offset and enhancement of chrominance components, color saturation is maintained during luminance changes, and color noise in dark areas is avoided. Specific steps include histogram equalization, Gauss weighted curve calculation, and luminance gain limitation.

Benefits of technology

While enhancing the brightness and contrast of the image, it maintains the color saturation of the image, avoids color cast and noise in dark areas, and improves the visual effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119941597B_ABST
    Figure CN119941597B_ABST
Patent Text Reader

Abstract

This invention provides a color enhancement method based on image brightness gain, comprising: S1, inputting a YUV color image to obtain an original brightness image y; S2, brightness enhancement, using histogram equalization to enhance the brightness image y to obtain an enhanced image Y; S3, calculating a weighted curve, calculating a Gaussian weighted curve according to a preset parameter δ; S4, gain calculation, calculating the brightness gain based on the changes in each pixel position before and after brightness enhancement; S5, color enhancement, performing color enhancement on the input u,v data images to obtain enhanced chrominance component images U,V; S5.1 S5.1. Negative UV component offset: The input u and v data are offset to obtain the offset data u' and v', with the formula: u' = u' - 128, v' = v - 128; S5.2. UV component enhancement: The u and v data image is enhanced using the brightness gain yGain2, with the formula: u' = u' × yGain2, v' = v' × yGain2; S5.3. Positive UV component offset: The enhanced color components are offset again to obtain the final U and V values, with the formula: U = u' + 128, V = v' + 128.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image processing technology, and specifically relates to a color enhancement method based on image brightness gain. Background Technology

[0002] In existing technologies, after performing a series of operations on the input raw data in the ISP, such as denoising, gamma adjustment, white balance, and green balance, the image contrast may be insufficient. Therefore, contrast enhancement algorithms are needed in the ISP processing to improve the image contrast. Histogram equalization (HE) is a widely used contrast enhancement algorithm. It generally operates in the YUV color space and processes the luminance image Y. The histogram equalization algorithm uses the histogram of the input image to calculate the cumulative distribution function (CDF), also called the mapping function. This function can map a narrow grayscale range to a wider grayscale range. After histogram equalization, the image histogram has a more uniform distribution, thereby achieving the purpose of enhancing image contrast. An image with poor contrast will have its histogram distributed more evenly after HE processing, thus improving the image contrast.

[0003] Because histogram equalization algorithms only process the luminance component Y when used for contrast enhancement of YUV images, without processing the corresponding chrominance components U and V, this increases the luminance component in most areas while improving image contrast. When the enhanced image is converted to the RGB color space, the RGB components mainly come from the luminance component, which will lead to color cast in the obtained RGB image. Obviously, contrast enhancement of the luminance image disrupts the proportional relationship between the luminance component Y and the chrominance components U and V, resulting in reduced color saturation of the enhanced image and a poor visual effect.

[0004] In addition, explanations of commonly used terms in the prior art include:

[0005] ISP: Image Signal Processor, a module that performs a series of processing on the raw data input from the sensor, generally including functions such as noise reduction, color space conversion, and scaling; LCE: Local Contrast Enhancement.

[0006] YUV: An abbreviation for a commonly used color space, consisting of the luminance image component Y and the chrominance image components U and V;

[0007] HE: histogram equalization;

[0008] HSV: Abbreviation for commonly used color space;

[0009] PDF: Probability Density Function;

[0010] CDF: Cumulative Distribution Function, also known as the mapping function in histogram equalization. Summary of the Invention

[0011] In order to solve the above problems, the purpose of this application is:

[0012] 1. A color enhancement method based on image brightness gain is proposed, which can maintain good color saturation even when the image brightness changes;

[0013] 2. Data offset during color enhancement involves converting the values ​​of the chromaticity components u and v back to their original range.

[0014] 3. The Gauss weighted curve used to limit the brightness gain ensures that the image will not have color noise in dark areas after color enhancement.

[0015] Specifically, this invention proposes a color enhancement method based on image brightness gain, the method comprising the following steps:

[0016] S1, Input a YUV color image to obtain the original brightness image y;

[0017] S2, Histogram equalization is used to enhance the brightness image y to obtain the enhanced image Y;

[0018] S3, Calculate the weighted curve. Based on the preset parameter δ, calculate a Gaussian weighted curve. The calculation method is as follows:

[0019]

[0020] Where x represents the brightness value, and δ is used to control the smoothness of the Gauss weighted curve;

[0021] S4, Gain Calculation: Calculate the brightness gain based on the changes in each pixel position before and after brightness enhancement; S5, Color Enhancement: For the input u, v data images, perform color enhancement to obtain the enhanced chromaticity component images U, V, including:

[0022] S5.1, UV component negative direction offset: The input u and v data are offset to obtain the offset data u' and v', as shown in the formula:

[0023] u' = u' - 128,

[0024] v' = v - 128,

[0025] S5.2, UV component enhancement, using luminance gain yGain2 to enhance the u and v data images, the formula is:

[0026] u' = u' × yGain2,

[0027] v' = v' × yGain2,

[0028] S5.3, UV component positive shift: The enhanced color components are shifted again to obtain the final U and V values. The formula is:

[0029] U = u' + 128,

[0030] V = v' + 128.

[0031] Step S2 further includes:

[0032] S2.1, Histogram of the statistical brightness image y;

[0033] S2.2, Calculate the probability density function pdf for all gray levels based on the width and height of the input image, using the following formula:

[0034] pdf = hist / (height × width);

[0035] S2.3, sum the probability density functions to obtain the cumulative distribution function cdf, and normalize it to [0 255], as shown in the following formula:

[0036]

[0037] Where numBins = 256;

[0038] S2.4, the calculated cumulative distribution function cdf is used to enhance the input brightness image y, resulting in the enhanced image Y.

[0039] In step S3, δ = 5.

[0040] In step S4, the brightness gain yGain is calculated and constrained to obtain yGain2, including:

[0041] S4.1, Calculate the luminance gain using the following formula:

[0042] yGain = Y / y;

[0043] S4.2, Luminance gain weighting, uses fusLine to weight the gain ygain, as shown in the following formula:

[0044] yGain1=yGain×fusLine+1×(1-fusLine);

[0045] S4.3, Gain Limitation: Based on the preset maximum gain value maxLimit and minimum gain value minLimit, the weighted gain yGain1 is limited to obtain the final gain yGain2; here, maxLimit = 2 and minLimit = 1 are set.

[0046] Therefore, the advantage of this application is that it solves the problem of reduced image color saturation caused by changes in image brightness, and ensures that while enhancing brightness contrast, the color saturation of the image is enhanced to a higher degree, which is consistent with human visual perception. Attached Figure Description

[0047] The accompanying drawings, which are provided to further illustrate the invention and form part of this application, are not intended to limit the scope of the invention.

[0048] Figure 1 This is a flowchart illustrating the method described in this application.

[0049] Figure 2 This is a schematic diagram of the weighted curve involved in this application. Detailed Implementation

[0050] To better understand the technical content and advantages of the present invention, the present invention will now be described in further detail with reference to the accompanying drawings.

[0051] This invention proposes a color enhancement method based on image brightness gain; it mainly includes: inputting a brightness image y and an enhanced image Y, calculating and limiting the brightness gain of each pixel, and performing data offsetting and color enhancement on the input u and v data; this method is used to solve the problem of reduced color saturation caused by increased image brightness; the specific process is as follows: Figure 1 As shown:

[0052] S1, Input a YUV color image to obtain the original brightness image y;

[0053] S2, Histogram equalization is performed on y to obtain the enhanced image Y, mainly including:

[0054] S2.1, Histogram of the statistical brightness image y;

[0055] S2.2, Calculate the probability density function pdf for all gray levels based on the width and height of the input image, using the following formula:

[0056] pdf = hist / (height × width);

[0057] S2.3, sum the probability density functions to obtain the cumulative distribution function cdf, and normalize it to [0 255], as shown in the following formula:

[0058]

[0059] Where numBins = 256;

[0060] S2.4, the calculated cumulative distribution function cdf is used to enhance the input brightness image y, resulting in the enhanced image Y.

[0061] S3, Calculate a Gaussian weighted curve based on the preset parameter δ, the curve shape is as follows: Figure 2 As shown, the calculation method is as follows:

[0062]

[0063] Where x represents the gray level, and δ is used to control the smoothness of the Gaussian weighted curve, which is taken here.

[0064] δ = 5;

[0065] S4, calculate the brightness gain yGain and limit it to obtain yGain2, mainly including: S4.1, calculate the brightness gain, the formula is as follows:

[0066] yGain = Y / y;

[0067] S4.2, the gain ygain is weighted using fusLine, as shown in the following formula:

[0068] yGain1=yGain×fusLine+1×(1-fusLine);

[0069] S4.3, based on the preset maximum gain value maxLimit and minimum gain value minLimit, limit the weighted gain yGain1 to obtain the final gain yGain2; here, maxLimit = 2 and minLimit = 1 are set.

[0070] S5, for the input u, v data images, perform color enhancement to obtain enhanced chrominance component images U, V, mainly including:

[0071] S5.1, the input data u and v are offset to obtain the offset data u' and v', using the following formula:

[0072] u' = u' - 128

[0073] v' = v - 128;

[0074] S5.2, the u and v data images are enhanced using the brightness gain yGain2, with the following formula:

[0075] u'=u'×yGain2

[0076] v' = v' × yGain2;

[0077] S5.3, the enhanced color components are shifted again to obtain the final U and V data, using the following formula:

[0078] U = u' + 128

[0079] V = v' + 128.

[0080] In summary, this method addresses the color cast problem caused by changes in image brightness, focusing on the image color enhancement process. First, it calculates the brightness gain of each pixel before and after the brightness change. Then, it applies a Gaussian weighted curve and limits this gain. The limited gain is then used to enhance the image's chromaticity components, ensuring that the image does not experience color cast after brightness changes. Furthermore, the application of the Gaussian weighted curve solves the problem of color noise appearing in dark areas of the image after color enhancement.

[0081] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, various modifications and variations can be made to the embodiments of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A color enhancement method based on image brightness gain, characterized in that, The method includes the following steps: S1, Input a YUV color image to obtain the original brightness image y; S2, Histogram equalization is used to enhance the brightness image y to obtain the enhanced image Y; S3, Calculate the weighted curve. Based on the preset parameter δ, calculate a Gaussian weighted curve. The calculation method is as follows: , Where x represents the brightness value, and δ is used to control the smoothness of the Gauss weighted curve; S4, Gain Calculation: Calculate the brightness gain based on the changes in each pixel position before and after brightness enhancement; in step S4, calculate the brightness gain yGain and limit it to obtain yGain2, including: S4.1, Calculate the luminance gain using the following formula: yGain = Y / y; S4.2, Luminance gain weighting, uses fusLine to weight the gain ygain, as shown in the following formula: yGain1=yGain×fusLine + 1×(1-fusLine); S4.3, Gain Limitation: Based on the preset maximum gain value maxLimit and minimum gain value minLimit, the weighted gain yGain1 is limited to obtain the final gain yGain2; here, maxLimit=2 and minLimit=1 are set. S5, Color Enhancement: For the input u, v data images, color enhancement is performed to obtain enhanced chrominance component images U, V, including: S5.1, Negative Shift of UV Components; The input u and v data are shifted to obtain the shifted data u' and v', as shown in the formula: , , S5.2, UV component enhancement; the u and v data images are enhanced using the luminance gain yGain2, with the following formula: , , S5.3, UV component positive shift: The enhanced color components are shifted again to obtain the final U and V values. The formula is: , 。 2. The color enhancement method based on image brightness gain according to claim 1, characterized in that, Step S2 further includes: S2.1, Histogram of the statistical brightness image y; S2.2, Calculate the probability density function pdf for all gray levels based on the width and height of the input image, using the following formula: pdf = hist / (height × width); S2.3, sum the probability density functions to obtain the cumulative distribution function cdf, and normalize it to [0, 255], as shown in the following formula: ; Where numBins=256; S2.4, the calculated cumulative distribution function cdf is used to enhance the input brightness image y, resulting in the enhanced image Y.

3. The color enhancement method based on image brightness gain according to claim 1, characterized in that, In step S3, δ=5.