Systems and methods for improved gamut mapping from one image data set to another
View Patent ↗The present application discloses methods and system for converting input image data in a first color space into image data in a second color space format. Several embodiments disclose improved techniques for performing these conversions using inexpensive hardware and software implementations.
1. A computer-readable medium having computer-executable instructions for calculating the luminance value from an input image data, said input image data comprising a red (R) digital data value, a green (G) digital data value and a blue (B) digital data value, said luminance value calculation comprising:
shifting said R digital data value to the left by one digital place value, producing a R intermediate digital data value;
shifting said G digital data value to the left by two digital place values, producing a G intermediate digital data value;
adding said R intermediate digital data value to said B digital value, producing a first intermediate value;
adding G digital value to said G intermediate digital data value, producing a second intermediate value;
adding said first intermediate value to said second intermediate value, producing a third intermediate value; and
shifting said third intermediate value by three digital place values, producing said luminance value.
2. The computer-readable medium of claim 1 wherein said luminance value calculation further comprises performing the calculation Y=(2*R+5*G+B)/8, where Y is substantially the luminance value for said input image data.
3. A computer-readable medium having computer-executable instructions for calculating the hue angle of an input image data, said input image data comprising a red (R) digital data value, a green (G) digital data value and a blue (B) digital data value, said hue angle calculation comprising:
calculating a luminance value from said input image data, producing a Y digital value;
calculating intermediate values x=absolute values of B−Y and y=absolute value of R−Y;
swapping intermediate values x and y if y>x;
dividing y by x;
accessing an action look-up table to provide correction bits for performing calculations within the first subset of hue angle space; and
accessing an arctangent look-up table, said arctangent table producing an intermediate hue angle value.
4. The computer-readable medium of claim 3 wherein said calculating of a luminance value comprises performing the calculation Y=(2*R+5*G+B)/8, where Y is substantially the luminance value for said input image data.
5. The computer-readable medium of claim 3 wherein said calculating of a luminance value comprises:
shifting said R digital data value to the left by one digital place value, producing a R intermediate digital data value;
shifting said G digital data value to the left by two digital place values, producing a G intermediate digital data value;
adding said R intermediate digital data value to said B digital value, producing a first intermediate value;
adding G digital value to said G intermediate digital data value, producing a second intermediate value;
adding said first intermediate value to said second intermediate value, producing a third intermediate value; and
shifting said third intermediate value by three digital place values, producing said luminance value.
6. The computer-readable medium of claim 3 wherein said action look-up table provides corrections with the first octant of said hue angle space.
7. A computer-readable medium having computer-executable instructions for converting an RGB input image data into an RGBW image data, said conversion comprising:
calculating the hue angle of said RGB input image data;
selecting the chromaticity triangle of said RGB input image data based upon said hue angle, said chromaticity triangles being selected from one of a group, said group comprising RGW, GBW and BRW;
selecting a multi-primary matrix based upon said chromaticity triangle;
multiplying said multi-primary matrix to said RGB input image data to produce an intermediate RGBW image data value; and
wherein further said multi-primary matrix being selected from one of a group, said group comprising:
168
0
-
40
0
168
-
40
0
0
128
;
128
0
0
-
40
168
0
-
40
0
168
;
and
168
-
40
0
0
128
0
0
-
40
168.
8. The computer-readable medium of claim 7 wherein said group of said multi-primary matrices correspond to RGW, GBW, and BRW chromaticity triangles respectively.
9. The computer-readable medium of claim 7 wherein the conversion further comprises:
detecting out-of-gamut image data values;
determining the maximum color component that is out-of-gamut; and
accessing an inverse look-up table for providing a scaling factor to apply to said out-of-gamut image values.
10. The computer-readable medium of claim 7 , wherein the conversion further comprises:
subpixel rendering said RGBW image data values; and
accessing an output gamma look-up table for providing gamma values to be applied to image data values from said subpixel rendering module.