1. Field of the Invention
The present invention relates to a method of processing an image, more particularly, a method of adjusting chrominance vector of an image pixel.
2. Description of the Prior Art
By adjusting saturation an image can appear more vivid. The conventional method of adjusting saturation of an image is by increasing gain of chrominance vector of the image, which is equivalent to a method of chrominance vector of the image multiplying a saturation factor so that the image will appear to be more vivid.
However, the chrominance vector located in the color model is an intermediate width, and it is shaped like an olive, in other words, chrominance vector of an image changes accordingly to luminance of the image and it has different maximum chrominance vector value, therefore, before knowing the luminance of the image on the color model corresponding to the maximum chrominance vector, under the situation when the chrominance vector of the image multiples the saturation factor rashly, under the prior art method as mentioned above, if the degree of saturation factor is excessively small, the image will lose its original brightness; if the degree of saturation factor is oversized, then contour artifacts will appear on the image.
The main objective of the claimed invention relates to a method of adjusting an image pixel to a maximum vector to solve the above-mentioned problem.
The claimed invention relates a method of adjusting saturation of luminance-based video, the method comprising: generating a relation between luminance and maximum chrominance vectors in each sub-color palette.
These and other objectives of the claimed invention will no doubt become obvious to those of ordinary skill in the art after reading the following detailed description of the preferred embodiment that is illustrated in the various figures and drawings.
Please refer to
Step 102: start;
Step 104: separate a color palette 10 corresponding to a color model of a video image V into a plurality of sub-color palette 20, 22, 24, and 26;
(As shown in
Step 106: generate a relation between luminance and maximum chrominance vectors in each sub-color palette according to each sub-color palette 20, 22, 24, and 26 located at the color palette 10;
(Please refer to
as luminance Y1 is situated between 43 and 87, maximum chrominance vector (Cb1, Cr1) corresponding to luminance Y1 equals to
when luminance Y1 is greater than 87, maximum chrominance vector (Cb1, Cr1) corresponding to luminance Y1 equals to
Please refer to
when luminance Y2 is situated between 78 and 225, maximum chrominance (Cb2, Cr2) corresponding to luminance Y2 equals to
when luminance Y2 is greater than 225, maximum chrominance vector (Cb2, Cr2) corresponding to luminance Y2 equals to
Please refer to
when luminance Y3 is situated between 169 and 213, maximum chrominance (Cb3, Cr3) corresponding to luminance Y3 equals to
when luminance Y3 is greater 213, maximum chrominance vector (Cb3, Cr3) corresponding to luminance Y3 equals to
Please refer to
when luminance Y4 is situated between 30 and 179, maximum chrominance vector (Cb4, Cr4) corresponding to luminance Y4 equals to
when luminance Y4 is greater than 179, maximum chrominance vector (Cb4, Cr4) corresponding to luminance Y4 equals to
Step 108: generate saturation factor of the image pixel according to maximum chrominance vector corresponding to luminance of the image pixel; (For example, if luminance of an image pixel is 100, and chrominance vector (Cb, Cr) of the image pixel equals to (−30, 80), which means that chrominance vector (Cb, Cr) of the image pixel falls under the second sub-color palette 22, according to
The saturation factor is not greater than a smaller value of −56.4/−30 and 110.5/80, i.e., the upper bound of the saturation factor=minimum (−56.4/−30, 110.5/80)=minimum (1.88, 1.38)=1.38
Step 110: multiple chrominance vector (Cb, Cr) of the image pixel by the saturation factor generated in step 108; and
Step 112: end.
In the example in step 108, if the upper bound of the saturation factor is set to a smaller value of −56.4/−30 and 110.5/80, then step 110 will adjust chrominance vector of the image pixel to
so that the image pixel consists of a vivid color and the contour artifacts will not appear on the image. If the saturation factor is set to a value smaller than 110.5/80, after adjusting, although the contour artifacts do not appear on the image, the image will not show the most vivid color. If the saturation factor is set to a value greater than 110.5/80, after adjusting, although the image appears to be vivid, due to maximum chrominance vector corresponding to luminance exceeding 100, contour artifacts will appear, therefore the most ideal saturation factor is 110.5/80.
In the method 100, although video image V is represented as color model W, Cb, Cr) under CIE standard, however, the method of adjusting saturation of an image of the present invention is also capable of adjusting saturation of a video image of any color model presented. For example, the video image can be (U, V, W) of CIE standard, (Y, I, Q) of NTSC standard, (Y, U, V) of PAL standard, or (W, Pb, Pr) of digitized component. These color models have predetermined conversion formulae, in other words, the formulae existing in between any color model and corresponding color model can be applied. For example, in the formulae existing in between (R, G, B) and (Y, I, Q) of NTSC standard is
In comparison to the prior art, the method of adjusting saturation of an image of the present invention changes accordingly to luminance of the image pixel. Also by generating a saturation factor according to maximum chrominance vectors corresponding to luminance of the image pixel in each sub-color palette, and multiplying maximum chrominance vectors of the image pixel by the saturation factors. In this way, the image pixel, after adjusting, will consist of the best vivid colors and without showing any contour artifacts.
Those skilled in the art will readily observe that numerous modifications and alterations of the device and method may be made while retaining the teachings of the present invention. Accordingly, the above disclosure should be construed as limited only by the metes and bounds of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
094106097 | Mar 2005 | TW | national |