CN115330607B - Saturation enhancement method for color image - Google Patents
Saturation enhancement method for color image Download PDFInfo
- Publication number
- CN115330607B CN115330607B CN202210810323.1A CN202210810323A CN115330607B CN 115330607 B CN115330607 B CN 115330607B CN 202210810323 A CN202210810323 A CN 202210810323A CN 115330607 B CN115330607 B CN 115330607B
- Authority
- CN
- China
- Prior art keywords
- color space
- saturation
- brightness
- image
- original
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 230000000694 effects Effects 0.000 claims abstract description 12
- 230000002708 enhancing effect Effects 0.000 claims abstract description 7
- 238000004364 calculation method Methods 0.000 claims description 11
- 239000003086 colorant Substances 0.000 claims description 7
- 238000006243 chemical reaction Methods 0.000 description 6
- 235000008534 Capsicum annuum var annuum Nutrition 0.000 description 2
- 240000008384 Capsicum annuum var. annuum Species 0.000 description 2
- 206010021403 Illusion Diseases 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005251 gamma ray Effects 0.000 description 1
- 238000003672 processing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/90—Dynamic range modification of images or parts thereof
- G06T5/92—Dynamic range modification of images or parts thereof based on global image properties
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10024—Color image
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Facsimile Image Signal Circuits (AREA)
- Color Image Communication Systems (AREA)
Abstract
The saturation enhancement method of the color image converts the image from RGB color space to HSL color space and Lxa x b x color space respectively; calculating perceived brightness L for an image in color space of L x a x b x ** The method comprises the steps of carrying out a first treatment on the surface of the The saturation enhancement is carried out on the image in the HSL color space to obtain the enhanced saturationBased on the Helmholtz-Kohlrausch effect, carrying out brightness correction on the image with enhanced saturation; for the brightness corrected image, calculating its perceived brightnessWhen (when)Recording the corresponding corrected brightnessIn the HSL color space, with enhanced saturationInstead of the original saturation S to record the corrected brightnessInstead of the original luminance L, the resulting image is converted into RGB color space. The invention can keep the perceived brightness unchanged after enhancing the saturation.
Description
Technical Field
The invention belongs to the technical field of image processing, and particularly relates to a saturation enhancement method of a color image.
Background
For an image with insufficient saturation, it is necessary to perform saturation enhancement by an image processing method. Colors consist of hue, chroma and brightness, and in the color space CIE 1976l x a x b x and HSL, etc., brightness, chroma and hue can be defined. The existing saturation enhancement method is to enhance the saturation on the premise of maintaining the brightness and the hue in the color space. However, according to the Helmholtz-Kohlrausch (H-K) effect, when the saturation of an image is enhanced, the perceived brightness increases although the brightness and hue in the color space remain unchanged. Therefore, the existing method cannot enhance the saturation on the premise of keeping the perceived brightness unchanged.
Disclosure of Invention
In order to overcome the above-mentioned drawbacks of the prior art, an object of the present invention is to provide a saturation enhancement method for color images, which is based on the Helmholtz-Kohlrausch effect and keeps the perceived brightness unchanged after enhancing the saturation.
In order to achieve the above purpose, the technical scheme adopted by the invention is as follows:
a method for enhancing saturation of a color image, comprising the steps of:
step 1, converting an image from an RGB color space to an HSL color space and an Labcolor space respectively;
step 2, calculating the perceived brightness L of the image in color space of L ** ;
Step 3, carrying out saturation enhancement on the image in the HSL color space to obtain enhanced saturation
Step 4, carrying out brightness correction on the image with enhanced saturation based on the Helmholtz-Kohlrausch effect;
step 5, calculating the perceived brightness of the brightness-corrected imageWhen->Recording the corresponding corrected brightness
Step 6, in HSL color space, to enhance saturationInstead of the original saturation S to record the corrected brightnessInstead of the original luminance L, the resulting image is converted into RGB color space.
In one embodiment, the steps 2, L ** The calculation formula of (2) is as follows:
L ** =L * +(2.5-0.025L * )q(h)C *
wherein L is * 、C * H represents luminance (light), chromaticity (chroma), and hue (hue) in the color space, and q (h) represents the influence value of the colors of different hues on perceived luminance:
a and b are chromaticity coordinates representing the position of a color in the L x a x b x color space.
In one embodiment, the step 3, after the enhancementIs of the saturation of (2)The calculation formula of (2) is as follows:
wherein f (S, C) * ) As a saturation enhancement function, S is the saturation in the HSL color space, γ (C * ) As a sigmoid function, C * Represents chromaticity in color space.
In one embodiment, the gamma (C * ) The value range of (2) is [1, gamma ] 0 ]The calculation formula is as follows:
α、β、γ 0 is control gamma (C) * ) The parameter beta determines the slope of the sigmoid function, which is a positive real number, the parameter alpha and the chromaticity C * In relation to, when C * When the ratio α is sufficiently small, γ (C * ) Approximately equal to 1, gamma 0 The value of (2) is constant.
In one embodiment, the step 4, the brightness correction step is as follows:
step (1) maximum value L of brightness top And a minimum value L of brightness bottom Respectively setting to 1 and 0, and turning to the step (2);
step (2) calculating an average luminance value L middle =(L top +L bottom ) 2, converting to the step (3);
step (3) when the condition is satisfiedWhen L is to middle Is set to correct brightnessAnd ends; otherwise, go to (4); wherein ε is setPrecision, L ** (H, S, L) is the original perceived brightness of the image in the HSL color space,>to->Instead of the original saturation S, L middle Perceived brightness when replacing original brightness L;
step (4) when the condition is satisfiedWhen L is to middle Set to L top The method comprises the steps of carrying out a first treatment on the surface of the Otherwise, L is middle Set to L bottom And (3) converting to the step (2).
In one embodiment, theAnd L ** (H, S, L) are values in the HSL color space respectivelyAnd (H, S, L) to RGB color space, and then from RGB color space to Labcolor space, where the calculation is performed.
Compared with the prior art, the invention has the beneficial effects that:
in the prior art, when the saturation of an image is enhanced, the human perceived brightness is enhanced at the same time. The saturation enhancement method can enhance the saturation and ensure that the perceived brightness is kept unchanged.
Drawings
Fig. 1 is a graph of the relationship between hues h and q (h).
Figure 2 is a flow chart of the method of the present invention.
FIG. 3 is a schematic representation of the results of one test of the present invention; wherein (a) is an original image, (b) is an image after saturation enhancement in the prior art method, and (c) is an image after saturation enhancement in the present invention.
FIG. 4 is a schematic representation of another test result of the present invention; wherein (a) is an original image, (b) is an image after saturation enhancement in the prior art method, and (c) is an image after saturation enhancement in the present invention.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings and examples.
In the present invention, a color image saturation enhancement method based on the Helmholtz-Kohlrausch effect is proposed.
The Helmholtz-Kohlrausch (H-K) effect is one of the visual illusions of humans. When the brightness and hue of a certain color are kept unchanged and only the saturation of the color is adjusted, the perceived brightness perceived by people also changes, which is the H-K effect. Specifically, even if the chromaticity of a certain color is increased, the perceived brightness of that color increases. To ensure that the converted colors do not produce out of gamut, the color conversion of the present invention is performed in the HSL color space.
Perceived brightness L in Helmholtz-Kohlrausch (H-K) effect model ** Is defined as:
L ** (L * ,C * ,h)=L * +(2.5-0.025L * )q(h)C * (1)
where q (h) represents the impact value of colors of different hues on perceived brightness.
a and b are chromaticity coordinates representing the position of a color in the L x a x b x color space.
Second of formula (1)Items, i.e. (2.5-0.025L) * )q(h)C * Is the correction of the H-K effect. L in formula (1) * 、C * H represents luminance (lightness), chromaticity (chroma), and hue (hue) in the color space, respectively. For achromatic colors, q (h) cannot be calculated because h is not defined. The relationship between h and q (h) is shown in FIG. 1.
The process of the present invention is shown in fig. 2. The object of the invention is to enhance the perceived brightness of a color imageAnd the original perceived brightness L ** The same applies. Because the HSL color space is a regular color space compared to 1976l x a x b x color space, and the saturation S has a value in the range of 0,1]Therefore, saturation is enhanced without exceeding the color gamut.
The complete steps of the present invention may be described as:
step 1, converting the image from the RGB color space to the HSL color space and the l×a×b color space, respectively. In the figure, RGB represents an image in an RGB color space, HSL represents an image in an HSL color space, and L represents an image in an L color space.
Step 2, calculating the perceived brightness L of the image in color space of L ** . The calculation formula is the formula (1), namely L ** =L * +(2.5-0.025L * )q(h)C * 。
Step 3, carrying out saturation enhancement on the image in the HSL color space to obtain enhanced saturationTo->Instead of the original saturation, the resulting image is denoted +.>
The saturation enhancement function is defined as:
wherein the method comprises the steps of
S in equation (5) is the saturation in the HSL color space. Gamma (C) * ) As sigmoid function, by parameters alpha, beta, gamma 0 And (5) controlling. Gamma (C) * ) The value range of (2) is [1, gamma ] 0 ]. The parameter β determines the slope of the sigmoid function, which is a positive real number. Parameters alpha and chromaticity C * Related to the following. When C * When the ratio α is sufficiently small, γ (C * ) Approximately equal to 1. Gamma ray 0 In the present embodiment, the value of (c) is set to be 3.
In the present invention, the enhanced saturation is defined as:
and 4, carrying out brightness correction on the image with enhanced saturation based on the Helmholtz-Kohlrausch effect in order to ensure that the perceived brightness is unchanged in the conversion process. The specific process can be described as follows:
step (1) maximum value L of brightness top And a minimum value L of brightness bottom Set to 1 and 0, respectively, and go to step (2).
Step (2) calculating an average luminance value L middle =(L top +L bottom ) And/2, and turning to the step (3).
Step (3) when the condition is satisfiedWhen L is to middle Is set to correct brightnessAnd ends; otherwise, turning to the step (4); where ε is the accuracy of the setting, in this embodiment ε=0.1.
Step (4) when the condition is satisfiedWhen L is to middle Set to L top The method comprises the steps of carrying out a first treatment on the surface of the Otherwise, L is middle Set to L bottom And (3) converting to the step (2).
Wherein L is ** (H, S, L) is the original perceived brightness of the image of the HSL color space,to->Instead of the original saturation S, L middle Instead of the perceived brightness at the original brightness L. The two calculation methods are respectively to make the value +.>And (H, S, L) to RGB color space, and then from RGB color space to L x a b color space, where L x a b color space is calculated using the above formula (1).
Specifically:
(1) The conversion formula from HSL color space to RGB color space is:
if s=0, r, g, b is defined as
R=G=B=L
If S+.0, M 1 And M 2 Respectively defined as
M 1 =2L-M 2
Treatment 1:
for R, the value of H' is set to (H+2pi/3) and go to [ process 2]. Then, the calculated X is changed to R.
For G, the value of H' is set to H and goes to [ process 2]. Then, the calculated X is changed to G.
For B, H' is set to (H-2π/3) and then go to [ process 2]. The calculated X is then changed to B.
h' is a temporary hue value when calculating the RGB values.
Treatment 2:
the calculation formula of h' is
X is defined as
h "is the temporary value after normalizing the range of h' to 0,2 pi).
(2) The conversion formula from RGB color space to XYZ color space is:
(3) The conversion formula from XYZ color space to L x a x b x color space is:
wherein X is n 、Y n 、Z n Is a tristimulus value of standard white.
(4) Perceived brightness based on H-K effect
The perceived brightness is obtained from the aforementioned formula (1).
Step 5, calculating the perceived brightness of the brightness-corrected imageWhen->Recording the corresponding corrected brightnessPerceived brightness->Reference is made to the calculation procedure +.>
Step 6, in HSL color space, to enhance saturationInstead of the original saturation S to record the corrected brightnessInstead of the original luminance L, the resulting image is expressed as +.>Will->Conversion to RGB color space, the resulting image is denoted +.>I.e. the resulting completed saturation enhanced image.
To facilitate observation of the change in perceived brightness, the amount of change in perceived brightness between the original image and the output image of each methodThe definition is as follows:
wherein,is the perceived brightness of the i-th pixel in the original image. />The perceived brightness of each pixel i in the image obtained after saturation enhancement. n is the total number of pixels in the original image.
From Table 1, it can be seen that the perceived brightness variation of the method of the present inventionMuch smaller than the prior art. As can be seen from the yellow balloons shown in (a), (b) and (c) in FIG. 3 and the green peppers shown in (a), (b) and (c) in FIG. 4, the perceived brightness of the yellow balloons and the green peppers after the saturation is enhanced by the prior method is obviously changed; the method of the invention has little change of perceived brightness after enhancing the saturation.
Table 1 shows the methods
Claims (4)
1. A method for enhancing saturation of a color image, comprising the steps of:
step 1, converting an image from an RGB color space to an HSL color space and an Labcolor space respectively;
step 2, calculating the perceived brightness L of the image in color space of L ** ;
Step 3, carrying out saturation enhancement on the image in the HSL color space to obtain enhanced saturation
And 4, carrying out brightness correction on the image with enhanced saturation based on the Helmholtz-Kohlrausch effect, wherein the brightness correction steps are as follows:
step (1) maximum value L of brightness top And a minimum value L of brightness bottom Respectively setting to 1 and 0, and turning to the step (2);
step (2) calculating an average luminance value L middle =(L top +L bottom ) 2, converting to the step (3);
step (3) when the condition is satisfiedWhen L is to middle Set to correct brightness->And ends; otherwise, go to (4); wherein epsilon is the setting precision, L ** (H, S, L) is the original perceived brightness of the image in the HSL color space,>to->Instead of the original saturation S, L middle Perceived brightness when replacing original brightness L;
step (4) when the condition is satisfiedWhen L is to middle Set to L top The method comprises the steps of carrying out a first treatment on the surface of the Otherwise, L is middle Set to L bottom And go to step (2);
the saidAnd L ** (H, S, L) is the value +.>And (H, S, L) to RGB color space, and then from RGB color space to L x a b color space, and performing computation in L x a b color space;
step 5, calculating the perceived brightness of the brightness-corrected imageWhen->Recording the corresponding corrected brightness->
Step 6, in HSL color space, to enhance saturationInstead of the original saturation S, to record the corrected luminance +.>Instead of the original luminance L, the resulting image is converted into RGB color space.
2. The method of enhancing saturation of a color image according to claim 1, wherein said steps 2, l ** The calculation formula of (2) is as follows:
L ** =L * +(2.5-0.025L * )q(h)C *
wherein L is * 、C * H represents luminance (light), chromaticity (chroma), and hue (hue) in the color space, and q (h) represents the influence value of the colors of different hues on perceived luminance:
a and b are chromaticity coordinates representing the position of a color in the L x a x b x color space.
3. The method for enhancing saturation of color image according to claim 1, wherein in step 3, the enhanced saturation isThe calculation formula of (2) is as follows:
wherein f (S, C) * ) As a saturation enhancement function, S is the saturation in the HSL color space, γ (C * ) As a sigmoid function, C * Representing colors in color spaceDegree.
4. A saturation enhancement method for a color image according to claim 3, wherein the gamma (C * ) The value range of (2) is [1, gamma ] 0 ]The calculation formula is as follows:
α、β、γ 0 is control gamma (C) * ) The parameter beta determines the slope of the sigmoid function, which is a positive real number, the parameter alpha and the chromaticity C * In relation to, when C * When the ratio α is sufficiently small, γ (C * ) Approximately equal to 1, gamma 0 The value of (2) is constant.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210810323.1A CN115330607B (en) | 2022-07-11 | 2022-07-11 | Saturation enhancement method for color image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210810323.1A CN115330607B (en) | 2022-07-11 | 2022-07-11 | Saturation enhancement method for color image |
Publications (2)
Publication Number | Publication Date |
---|---|
CN115330607A CN115330607A (en) | 2022-11-11 |
CN115330607B true CN115330607B (en) | 2024-03-01 |
Family
ID=83917734
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210810323.1A Active CN115330607B (en) | 2022-07-11 | 2022-07-11 | Saturation enhancement method for color image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115330607B (en) |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1731451A (en) * | 2005-08-22 | 2006-02-08 | 上海广电(集团)有限公司中央研究院 | Method of image color enhancement |
CN102779330A (en) * | 2012-06-13 | 2012-11-14 | 京东方科技集团股份有限公司 | Image reinforcement method, image reinforcement device and display device |
JP2014033272A (en) * | 2012-08-01 | 2014-02-20 | Nikon Corp | Image processing apparatus, digital camera, image processing program, and image processing method |
CN103780797A (en) * | 2014-01-23 | 2014-05-07 | 北京京东方光电科技有限公司 | Image color enhancement method and device |
CN105069756A (en) * | 2015-08-10 | 2015-11-18 | 深圳市华星光电技术有限公司 | Image enhancing method |
CN109348202A (en) * | 2018-08-01 | 2019-02-15 | 深圳朗田亩半导体科技有限公司 | A kind of image saturation method of adjustment and device |
CN110047051A (en) * | 2019-04-24 | 2019-07-23 | 郑州轻工业学院 | A kind of non-uniform lighting colour-image reinforcing method |
CN111527748A (en) * | 2017-12-28 | 2020-08-11 | 三星电子株式会社 | Image processing apparatus, image processing method, and multi-screen display |
KR20200138972A (en) * | 2019-06-03 | 2020-12-11 | 창원대학교 산학협력단 | The apparatus and method of HDR imaging generation |
-
2022
- 2022-07-11 CN CN202210810323.1A patent/CN115330607B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1731451A (en) * | 2005-08-22 | 2006-02-08 | 上海广电(集团)有限公司中央研究院 | Method of image color enhancement |
CN102779330A (en) * | 2012-06-13 | 2012-11-14 | 京东方科技集团股份有限公司 | Image reinforcement method, image reinforcement device and display device |
JP2014033272A (en) * | 2012-08-01 | 2014-02-20 | Nikon Corp | Image processing apparatus, digital camera, image processing program, and image processing method |
CN103780797A (en) * | 2014-01-23 | 2014-05-07 | 北京京东方光电科技有限公司 | Image color enhancement method and device |
CN105069756A (en) * | 2015-08-10 | 2015-11-18 | 深圳市华星光电技术有限公司 | Image enhancing method |
CN111527748A (en) * | 2017-12-28 | 2020-08-11 | 三星电子株式会社 | Image processing apparatus, image processing method, and multi-screen display |
CN109348202A (en) * | 2018-08-01 | 2019-02-15 | 深圳朗田亩半导体科技有限公司 | A kind of image saturation method of adjustment and device |
CN110047051A (en) * | 2019-04-24 | 2019-07-23 | 郑州轻工业学院 | A kind of non-uniform lighting colour-image reinforcing method |
KR20200138972A (en) * | 2019-06-03 | 2020-12-11 | 창원대학교 산학협력단 | The apparatus and method of HDR imaging generation |
Non-Patent Citations (3)
Title |
---|
Po-Wen Hsieh,et al..Variational contrast-saturation enhancement model for effective single image dehazing.《Signal Processing》.2021,第192卷全文. * |
一种考虑多方向线性结构的灰度图像椒盐脉冲噪声滤波方法;石宝;《科技风》(第18期);全文 * |
轮廓波域内局部对比度增强的彩色图像灰度化算法;王冰雪;刘广文;刘美;陈广秋;;《液晶与显示》(第2期);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN115330607A (en) | 2022-11-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5481021B2 (en) | Heterogeneous color gamut mapping method and apparatus | |
CN1901681B (en) | Video display device | |
CN104299565B (en) | The low gray scale correction method and system of LED display | |
JP5611508B2 (en) | Ambient light adaptive color correction apparatus and method | |
JP4721610B2 (en) | Color flat panel display calibration method | |
CN101115211A (en) | Color independent reinforcement processing method | |
CN106504212A (en) | A kind of improved HSI spatial informations low-luminance color algorithm for image enhancement | |
WO2012030718A2 (en) | Calibration of display for color response shifts at different luminance settings and for cross-talk between channels | |
JP2009055465A (en) | Image processing device and method | |
KR20080033005A (en) | Apparatus and method for calibration of gray data | |
US8064693B2 (en) | Methods of and apparatus for adjusting colour saturation in an input image | |
CN103248793A (en) | Skin tone optimization method and device for color gamut transformation system | |
CN105898252A (en) | Television color adjustment method and device | |
CN109035175A (en) | Facial image Enhancement Method based on color correction and Pulse Coupled Neural Network | |
CN111107330A (en) | Color cast correction method for Lab space | |
CN115330607B (en) | Saturation enhancement method for color image | |
US7224833B2 (en) | Method for fast color saturation control | |
CN104599241B (en) | The colour consistency method that full automatic high efficiency calculates | |
JPH10173943A (en) | Color correcting method | |
JP2010130562A (en) | Color gamut expansion method and display device | |
CN104144332B (en) | Image color adjusting method and electronic device using the same | |
WO2022120799A1 (en) | Image processing method and apparatus, electronic device, and storage medium | |
CN101399898A (en) | Image processing method and apparatus | |
EP2802139B1 (en) | Image color adjusting method and electronic device using the same | |
EP1895781B1 (en) | Method of and apparatus for adjusting colour saturation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |