The present invention relates to a technique for enabling a color correction to be implemented using RGB data, and more specifically, to a method for correcting a color using RGB data to implement the color correction using RGB data without a color space conversion for the color correction.
In general, an image display device such as a color television receiver, a beam projector and a color printer receives and decodes a color signal and reproduces an original image through a display device, e.g., an LCD panel.
However, since a color distortion is caused in the color signal received in the image display device due to various factors, a color correction is requested. Moreover, the image display device requests to compensate for a short portion of primary colors or a color correction of a visual sensation caused by a difference of color views depending on people.
In a conventional color correction method, data of a red color, a green color and a blue color (hereinafter, it is referred to as ‘RGB’) is converted into a color space, a color correction for adjusting a color saturation and hue, and a color-corrected color space is converted into RGB data.
As described above, when the RGB data is converted into the color space to implement a color correction using the conventional color correction method, the color loss may occur in a conversion of the RGB data.
The present invention is directed to a method for correcting a color using RGB data to implement the color correction using RGB data without a color space conversion for the color correction.
In accordance with an embodiment of the present invention, a method for correcting color using red color, green color and blue color (RGB) data includes steps of: extracting a start hue value of color coordinates from RGB input data; extracting an end hue value, which is finally modified by a color correction matrix user, from the start hue value according to each hue control value of a red color, a green color, a blue color, a yellow color, a cyan color and a magenta color (RGBYCM); converting input values R G and B, according to the end hue value, using a conversion formula for the corresponding input hue value among R, G and B conversion formulas; extracting a final saturation value from the end hue value according to an RGBYCM saturation control value; and calculating values of R, G and B according to modified start hue value, using an RGB color saturation value conversion formula.
The present invention prevents a color loss in a color correction process by implementing a color correction using RGB data without a color space conversion for the color correction.
Hereinafter, various embodiments will be described below n more detail with reference to the accompanying drawings.
Referring to
Firstly, a start hue value for RGB input data is extracted at the step of S1. The start hue value represents a hue value of a color coordinate according to RGB input value, and more specifically, represents a hue control value determined by an angle of the color coordinate. The start hue value (color coordinate value) {circle around (a)} may be obtained using a color formula according to a maximum/minimum value of RGB as shown in
In case that a maximum value Max of a corresponding pixel (input data) is a red color (hereinafter, the red color is referred to as ‘R’), and a minimum value Min of the corresponding pixel is a blue color (hereinafter, the blue color is referred to as ‘B’), the start hue value is calculated using the hue formula of “60×(Mid−Min)/(Max−Min)”, where the Max denotes a maximum value among the RGB, the Mid denotes an intermediate value among the RGB, and the Min denotes a minimum value among the RGB.
Ranges of the maximum value Max the intermediate value Mid and the minimum value Min are determined by input bits. For example, if an input bit is 8 bit, the above-mentioned ranges are 255 determined by “28−1”. In another example, if an input bit is 10 bit the above-mentioned ranges are 1023 determined by “210−1”. The maximum value Max the intermediate value Mid and the minimum value Min are determined by the RGB input data.
Moreover, if the maximum value Max of the corresponding pixel is a green color (hereinafter, it is referred to as ‘G’), the start hue value {circle around (a)} is calculated using the hue formula of “60×(2+Mid−Min)/(Max−Min))”. If the maximum value Max of the corresponding pixel is B, the start hue value @ is calculated using the hue formula of “60×(4+(Mid−Min)/(Max−Min))”. If the maximum value Max of the corresponding pixel is R and the minimum value Min of the corresponding pixel is G, the start hue value {circle around (a)} is calculated using the hue formula of “360−60×(Mid−Min)/(Max−Min)”.
Then, at the step S2, an end hue value {circle around (b)} is extracted from the start hue value {circle around (a)} according to each hue control value of a red color, a green color, a blue color, a yellow color, a cyan color and a magenta color (hereinafter, it is referred to as “RGBYCM”). The end hue value {circle around (b)} is finally modified by a color correction matrix user. That is, the end hue value {circle around (b)} is a color-corrected hue vale.
Subsequently, the RGB according to the end hue value {circle around (b)} is converted using R, G and B conversion formulas such as the table shown in
That is, if the end hue value {circle around (b)} is ranged from 0 to 60, a maximum value Max is R and a minimum value Min is B, G of an intermediate value Mid is obtained by G conversion formula of “G=Min+({circle around (b)}/60)×(Max−Min)”. Herein, “Min” represents B as the minimum value among RGB, “Max” represents R as the maximum value among RGB, and “end hue value {circle around (b)}” represents a final hue value which the color correction matrix user wants finally. For example, if the color correction matrix user wants to convert a yellow color of the start hue value into a red color of the end hue value, a hue value of the yellow color is 30 (angle of color coordinate=30 degree) and a hue value of the red color is 0 (angle of color coordinate=0 degree).
Moreover, if the end hue value {circle around (b)} is ranged from 60 to 120, a maximum value Max is G and a minimum value Min is B, R of an intermediate value Mid is obtained by R conversion formula of “R=Min−({circle around (b)}/60−2)×(Max−Min)”.
If the end hue value {circle around (b)} is ranged from 120 to 180, a maximum value Max is G and a minimum value Min is R, B of an intermediate value Mid is obtained by B conversion formula of “B=Min−({circle around (b)}/60−2)×(Max−Min)”.
If the end hue value {circle around (b)} is ranged from 180 to 240, a maximum value Max is B and a minimum value Min is R, G of an intermediate value Mid is obtained by G conversion formula of “G=Min−({circle around (b)}/60−4)×(Max−Min)”.
If the end hue value {circle around (b)} is ranged from 240 to 320, a maximum value Max is B and a minimum value Min is G R of an intermediate value Mid is obtained by R conversion formula of “R=Min−({circle around (b)}/60−4)×(Max−Min)”.
If the end hue value {circle around (b)} is ranged from 320 to 360, a maximum value Max is R and a minimum value Min is G, B of an intermediate value Mid is obtained by B conversion formula of “B=Min−({circle around (b)}−360)/60)×(Max−Min)”.
As described above, R of the intermediate value Mid, G of the intermediate value Mid and B of the intermediate value Mid are obtained to control the intermediate value Mid. That is, a hue control represents to change a hue value, and a saturation control represents to change a density value of a color. Basically, the saturation depends on a difference between the maximum value and the minimum value, the color depends on an existing position of the intermediate value between the maximum value and the minimum value. Thus, the intermediate value is obtained such that the intermediate value exists at a near position to the maximum value or at a near position to the minimum value.
Subsequently, a final saturation value is extracted at the end hue value {circle around (b)} according to an RGBYCM saturation control value at the step S4. The “final saturation value” is a color saturation value, which is finally changed by the color correction matrix user as described in the step S2.
Next, as shown in
Since the hue then the saturation is modified, the end hue value {circle around (b)} at the step S3 becomes the start hue value {circle around (a)} of the saturation value at the step S5.
The intermediate value of R, G and B is not modified, a maximum value of the RGB color saturation value conversion formulas is modified using “Max+{circle around (b)}×(Max−Mid)/(Max×(Max−Min)”, and a minimum value of the RGB color saturation value conversion formulas is modified using “Min−{circle around (b)}+(Max−Mid)/(Max−Min)”. Herein, “Max” represents a maximum value among R, G and B, “Mid” represents an intermediate value among R, G and B, and “Min” represents a minimum value among R, G and B. For example, the intermediate value among R, G and B represents G value in case of R:100/G:50/B:0.
For example, if the maximum value is R and the start hue value {circle around (a)} is ranged from 0 to 60, the maximum value R is modified using the conversion formula of “Max+{circle around (b)}×(Max−Mid)/(Max×(Max−Min), and the minimum value B is modified using the conversion formula of “Min−{circle around (b)}+(Max−Mid)/(Max−Min)”. Herein, the intermediate value G is not modified.
Although various embodiments have been described for illustrative purposes, it will be apparent to those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the following claims.
Number | Date | Country | Kind |
---|---|---|---|
10-2013-0075129 | Jun 2013 | KR | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/KR2014/005661 | 6/25/2014 | WO | 00 |