Patent application title: Color enhancement for graphic images
Shengqi Yang (Chandler, AZ, US)
Tiehan Lu (Chandler, AZ, US)
IPC8 Class: AG06K936FI
Class name: Image analysis color image processing color correction
Publication date: 2009-12-31
Patent application number: 20090324071
A color enhancement system may enhance color components in an image. In
one embodiment, the color enhancement system suppresses banding by
combining an input color value with an enhanced colored value. In another
embodiment, local variation in saturation values around a pixel may be
used to determine a modification of an input saturation value for color
enhancement. As still another embodiment, flickering between frames may
be suppressed by combining a histogram that counts the number of times a
given pixel value occurs in a particular image with a historical
histogram that keeps track of an average of how often given values have
occurred in previous frames.
1. A method comprising:suppressing color banding by combining an original
saturation value with a color enhanced value.
2. The method of claim 1 including using a weighted average of said original and color enhanced values.
3. The method of claim 1 including measuring the variation between a pixel and its neighbors to develop a measure of saturation enhancement.
4. The method of claim 3 including recording in a histogram counts of saturation values encountered within an image.
5. The method of claim 4 including changing the count based on the variation between a saturation value of a given pixel and the saturation values of its neighbors.
6. The method of claim 5 including combining a historical histogram with a histogram for a current image to develop a histogram to modify an input saturation.
7. A method comprising:adjusting the saturation of an image based on the variation in saturation values between pixels in the image and the neighbors of those pixels.
8. The method of claim 7 including using a histogram to keep track of the number of occurrences of saturation values of pixels within an image.
9. The method of claim 8 including changing the count based on the local variation between a given pixel and its neighbors.
10. The method of claim 9 including using a modified histogram based on the changed count and a historical histogram taken over previous images and blending the historical and modified histograms.
11. The method of claim 10 including using a weighted average of the historical and modified histograms to form a blended histogram.
12. The method of claim 11 including using the blended histogram to modify the saturation values of input pixels.
13. A method comprising:developing a current histogram of the occurrence of color values of pixels in an image;maintaining a historical histogram that stores the color values of previously analyzed images; andblending the historical and current histograms.
14. The method of claim 13 wherein developing a histogram includes developing a histogram of color values that are saturation values.
15. The method of claim 13 including using a weighted average to blend said current histogram and said historical histogram to form a blended histogram.
16. The method of claim 15 including storing the blended histogram as the new historical histogram.
17. An apparatus comprising:a unit to generate an enhanced saturation value for a plurality of pixels; anda banding suppression device coupled to said unit and to receive an input saturation value to combine the input saturation value with the enhanced saturation value to create an output saturation value.
18. The apparatus of claim 17, said device to generate a weighted average of the input saturation value and the color enhanced saturation value.
19. The apparatus of claim 17 including a device to measure local saturation variance between a pixel and its neighbors.
20. The apparatus of claim 19, said unit to develop a histogram of saturation values encountered within an image.
21. The apparatus of claim 20, said unit to develop a histogram to change the histogram count based on the variation between a given pixel and the saturation values of its neighbors.
22. The apparatus of claim 21, said unit to develop a histogram to combine an historical histogram with a histogram for a current image to develop a histogram to modify an input saturation.
23. The apparatus of claim 17 wherein device is a processor.
24. The apparatus of claim 23 wherein said device is a graphics processor.
25. The apparatus of claim 24, said graphics processor to adjust the saturation of an image based on the variation in saturation values between pixels in the image and the neighbors of those pixels.
26. The apparatus of claim 24, said graphics processor to develop a current histogram of the occurrence of color values of pixels in an image, to maintain an historical histogram that stores the color values of previously analyzed images, and to blend the historical and current histograms.
This relates generally to image processing and to techniques for improving the quality of images displayed in computed-based systems.
One of the tasks of the video post-processing pipeline is automatic color enhancement. In the hue, saturation, luminance (HSL) color space there are two different aspects that can be changed for color enhancement, hue adjustment and saturation adjustment. A typical hue adjustment example is the facial tone correction by moving the phase of the chrominance signal closer to the phase of the corresponding facial tones. While phase errors in the facial tone are reduced, the phase errors for other color components may be increased.
Color saturation may also be important because saturated colors are more appealing to the user's eye. To obtain a more vivid image, the basic approach of adjusting saturation of an image is by increasing the gain of the chrominance vector of the image. This operation is equivalent to multiplying the original chrominance vector by a saturation vector. Traditionally, color enhancers normally use a preset and fixed saturation factor, regardless of the input image characteristics. For less saturated video images, vivid effects can be obtained by applying a fixed saturation factor. However, for already saturated video images, over-saturation and loss of image details may result from over-saturation adjustment.
In addition, color banding may occur when directly increasing color saturation. Color banding occurs when a display is unable to render smooth color gradients and, instead, presents stripes or bands of colors, especially in very light or very dark areas.
BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 is a schematic depiction of one embodiment of the present invention;
FIG. 2 is a flow chart for the embodiment shown in FIG. 1; and
FIG. 3 is a system depiction for one embodiment.
Referring to FIG. 1, a color enhancement system 10 may operate only on saturation in a hue, luminance, saturation (HSL) color space. The value for input luminance and input hue may be unaffected by the system 10. Instead, only the input saturation may be modified in some embodiments. In some embodiments, the saturation enhancement is similar to a contrast enhancement.
Initially, a histogram is initialized. The histogram may be initialized by applying the same numbers to all entries within the histogram. In some embodiments, where the possible saturation values are from 0 to 255, each value may be given an initial entry of, for example, 500. In some embodiments, instead of using all 256 values, only 64 values are used, so that the saturation values are grouped. For example, saturation values 0 to 3, 4 to 7, etc. may be separate groups. The histogram basically keeps track of how many times a given value from 0 to 255 is encountered within the pixels in the input image. Thus, after initializing the histogram in block 22, the local variance is measured in block 24.
To measure the local variance, for each pixel, the saturation similarity between the central pixel and its neighbors is measured. For example, in one embodiment, the central pixel can be compared to four neighbors or eight neighbors, as desired. To do the comparison, the saturation values of the central pixel is compared to the average of the saturation values of its neighbors. As an example, the sum of absolute difference between the saturation values of the central pixel and its surrounding pixels may be determined. If the sum is higher than a predefined threshold, for example 50, the central pixel can be treated as a pixel coming from a non-uniform region, in terms of color saturation. Accordingly, the entry in the histogram, which corresponds to this pixel value, may be increased, for example, by one. If the sum is lower than the threshold, then, most probably, the pixel comes from a region of uniform saturation. In this case, in one embodiment, the value of the entry corresponding to this pixel's saturation is not changed.
After scanning the whole image, pixel by pixel, a histogram records the counts of each potential saturation value, for example, from 0 to 255. The histogram indicates how many pixels in the image have a particular saturation value. However, the histogram is slightly skewed because the values of pixels with local color variation are actually increased. The resulting histogram, indicated in block 20, is then combined with a history histogram maintained in a history saturation lookup table (LUT) 16. By blending, at block 18, the updated histogram (block 20) with the historical histogram (block 16), the size of the saturation change may be reduced and flickering effects between neighboring frames may be reduced in some embodiments.
In one embodiment, a weighted average of the new histogram (block 20) and the historical histogram (block 16) may be used for blending. For example, in one embodiment, the current histogram is weighted as 7/16 and the historical histogram is weighted as 9/16. The new histogram may then be stored back in the historical saturation lookup table 16. In one embodiment, the blending of the historical and current histograms may be done by alpha blending using a weighted average. The exact value of the weights or the use of weights is subject to considerable variation.
Then, the new histogram that is blended from the new data and the historical data is stored as the new lookup table 16 and then is used to adjust the input saturation in the local copy saturation lookup table 12. The lookup table 12 may store a local copy of the historical saturation lookup table stored at 16. In addition, the local copy may be transformed to provide a value for every possible saturation level from 255. Thus, while the saturation lookup table 16 may only have a value for each group of saturation values, say from 0 to 3 and 4 to 7 and so on, interpolation may be used to develop histogram values for each of 0 to 255 possible values in one embodiment.
Using the lookup table (block 12), the input saturation values are adjusted. Histogram equalization is performed for the input image based on the updated local histogram.
In some embodiments, the output of local copy saturation lookup table 12 can then be used as the output saturation value. However, it is also advantageous for banding suppression to modify the local copy saturation lookup table 12 output values by blending the new value with the input saturation value in the banding suppression block 14. In some embodiments, a weighted average of the input saturation values and the values from the local copy saturation lookup table 12 may be used in block 14. As a result, color banding may be suppressed in some embodiments.
As a result, in some embodiments, saturation is made more even, the saturation contrast may be improved, and the difference between a pixel and its neighbors may be increased in some cases.
A flow chart, in FIG. 2, shows one sequence 26 for implementing the functions depicted in FIG. 1. In some embodiments, the color enhancement system 10 may be implemented in software using a storage device to store computer readable instructions which, when executed, cause the functions depicted in FIG. 1 to be accomplished. In other embodiments, hardware may be used for this purpose.
Initially, the local copy saturation lookup table 12 is initialized and defined, as indicated in block 28. In addition, the saturation lookup table 16 that stores the historical histogram may be defined and initialized at block 30. Then, for each pixel in the image, the local variation is measured, as indicated in block 32. If the local variation is less than or equal to a predefined threshold PT, as determined in diamond 34, the pixel value PV is increased by one, as indicated in block 36. The flow iterates until the last pixel in the image has been processed, as indicated in diamond 38.
At this time, the information may be normalized to provide 256 interpolated values from a smaller number of values, such as 64, as described above, as indicated in block 40. Then, the new histogram is blended with the historical histogram, as indicated in block 42. The output luminance is set equal to the input luminance in block 44. The output hue is set equal to the input hue in block 46. In block 48, the output saturation is set equal to the historical lookup table value stored in the local copy saturation lookup table 12. Then, in block 50, the local copy saturation lookup table value and the input saturation value are blended. When the last pixel is completed, as determined in diamond 52, the flow ends.
Turning next to FIG. 3, a graphics processor 112 may include a video post-processing pipeline that accomplishes the functional blocks of FIG. 1 in one embodiment. The graphics processor 112 may be coupled to a frame buffer 114 by a bus 106. The frame buffer 114 may be coupled to a display screen 118 to display the images produced by the graphics processor 112. Buses 107 and 108 are coupled to the display screen 118 which is also coupled to a keyboard or mouse 120.
The graphics processor 112 is coupled by a bus 105, in one embodiment, to a chipset core logic 110 that couples the main processor 100 and storage 130 by a bus 104. The storage 130 may include a main memory 132, hard drives 134, and removable optical or magnetic media 136 in some embodiments. In some embodiments, the sequence 26 depicted in FIG. 2 may be implemented in software and may be stored in the region 139 of the main memory 132. However, the present invention is not limited to software embodiments. The main memory 132 may also store the various lookup tables indicated in FIG. 1, in some embodiments of course the storage may be in any other storage device or within components such as the main processor 100 or graphics processor 112 in some embodiments.
The graphics processing techniques described herein may be implemented in various hardware architectures. For example, graphics functionality may be integrated within a chipset. Alternatively, a discrete graphics processor may be used. As still another embodiment, the graphics functions may be implemented by a general purpose processor, including a multicore processor.
References throughout this specification to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one implementation encompassed within the present invention. Thus, appearances of the phrase "one embodiment" or "in an embodiment" are not necessarily referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be instituted in other suitable forms other than the particular embodiment illustrated and all such forms may be encompassed within the claims of the present application.
While the present invention has been described with respect to a limited number of embodiments, those skilled in the art will appreciate numerous modifications and variations therefrom. It is intended that the appended claims cover all such modifications and variations as fall within the true spirit and scope of this present invention.
Patent applications by Shengqi Yang, Chandler, AZ US
Patent applications by Tiehan Lu, Chandler, AZ US
Patent applications in class Color correction
Patent applications in all subclasses Color correction