The accompanying drawings are included to provide a further understanding of the invention, and are incorporated in and constitute a part of this specification. The drawings illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
Reference will now be made in detail to the present preferred embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers are used in the drawings and the description to refer to the same or like parts.
The first image conversion unit 101 is used to receive an input image signal SI, which can be an RGB image signal, and convert the RGB image signal SI into a brightness signal Y and a first chrominance signal Cb/Cr, where the first chrominance signal Cb/Cr is a complex signal on a color gamut formed by a real component Cb and an imaginary component Cr.
The CORDIC unit 103 is used to compute the first hue angle θ corresponding to the first chrominance signal Cb/Cr as tan−1(Cr/Cb). The color partition operation unit 105 is coupled to the CORDIC unit 103 and generates a second hue angle θ′ corresponding to the first hue angle θ when the first chrominance signal falls in an adjustment area that is generated based on a control signal CS.
The color partition operation unit 105 includes a partition unit 105a and an operation unit 105b. The partition unit 105a is coupled to the CORDIC unit 103 and used to generate N color areas on the color gamut with N reference color axes, where N is a positive integer, and to select one or more color areas as the adjustment area that is based on the control signal CS. For example, six reference color axes red (R), green (G), blue (B), cyan (C), yellow (Y) and magenta (M) may be used to generate six color areas MB, BC, CG, GY, YR and RM on the color gamut.
Based on the control signal CS, one of the reference color axis, for example, the reference color axis R, is selected to be rotated. Further, based on the reference color axis that is selected to be rotated, the color areas next to the reference color axis, for example, two color areas YR and RM, are defined as the adjustment area.
The operation unit 105b is coupled to the partition unit 105a and used to process the first chrominance signal Cb/Cr when falling in the adjustment area to output a second hue angle θ′ corresponding to the first hue angle θ. The second hue angle θ′ is obtained by the operation unit 105b using, for example, linear interpolation, linear extrapolation, quadratic equation, cubic equation or any combination thereof.
The hue rotation unit 107 is coupled to the color partition operation unit 105 to rotate the first chrominance signal Cb/Cr by the second hue angle θ′ and to output a second chrominance signal Cb′/Cr′.
The second image conversion unit 109 is coupled to the hue rotation unit 107 to convert the brightness signal Y obtained by the first image conversion unit 101 and the second chrominance signal Cb′/Cr′ into an output image signal SO, which can be an RGB signal.
Note that, in the embodiment, if the input image signal SI is a YCbCr image signal, both the first image conversion unit 101 and the second image conversion unit 109 can be skipped.
In the embodiment, once the hue adjustor 10 receives the input image signal SI, the first image conversion unit 101 converts the input image signal SI into the brightness signal Y and the first chrominance signal Cb/Cr. The CORDIC unit 103 can accord the first chrominance signal Cb/Cr to compute the corresponding first hue angle θ and to output the first hue angle θ to the partition unit 105a.
When a user wants to adjust a specific color, for example, the red color (but not limited to a single color), the partition unit 105a can receive a control signal CS, and, based on the control signal CS, select the reference color axis and rotate the reference color axis R by an angle a to make a new reference axis r′ and to generate an adjustment area MY.
In this example, the adjustment area MY is formed by the two color areas next to the reference color axis R, i.e., the color area MR (between the reference color axis M and the reference color axis R) and the color area RY (between the reference color axis R and the reference color axis Y). The operation unit 105b performs operations on the first hue angles θ when falling in the adjustment area MY to output the second hue angle θ′.
The second hue angle θ′ are computed by, for example, the following linear interpolation equations (1) and (2):
θ′=[θ/Angle(MR)]·Angle(Mr′) when the first hue angle θ falls in the color area MR (1)
θ′=[θ/Angle(RY)]·Angle(r′Y) when the first hue angle θ falls in the color area RY (2)
where θ and θ′ are the first and second hue angles corresponding to the first chrominance signal Cb/Cr, Angle(MR) is the included angle between the reference color axis M and the reference color axis R, Angle(Mr′) is the included angle between the reference color axis M and the reference color axis r′, Angle(RY) is the included angle between the reference color axis R and the reference color axis Y and Angle(r′Y) is the included angle between the reference color axis r′ and the reference color axis Y.
When the first chrominance signal Cb/Cr falls in the color area MR between the reference color axis M and the reference color axis R, the second hue angle θ is computed by the equation (1); when the first chrominance signal Cb/Cr falls in the color area YR between the reference color axis Y and the reference color axis R, the second hue angle θ′ is computed by the equation (2). Furthermore, linear extrapolation, quadratic equations, cubic equations or any combination thereof can be also used to obtain the second hue angle θ′.
After that, the hue rotation unit 107 can rotate the first chrominance signal Cb/Cr when falling in the adjustment area by the second hue angle θ′ to output the second chrominance signal Cb′/Cr′, as well known in the field. In the embodiment, the hue rotation unit 107 can obtain the second chrominance signal Cb′/Cr′ based on the following equations (3) and (4):
Cb′=Cb·sin θ′+Cr·cos θ′ (3)
Cr′=Cr·sin θ′+Cb·cos θ′ (4)
The second image conversion unit 109 can then convert the brightness signal Y and the second chrominance signal Cb′/Cr′ into an output image signal SO which can be an RGB signal for output.
In the first embodiment, the second hue angle in step S305 is computed, for example, by using linear interpolation, linear extrapolation, quadratic equation, cubic equation or any combination thereof; and the adjustment area in step S305 is determined by, based on a reference color axis that is selected to be rotated, choosing the color areas next to the reference color axis selected to be rotated.
The first image conversion unit 102′ is used to receive an input image signal SI′, which can be an RGB image signal, and convert the RGB image signal SI′ into a first hue angle θ1 and other component OC.
The color partition operation unit 105′ is coupled to the first image conversion unit 102′ and generates a second hue angle θ1′ corresponding to the first hue angle θ1 when the first hue angle θ1 falls in an adjustment area that is generated based on a control signal CS′.
The color partition operation unit 105′ includes a partition unit 105a′ and an operation unit 105b′. The partition unit 105a′ is coupled to the first image conversion unit 102′ and used to generate X color areas on the color gamut with X reference color axes, where X is a positive integer, and to select one or more color areas as the adjustment area that is based on the control signal CS′. For example, in case of X=6, six reference color axes red (R′), green (G′), blue (B′), cyan (C′), yellow (Y′) and magenta (M′) may be used to generate six color areas M′B′, B′C′, C′G′, G′Y′, Y′R′ and R′M′ on the color gamut.
Based on the control signal CS′, one of the reference color axis, for example, the reference color axis R′, can be selected to be rotated. Further, based on the reference color axis that is selected to be rotated, the color areas next to the reference color axis, for example, two color areas Y′R′ and R′M′, are defined as the adjustment area.
The operation unit 105b′ is coupled to the partition unit 105a′ and used to process the first hue angle θ1 when falling in the adjustment area to output a second hue angle θ1′ corresponding to the first hue angle θ1. The second hue angle θ1′ is obtained by the operation unit 105b′ using, for example, linear interpolation, linear extrapolation, quadratic equation, cubic equation or any combination thereof.
The hue angle processing unit 106′ is coupled to the color partition operation unit 105′ for generating a third hue angle θ1″ based on the first hue angle θ1 and the second hue angle θ1′, for example, by adding the first hue angle θ1 and the second hue angle θ1′.
The second image conversion unit 108′ is coupled to the hue angle processing unit 106′ to convert the third hue angle θ1″ and other component OC into an output image signal SO′, which can be an RGB signal.
In the second embodiment, when the hue adjustor 10′ receives the input image signal SI′, the first image conversion unit 102′ converts the input image signal SI′ into the first hue angle θ and other component OC.
When a user wants to adjust a specific color, for example, the red color (but not limited to a single color), the partition unit 105a′ receives a control signal CS′, and, based on the control signal CS′, selects the reference color axis and rotates the reference color axis R′ by an angle α′ to make a new reference axis r1′ and to generate an adjustment area M′Y′.
In this example, the adjustment area M′Y′ is formed by the two color areas next to the reference color axis R′, i.e., the color area M′R′ (between the reference color axis M′ and the reference color axis R′) and the color area R′Y′ (between the reference color axis R′ and the reference color axis Y′). The operation unit 105b′ performs operations on the first hue angle θ1 when falling in the adjustment area M′Y′ to output the second hue angle θ1′.
The second hue angle θ1′ are computed by, for example, the following linear interpolation equations (3) and (4):
θ1′=[θ1/Angle(M′R′)]·Angle(M′r1′) when the first hue angle θ1 falls in the color area M′R′ (5)
θ1′=[θ1/Angle(R′Y′)]·Angle(r1′Y′) when the first hue angle θ1 falls in the color area R′Y′ (6)
where θ1 and θ1′ are the first and second hue angles, Angle(M′R′) is the included angle between the reference color axis M′ and the reference color axis R′, Angle(M′r1′) is the included angle between the reference color axis M′ and the reference color axis r1′, Angle(R′Y′) is the included angle between the reference color axis R′ and the reference color axis Y′ and Angle(r1′Y′) is the included angle between the reference color axis r1′ and the reference color axis Y′.
When the first hue angle θ1 falls in the color area M′R′ between the reference color axis M′ and the reference color axis R′, the second hue angle θ1′ is computed by the equation (5). Or, when the first hue angle θ1 falls in the color area Y′R′ between the reference color axis Y′ and the reference color axis R′, the second hue angle θ1′ is computed by the equation (6). Furthermore, linear extrapolation, quadratic equations, cubic equations or any combination thereof can be also used to obtain the second hue angle θ1′.
After that, the hue angle processing unit 106′ generates the third hue angle θ1″, for example but not limited to, by summing the first and second hue angles θ1 and θ1′, i.e. θ1″=θ1+θ1′.
The second image conversion unit 108′ can then convert the third hue angle θ1″ and other component OC into the output image signal SO′ which can be an RGB signal for output.
The second hue angle in step S353 is computed, for example, by using linear interpolation, linear extrapolation, quadratic equation, cubic equation or any combination thereof. The adjustment area in step S353 is determined by, based on a reference color axis that is selected to be rotated, choosing the color areas next to the reference color axis selected to be rotated.
In summary, the embodiments of the present invention provide a hue adjustor and method for adjusting hues for specific colors in an image, which at least has the following advantages. A user is able to adjust the hue angles for specified colors in an image without affecting other colors. The user can determine the number of the color areas partitioned for selection and adjustment. Either a single or several reference colors can be selected to be rotated, which is different from the conventional method where all colors in an image are rotated by the same angle.
It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing descriptions, it is intended that the present invention covers modifications and variations of this invention if they fall within the scope of the following claims and their equivalents.