Education Forums
| View previous topic :: View next topic |
| Author |
Message |
Eric Guest
|
Posted: Fri Nov 16, 2007 3:38 pm Post subject: [Q] Convert XYZ to RGB |
|
|
My source data is the Munsell real.dat file found at:
http://www.cis.rit.edu/mcsl/online/munsell.php
and I need to convert this data into the sRGB color space.
I am pretty sure I know how to accomplish this, but was hoping for
some confirmation that my method is accurate.
The method I am using is based on the sample code found at:
http://casoilresource.lawr.ucdavis.edu/drupal/node/201
The primary question I have is how to correctly apply a chromatic
adaptation transform to the XYZ color to convert it from its own
reference white to the reference white of the RGB system - assuming I
need to. The Munsell data was apparently calculated using illuminant
C. What is the reference white of the sRGB system? Is it D65? If so, I
believe I would want to apply the following matrix:
0.990490 -0.012269 -0.003515
-0.007115 1.015427 0.006679
-0.011434 -0.002878 0.919313
This is the Bradford matrix found at http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html
The sample code I pointed to above does not appear to apply this
matrix and I believe that would be considered a bug which I would want
to fix in my own code.
The Munsell data also mentions that it was calculated using the 'CIE
1931 2 degree observer'. So, my other question is how I would take
this into account in my conversion - assuming I need to...? The
general procedure for converting between XYZ to RGB found at
http://www.brucelindbloom.com/index.html?ColorCalcHelp.html doesn't
mention observers, but I wanted to make sure that it would not affect
the calculations and perhaps to understand what this means a little
better.
Any thoughts would be appreciated.
Thank you.
p.s. The munsell data actually starts in xyY, but the conversion to
xyY to XYZ appears to be straightforward using the formula found at
http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html .
Furthermore, the munsell data appears to be in the range of 0.0 -
100.0 which is why I believe the sample code above is doing the
division by 100. |
|
| Back to top |
|
 |
| |
Ads |
Advertising
Sponsor
|
|
Eric Guest
|
Posted: Sat Nov 17, 2007 5:48 pm Post subject: Re: Convert XYZ to RGB |
|
|
On Nov 17, 11:00 am, Roger Breton <gr...@videotron.ca> wrote:
| Quote: |
Eric,
You may want to take a look at BabelColor's CT&A atwww.babelcolor.comfor
pointers on how to convert from XYZ to Munsell.
|
Thank you.
However, if you can answer any of the questions directly, I would
appreciate it. |
|
| Back to top |
|
 |
| |
Ads |
Advertising
Sponsor
|
|
Roger Breton Guest
|
Posted: Sat Nov 17, 2007 10:00 pm Post subject: Re: [Q] Convert XYZ to RGB |
|
|
Eric,
You may want to take a look at BabelColor's CT&A at www.babelcolor.com for
pointers on how to convert from XYZ to Munsell.
Roger Breton |
|
| Back to top |
|
 |
| |
Ads |
Advertising
Sponsor
|
|
Gernot Hoffmann Guest
|
Posted: Sun Nov 18, 2007 5:26 pm Post subject: Re: [Q] Convert XYZ to RGB |
|
|
Eric schrieb:
| Quote: |
My source data is the Munsell real.dat file found at:
http://www.cis.rit.edu/mcsl/online/munsell.php
and I need to convert this data into the sRGB color space.
I am pretty sure I know how to accomplish this, but was hoping for
some confirmation that my method is accurate.
The method I am using is based on the sample code found at:
http://casoilresource.lawr.ucdavis.edu/drupal/node/201
The primary question I have is how to correctly apply a chromatic
adaptation transform to the XYZ color to convert it from its own
reference white to the reference white of the RGB system - assuming I
need to. The Munsell data was apparently calculated using illuminant
C. What is the reference white of the sRGB system? Is it D65? If so, I
believe I would want to apply the following matrix:
0.990490 -0.012269 -0.003515
-0.007115 1.015427 0.006679
-0.011434 -0.002878 0.919313
This is the Bradford matrix found at http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html
The sample code I pointed to above does not appear to apply this
matrix and I believe that would be considered a bug which I would want
to fix in my own code.
The Munsell data also mentions that it was calculated using the 'CIE
1931 2 degree observer'. So, my other question is how I would take
this into account in my conversion - assuming I need to...? The
general procedure for converting between XYZ to RGB found at
http://www.brucelindbloom.com/index.html?ColorCalcHelp.html doesn't
mention observers, but I wanted to make sure that it would not affect
the calculations and perhaps to understand what this means a little
better.
Any thoughts would be appreciated.
Thank you.
p.s. The munsell data actually starts in xyY, but the conversion to
xyY to XYZ appears to be straightforward using the formula found at
http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html .
Furthermore, the munsell data appears to be in the range of 0.0 -
100.0 which is why I believe the sample code above is doing the
division by 100.
|
The linear Bradford CAT for your application is based on the
assumptions, that the observer of Munsell samples views
these samples under illuminant C and that he(she) is
adapted to illuminant C and that he/she views sRGB samples
under illuminant D65 (or on a monitor with D65 white point)
and that he/she is adapted to D65.
Obviously it's very doubtful whether all these assumptions
were correct for real world tests.
Consider just the fact that many people are viewing their
sRGB data on a monitor with white point D50 ... without
any correction by color management.
D65 cool white appears as D50 warmer white on the
monitor, but the CAT doesn't know the monitor white point.
Best regards --Gernot Hoffmann |
|
| Back to top |
|
 |
