This application claims benefit under 35 U.S.C. § 119 from Korean Patent Application No. 2004-41352, filed on Jun. 7, 2004, the entire content of which is incorporated herein by reference.
1. Field of the Invention
The present general inventive concept relates to an apparatus and method of controlling saturation of a color image, and more specifically, to an apparatus and method of controlling saturation of an input color image, thereby providing an improved image quality.
2. Description of the Related Art
Generally, a conventional image processing apparatus has a problem in that color saturation is increased regardless of characteristics of an input image. For instance, if a user increases saturation of a background image of a scene displayed on a TV screen, a skin color of a character looks oversaturated and unnatural.
The saturation calculating unit 100 calculates saturation data S (x,y) of each pixel of an input image signal YCbCr. The histogram calculating unit 102 calculates a saturation histogram for all or part of pixels of the input image signal YCbCr according to the saturation data S (x,y) of each pixel provided from the saturation calculating unit 100. The peak saturation calculating unit 104 calculates a peak saturation value using the saturation histogram provided from the histogram calculating unit 102. The peak gain calculating unit 108 calculates a peak gain gpeak from the peak saturation value. The mean saturation calculating unit 106 calculates a mean saturation value using the saturation histogram provided from the histogram calculating unit 102. The mean gain calculating unit 110 calculates a mean gain gmean from the mean saturation value.
The pattern gain calculating unit 112 detects a test pattern image and a monotone image such as a bird flying in blue sky or sunset from the input image signal YCbCr. Therefore, the pattern gain calculating unit 112 calculates a gain gp for the test pattern image or the monotone image. The gain gp from the pattern gain calculating unit 112 is then transferred to the ultimate gain calculating unit 114.
The color gain calculating unit 116 calculates a color gain gc from the input image YCbCr depending on whether individual input pixel belongs to a skin color region. The color gain gc from the color gain calculating unit 116 is transferred to the ultimate gain calculating unit 114. In addition, a gain glocal for each pixel from the saturation calculating unit 100 is transferred to the ultimate gain calculating unit 114.
Then the ultimate gain calculating unit 114 calculates an ultimate gain according to the received gains, such as the color gain gc, the peak gain gpeak, the mean gain gmean, the gain gp, and the gain glocal and transfers the ultimate gain g (x,y) to the saturation control unit 118. The saturation control unit 118 controls the saturation of the input image YCbCr using the ultimate gain g (x,y) transferred.
The mean saturation of images having the histograms shown in
The second image having the histogram shown in
Third and fourth images having the histograms shown in
The present general inventive concept provides an apparatus and method of controlling saturation of a color image according to characteristics of an input image signal in order to adaptively control the saturation of the input image signal.
Additional aspects and advantages of the present general inventive concept will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the general inventive concept.
The foregoing and/or other aspects and advantages of the present general inventive concept may be achieved by providing a gain calculating apparatus including a saturation calculating unit to sequentially calculate saturation values of each pixel composing an input image, a histogram analysis unit to accumulate interval values, each interval value corresponding to the saturation value of pixel transferred from the saturation calculating unit and being allocated to a plurality of intervals, and to calculate a gain corresponding to a cumulative value of each interval, and a total gain calculating unit to calculate a total gain from the gains of the respective intervals that are transferred from the histogram analysis unit.
The foregoing and/or other aspects and advantages of the present general inventive concept may also be achieved by providing a method of calculating a gain, the method including sequentially calculating saturation values of each pixel composing an input image signal, accumulating interval values, each interval value corresponding to the saturation value of pixel transferred from the saturation calculating unit and being allocated to a plurality of intervals, calculating a gain corresponding to a cumulative value of each interval, and transferring the cumulative value, and calculating the total gain from the transferred gains of the respective intervals.
These and/or other aspects and advantages of the present general inventive concept will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
Reference will now be made in detail to the embodiments of the present general inventive concept, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to the like elements throughout. The embodiments are described below in order to explain the present general inventive concept while referring to the figures.
The saturation calculating unit 100 calculates a saturation value S (x,y) of each input pixel signal, for example, an input pixel signal YCbCr of an image signal. The saturation calculating unit 100 converts the input pixel signal YCbCr into an RGB signal as shown in <Equation 1> below.
(R,G,B)=(Y+a·Cr,Y+b·Cr+c·Cb,Y+d·Cb), <Equation 1>
wherein a, b, c and d are conversion coefficients. The saturation value S (x,y) is obtained by substituting the RGB signal into <Equation 2>]below.
wherein S is a normalized saturation value between 0 and 1. The saturation value S (x,y) calculated in the saturation calculating unit 100 is transferred to the histogram calculating unit 102.
The histogram calculating unit 102 obtains a saturation histogram for all or part of pixels from the saturation value S (x,y) for each individual pixel provided from the saturation calculating unit 100.
The histogram analysis unit 400 accumulates the transferred values in frame unit so that the transferred values forming the frame unit are allocated into the corresponding ones of the ten intervals. The histogram analysis unit 400 allocates the transferred values of the ten intervals into a plurality of second intervals each including at least one of the ten intervals. For example, since the number of the plurality of the second intervals is smaller than that of the first intervals, i.e., ten intervals, the transferred value of one of the ten intervals can be allocated into adjacent second intervals. That is, the transferred value of one of the ten intervals can be accumulated or counted in the adjacent second intervals. The histogram analysis unit 400 calculates a gain for each interval according to the number of the counted transferred values. For instance, in
Each of the gains outputted from the histogram analysis unit 400 is transferred to the total gain calculating unit 402. Then, the total gain calculating unit 402 calculates a total gain from the gains transferred.
The histogram analysis unit 400 accumulates values transferred from the histogram calculating unit 102.
The histogram dividing part 600 divides the transferred values into a plurality of intervals, and accumulates them in each interval. <Table 1> below illustrates that the histogram dividing part 600 accumulates the transferred values in each second interval.
To remove a boundary effect, the histogram dividing part 600 sets the second intervals in such a manner that they overlap each other. The histogram dividing part 600 transfers the cumulative values in each interval to corresponding ones of the saturation gain calculating parts 602 through 608. For instance, the cumulative value in the interval IV is transferred to the high saturation gain calculating part 602, and the cumulative value in the interval III is transferred to the 2nd mid saturation gain calculating part 604. Likewise, the cumulative value in the interval II is transferred to the 1st mid saturation gain calculating part 606, and the cumulative value in the interval I is transferred to the low saturation gain calculating part 608.
Each of the saturation gain calculating parts 602 through 608 calculates a saturation gain of each interval using the transferred cumulative value. <Equation 3> below formulates the operation performed in each of the saturation gain calculating parts 602 through 608.
Distribution of frequency (i)=(Cumulative value of interval (i))/(Total cumulative value) where 0≦i≦3. [Equation 3]
Each of the saturation gain calculating parts 602 through 608 stores a gain for the distribution of frequency. <Table 2> below shows the gains for the distribution of frequency that are stored in the saturation gain calculating parts 602 through 608, respectively.
As shown in the <Table 2>, saturation enhancement is supposed to be low in a case of either high or low saturation images, or images having high and low saturation. Therefore, the lower the distribution of frequency is, the higher the gain value is. In a case of an image having mid saturation, on the other hand, the saturation enhancement should be relatively high. Thus, the higher the distribution of frequency is, the higher the gain value is. The low saturation gain is denoted as GAIN_1, and the high saturation gain is denoted as GAIN_3. The 1st mid saturation gain is denoted as GAIN_1, and the 2nd mid saturation gain is denoted as GAIN_2.
The gains that are calculated in the saturation gain calculating parts 602 through 608 are transferred to the saturation gain calculating part 610. Then, the saturation gain calculating part 610 calculates a total gain from the transferred gains. <Equation 4> below formulates the operation performed in the saturation gain calculating part 610.
wherein gtotal(x,y) indicates a total gain outputted from the saturation gain calculating part 610. The total gain outputted from the saturation gain calculating part 610 is transferred to the mean cumulative calculating part 612.
The mean cumulative calculating part 612 accumulates the total gains gtotal(x,y) from the saturation gain calculating part 610 for several frames, and outputs a mean thereof. In this manner, the mean cumulative calculating part 612 is able to accumulate many frames, given that there are only small changes in the image screen. The output gglobal(x,y) from the mean cumulative calculating part 612 is then transferred to the ultimate gain calculating unit 114.
In fact, there are other gain values that are transferred to the ultimate gain calculating unit 114. According to
The saturation calculation unit 100 calculates a local gain glocal (x,y) for each individual pixel using the saturation value of each pixel and a gain function. According to the gain function, a pixel having a high saturation has a small gain value. As such, gamut mapping can be minimized, a gamut mapping block (this often causes a problem in color image processing) can be avoided, and a color change due to the gamut mapping can be prevented. If there is no restriction for a memory, the local gains glocal (x,y) for each pixel from the saturation calculating unit 100 can be stored in a separate memory.
The pattern gain calculating unit 112 detects a text image or a monotone image from the input pixel signal YCbCr or the RGB signal, and reflects the detected image to the gain. The test image or the monotone image exhibits a relatively high saturation component, compared to natural images. As shown in <Equation 5> below, the pattern gain calculating unit 112 calculates an absolute value of a difference between the number of pixels of two neighboring saturation values in a histogram interval, and averages the absolute value to output an average value P.
P=1/N|H(i)−H(i+1)| [Equation 5]
where H(i) indicates the number of pixels of the i-th saturation.
The pattern gain calculating unit 112 calculates a pattern gain gp(x,y) using the average value P from the <Equation 5> and the pattern gain function of
Further, if an input image has the average value P between THLow and THHigh, the image corresponds to the monotone image. Since an excessive increase in chroma deteriorates the image quality, the pattern gain calculating unit 112 calculates the pattern gain gp(x,y) inversely proportional to the P. The pattern gain gp(x,y) from the pattern gain calculating unit 112 is then transferred to the ultimate gain calculating unit 114.
The color gain calculating unit 116 calculates a color gain gc(x,y) depending on whether each individual pixel of an input image belongs to a skin color region. To decide whether an input pixel belongs to the skin color region, the color gain calculating unit 116 may determine whether a YCbCr color space is located in the skin color region. A process of determining whether the YCbCr color space is located in the skin color region will be omitted here since the determining process is well known. The color gain gp(x,y) from the color gain calculating unit 116 is transferred to the ultimate gain calculating unit 114.
The ultimate gain calculating unit 114 calculates an ultimate gain g(x, y) using the transferred gains. <Equation 6> below formulates the operation performed in the ultimate gain calculating unit 114.
g(x,y)=1+ggloval(x,y)·gp(x,y)·glocal(x,y)·gc(x,y), [Equation 6]
wherein g(x, y) indicates the ultimate gain calculated in the ultimate gain calculating unit 114. According to
The ultimate gain g(x, y) from the ultimate gain calculating unit 114 is transferred to the saturation control unit 118. Then, the saturation control unit 118 controls the saturating of an input image using the ultimate gain g(x, y) provided from the ultimate gain calculating unit 114. <Equation 7> below formulates the operation performed on the saturation control unit 118.
YCbCrEnH(x,y)=(Y(x,y), g(x,y)·Cb(x,y), g(x,y)·Cr(x,y)) [Equation 7]
As described above, a problem occurring when a mean gain and a peak gain of an existing image are applied to a conventional saturation control process can be solved by dividing the input image according to saturations and allocating different gains to the saturations. As a result, sharp and vivid color images can be obtained.
Although a few embodiments of the present general inventive concept have been shown and described, it will be appreciated by those skilled in the art that changes may be made in these embodiments without departing from the principles and spirit of the general inventive concept, the scope of which is defined in the appended claims and their equivalents.
Number | Date | Country | Kind |
---|---|---|---|
2004-41352 | Jun 2004 | KR | national |