Image Processing Reference
In-Depth Information
Substituting these parameters in Equation 7.102,
the conversion matrix, M,is
obtained as
2
4
3
5
0
:
7977
0
:
2880
0
M ¼
0
:
1352
0
:
7119
0
(
7
:
104
)
0
:
0314
0
:
0001
0
:
8252
Given an RGB color such that its components are in the nominal range [0.0, 1.0] and
its gamma is
g
and the RGB system is not sRGB:
[ XYZ ] ¼ [ rg ] M
(
7
:
105
)
where
r ¼ R g ;
g ¼ G g ;
b ¼ B g
(
7
:
106
)
For sRGB, r, g, b values can be found from the following equations:
(
R =
12
:
92
R
0
:
04045
r ¼
2
:
4
(( R þ
:
)=
:
)
R >
:
0
055
1
055
0
04045
(
G =
12
:
92
G
0
:
04045
g ¼
(
7
:
107
)
2 : 4
(( G þ
0
:
055
)=
1
:
055
)
G >
0
:
04045
(
B =
12
:
92
B
0
:
04045
b ¼
2 : 4
(( B þ
0
:
055
)=
1
:
055
)
B >
0
:
04045
Now, given the working space de
nition for RGB color space, we know the
transformation matrix. Using a proper choice of
1.8 for ProPhoto
RGB) we can determine the XYZ values and hence L*a*b* values.
Step 2: Form a uniformly sampled RGB LUT (e.g., 17 3 ). Convert the RGB colors to
XYZ and then to L*a*b* using Equation 7.105 and the equations shown in Appendix
A for a 2-degree observer and D50 illuminant.
A low resolution LUT of size 6 3 was formed to show numerical values by
varying the
g
(e.g.,
first channel R least rapidly and varying third channel B most rapidly
between 0 and 255 with a uniformly sampled RGB grid. In this example, the color
index 1 corresponds to
first grid point with R ¼
0
¼ G ¼ B and index 216 corresponds
to the last grid point R ¼ G ¼ B ¼
255 with increments in between, according to the
uniform sampling approach described above.
Step 3: Separate L*a*b* nodes into in-gamut and out-of-gamut colors.
After creating the RGB grid points, the data is converted to L*a*b* and
then separated into two groups: in-gamut and out-of-gamut colors. We used the
Search WWH ::




Custom Search