| |
Ads |
Advertising
Sponsor
|
|
Roger Breton Guest
|
Posted: Mon Nov 19, 2007 1:11 am Post subject: Re: [Q] Convert XYZ to RGB |
|
|
| Quote: |
Consider just the fact that many people are viewing their
sRGB data on a monitor with white point D50 ... without
any correction by color management.
|
Like me ;-)
Roger Breton |
|
| Back to top |
|
 |
| |
Ads |
Advertising
Sponsor
|
|
Timo Autiokari Guest
|
Posted: Mon Nov 19, 2007 1:23 am Post subject: Re: [Q] Convert XYZ to RGB |
|
|
Eric wrote:
It looks to me that the sample code does it, even gives two options.
| Quote: |
assuming I need to.
|
Yes, it has to be done. Please download the latest ICC spec, it is all
explained in there http://www.color.org/ICC1v42_2006-05.pdf (especially
in the annex'es at the end).
| Quote: |
The Munsell data was apparently calculated using illuminant C.
|
That is what they say on the third row of text.
| Quote: |
What is the reference white of the sRGB system? Is it D65?
|
Yes, it is.
| Quote: |
The Munsell data also mentions that it was calculated using the 'CIE
1931 2 degree observer'. So, my other question is how I would take
this into account in my conversion - assuming I need to...?
|
It means that the spectral data has been converted to trichromatic
values by that 1931 model. At this stage (you have only the trichromatic
representation) it is just nice-to-know kind of information, and very
guessable since it is the de'facto standard. However, the the Std
Illumination C is built-in to that data as the whitepoint, this is not
the standard practice nowadays.
Does not, because it has no effect anymore. If you had the spectral data
then you'd possibly like to convert them directly to D65 (for absolute
colorimetry) or to D50 and from there to D65 by Bradford (for relative
colorimetry).
Yes, www.brucelindbloom.com is a very good reference site. The ICC
specification is also a good reference.
| Quote: |
the munsell data appears to be in the range of 0.0 - 100.0 which
is why I believe the sample code above is doing the division by 100.
|
Yes, some want to define the XYZ values in the range of 1 to 100 (or so)
and some others some want to use the range 0 to 1 (or so) so there are
formulas for both. Using the 0-100 for XYZ makes the XYZ triple to look
different than the Yxy triple but adds unnecessary scaling to the formulas.
Timo Autiokari |
|
| Back to top |
|
 |
| |
Ads |
Advertising
Sponsor
|
|
Eric417 Guest
|
Posted: Mon Nov 19, 2007 8:23 am Post subject: Re: [Q] Convert XYZ to RGB |
|
|
Timo Autiokari <timo.autiokari@aim-dtp.net> wrote:
It does now. I wrote to the author and he updated the code on the page.
Thanks. I'll check out that reference. |
|
| Back to top |
|
 |
| |
Ads |
Advertising
Sponsor
|
|
Gernot Hoffmann Guest
|
Posted: Mon Nov 19, 2007 4:15 pm Post subject: Re: [Q] Convert XYZ to RGB |
|
|
Eric417 schrieb:
| Quote: |
I am not sure what you mean by the phrase 'adapted to'...? What does it
mean to be adapted to viewing the Munsell samples under different
illuminants?
Consider just the fact that many people are viewing their
sRGB data on a monitor with white point D50 ... without
any correction by color management.
Wouldn't one consider that if colors were not corrected using the color
profile of the device that it would be wrong?
|
Eric, let me start by quoting Mark D.Fairchild,
Color Appearance Models.
About Munsell, p.98:
' The colorimetric specifications utilize CIE illuminant
C and the CIE 1931 Standard Colorimetric Observer (2°).
These specifications should be kept in mind when viewing
any embodiment of the Munsell system. The perceptual
uniformity of the system is only valid under source C,
on a uniform middle gray (N5) background, with a suf-
ficiently high iluminance level (e.g. greater than 500 lux) .
Viewing the samples in the Munsell Book of Color under
any other viewing conditions does not represent an em-
bodiment of the Munsell system.'
OK, these are the test conditions for illuminant C (very
difficult IMHO to be established practically).
On the other hand, these colors have to be represented
in an sRGB system. The most common application is
not a lighting by simulated D65 illuminant but a monitor.
In order to apply a chromatic adaptation transform, it's
assumed that the observer is (on the one hand) adapted
to illuminant C and (on the the other hand) to D65.
If the monitor is calibrated for D65 and the roomlight
is dimmed and the walls are 'white', then we may expect
an adaptation to D65.
Adapted to a white point means: all grays on a straight
line in XYZ from the origin to the specified white point
are perceived as neutral grays.
Obviously one cannot adapt simultaneously to D50 and
D65. A side by side comparison of a monitor image and
e.g. a print is IMO not reliable.
Considering all these uncertainties, one may ask whether
the linearized Bradford CAT is a striking success. IMO
it's just a convention (for instance in Adobe programs).
Nowhere any proof in printed books 'with Bradford'
versus 'with Wrong von Kries'.
I would like to add a PDF, showing vector fieldsfor color
shifts in the chromaticity diagram xyY, but our server
is at present locked.
In order to overcome the diffculty of a direct comparison
between a D65 monitor for sRGB and D50 proofing light
for prints (I'm drifting a little from Munsell to prints),
some people got used to calibrate the monitor for D50,
with apparently good results. But attention: the CAT
doesn't know the monitor's white point (which might be
representative for the adaptation state) but assumes
still D65. Thus a Bradford CAT is applied, though
the two (true) adaptation states are identical or at least
near to each other.
People are not aware of this because there are so many
other effects which affect a pleasant (!) reproduction
of color.
Best regards --Gernot Hoffmann |
|
| Back to top |
|
 |
| |
Ads |
Advertising
Sponsor
|
|
Eric417 Guest
|
Posted: Mon Nov 19, 2007 7:31 pm Post subject: Re: [Q] Convert XYZ to RGB |
|
|
Gernot Hoffmann <hoffmann@fho-emden.de> wrote:
| Quote: |
Eric schrieb:
My source data is the Munsell real.dat file found at:
http://www.cis.rit.edu/mcsl/online/munsell.php
and I need to convert this data into the sRGB color space.
I am pretty sure I know how to accomplish this, but was hoping for
some confirmation that my method is accurate.
The method I am using is based on the sample code found at:
http://casoilresource.lawr.ucdavis.edu/drupal/node/201
The primary question I have is how to correctly apply a chromatic
adaptation transform to the XYZ color to convert it from its own
reference white to the reference white of the RGB system - assuming I
need to. The Munsell data was apparently calculated using illuminant
C. What is the reference white of the sRGB system? Is it D65? If so, I
believe I would want to apply the following matrix:
0.990490 -0.012269 -0.003515
-0.007115 1.015427 0.006679
-0.011434 -0.002878 0.919313
This is the Bradford matrix found at
http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html
The sample code I pointed to above does not appear to apply this
matrix and I believe that would be considered a bug which I would want
to fix in my own code.
The Munsell data also mentions that it was calculated using the 'CIE
1931 2 degree observer'. So, my other question is how I would take
this into account in my conversion - assuming I need to...? The
general procedure for converting between XYZ to RGB found at
http://www.brucelindbloom.com/index.html?ColorCalcHelp.html doesn't
mention observers, but I wanted to make sure that it would not affect
the calculations and perhaps to understand what this means a little
better.
Any thoughts would be appreciated.
Thank you.
p.s. The munsell data actually starts in xyY, but the conversion to
xyY to XYZ appears to be straightforward using the formula found at
http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html .
Furthermore, the munsell data appears to be in the range of 0.0 -
100.0 which is why I believe the sample code above is doing the
division by 100.
The linear Bradford CAT for your application is based on the
assumptions, that the observer of Munsell samples views
these samples under illuminant C and that he(she) is
adapted to illuminant C and that he/she views sRGB samples
under illuminant D65 (or on a monitor with D65 white point)
and that he/she is adapted to D65.
|
I am not sure what you mean by the phrase 'adapted to'...? What does it
mean to be adapted to viewing the Munsell samples under different
illuminants?
| Quote: |
Consider just the fact that many people are viewing their
sRGB data on a monitor with white point D50 ... without
any correction by color management.
|
Wouldn't one consider that if colors were not corrected using the color
profile of the device that it would be wrong? |
|
| Back to top |
|
 |
| |
Ads |
Advertising
Sponsor
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|

97 Attacks blocked
Powered by phpBB © 2001, 2005 phpBB Group
|