
Page 2 of 2  1  2 

Thread Tools 
Old
10092013, 10:19 PM
 Thread Starter
AVS Special Member
Join Date: May 2013
Location: Toronto
Posts: 1,032
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Quoted: 169 Post(s)
Liked: 85
Ok, in the following figure:
Top Row
On the left is the standard observer color matching functions (CMF), based on primaries XYZ. On the right is a CMF (A B C) that was derived as a linear transformation of XYZ, using the transformation matrix indicated. I've kept this simple  in reality such a CMF would be useless.
Second Row
I've shown what happens when you "feed" a particular spectral distribution (based on Illuminant E) into the XYZ CMF. What I've done is basically integrate the spectral distribution into the three curves, yielding three values: X, Y, and Z. I then normalized the values (x = X/X+Y+Z, y = Y/X+Y+Z) and have shown the results. They match what they should be. So the code is doing what it's supposed to. Technically I haven't integrated, but rather approximated an integration by summing over 5nm increments, as that was the resolution of my data set. What I believe I've done here is create a simulation, or model, of what actually happens when a tristim device encounters a particular spectral distribution.
Third Row
I've shown what happens when you feed that same spectral distribution into the ABC CMF. Note the values a and b.
Fourth Row
Here I have fed the spectral distribution into the XYZ CMF, but before summing over wavelength, I've transformed each discrete value (at 5nm intervals) using the same transformation matrix that was used to convert XYZ into ABC. I end up with the exact same values for a and b.
Now in the real world, we would want to do the opposite of what I've done here. That is, we would want to feed a spectral distribution into an arbitrary CMF ABC, and have it output x and y. I could have done that here, but my matrix algebra sucks, and I for now I didn't want to waste time figuring out how to figure out the inverse transformation matrix.
Either way, what I've shown is that if you have any two color spaces, and you have a model of how one space maps onto the other, then you can derive the output of one space, based only on input to the other space.
In the real world, I suspect this would rarely be possible. In the example I've shown here, I've artificially created the ABC CMF as a linear combination of XYZ. In reality, these other CMFs we're dealing with (such as the defective, imperfect CMFs of actual colorimeters) are not derived as a linear combination of XYZ. Their CMFs are based on the physical properties of the filters used, and there is no guarantee that there is even a solution to the linear transformation between the colorimeter's CMF and the XYZ CMF.
Top Row
On the left is the standard observer color matching functions (CMF), based on primaries XYZ. On the right is a CMF (A B C) that was derived as a linear transformation of XYZ, using the transformation matrix indicated. I've kept this simple  in reality such a CMF would be useless.
Second Row
I've shown what happens when you "feed" a particular spectral distribution (based on Illuminant E) into the XYZ CMF. What I've done is basically integrate the spectral distribution into the three curves, yielding three values: X, Y, and Z. I then normalized the values (x = X/X+Y+Z, y = Y/X+Y+Z) and have shown the results. They match what they should be. So the code is doing what it's supposed to. Technically I haven't integrated, but rather approximated an integration by summing over 5nm increments, as that was the resolution of my data set. What I believe I've done here is create a simulation, or model, of what actually happens when a tristim device encounters a particular spectral distribution.
Third Row
I've shown what happens when you feed that same spectral distribution into the ABC CMF. Note the values a and b.
Fourth Row
Here I have fed the spectral distribution into the XYZ CMF, but before summing over wavelength, I've transformed each discrete value (at 5nm intervals) using the same transformation matrix that was used to convert XYZ into ABC. I end up with the exact same values for a and b.
Now in the real world, we would want to do the opposite of what I've done here. That is, we would want to feed a spectral distribution into an arbitrary CMF ABC, and have it output x and y. I could have done that here, but my matrix algebra sucks, and I for now I didn't want to waste time figuring out how to figure out the inverse transformation matrix.
Either way, what I've shown is that if you have any two color spaces, and you have a model of how one space maps onto the other, then you can derive the output of one space, based only on input to the other space.
In the real world, I suspect this would rarely be possible. In the example I've shown here, I've artificially created the ABC CMF as a linear combination of XYZ. In reality, these other CMFs we're dealing with (such as the defective, imperfect CMFs of actual colorimeters) are not derived as a linear combination of XYZ. Their CMFs are based on the physical properties of the filters used, and there is no guarantee that there is even a solution to the linear transformation between the colorimeter's CMF and the XYZ CMF.
Sponsored Links  
Advertisement


Old
10092013, 11:04 PM
AVS Special Member
Join Date: Aug 2004
Location: Seattle, WA
Posts: 6,929
Mentioned: 3 Post(s)
Tagged: 1 Thread(s)
Quoted: 198 Post(s)
Liked: 241
Quote:
Try and see if you can reverse what the filter does and you'll have your answer.
Joel Barsotti
SpectraCal
CalMAN Lead Developer
SpectraCal
CalMAN Lead Developer
Old
10092013, 11:07 PM
 Thread Starter
AVS Special Member
Join Date: May 2013
Location: Toronto
Posts: 1,032
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Quoted: 169 Post(s)
Liked: 85
Quote:
you mean, try and derive spectral data from X Y Z values? That would be impossible, given that there are a potentially infinite number of spectral sources that can give a particular set of X Y Z values. You'd need a specto to get the spectral data.
Old
10092013, 11:29 PM
AVS Special Member
Join Date: Aug 2004
Location: Seattle, WA
Posts: 6,929
Mentioned: 3 Post(s)
Tagged: 1 Thread(s)
Quoted: 198 Post(s)
Liked: 241
Quote:
Exactly.
So if you need to know the spectrum + the color matching function to get the XYZ, if you know your CMF isn't quite right, there is no way to reverse the bad CMF and apply a correct one. It's the shape of the CMF that's wrong, not it's sensitivities. Some spectral distributions will report an X that is too low, some will report an X that is too high.
Basically the correction matrices are hints to tell the meter about the general shape of the spectral data.
Joel Barsotti
SpectraCal
CalMAN Lead Developer
SpectraCal
CalMAN Lead Developer
Old
10092013, 11:58 PM
 Thread Starter
AVS Special Member
Join Date: May 2013
Location: Toronto
Posts: 1,032
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Quoted: 169 Post(s)
Liked: 85
Yep I get all that. My initial misunderstanding when I first started this new line of thought was that the calibration matrices were actually linear transformation matrices that transformed the bad CMF space into the standard CMF space. But they are not anything of the sort  they are offset corrections.
My point still stands though  if the bad CMF can be fully characterized, and if it happens to be "linearly transformable" into the standard CMF, then you won't need correction matrices. The bad CMF would in effect be part of the "family" of the ideal standard CMF and you'd just need to apply a linear transform to the bad CMF's "output" (by this I mean the output of the tristim device that instantiated this bad CMF), and you'd get accurate x and y values for any given spectral source, barring limitations of drift and signal to noise issues.
The problem is that there is a very small chance of a bad CMF being part of this family. It seems that it would be a huge coincidence if there existed a relationship such that every single point on the Bad CMF's curves would have that same relationship to the corresponding points on the standard CMF. So offset corrections for particular spectral signatures are the next best thing.
I do wonder, however, if one were to try to fit a best fitting set of values for such a putative transformation matrix, how close you could get... I might try that next.
My point still stands though  if the bad CMF can be fully characterized, and if it happens to be "linearly transformable" into the standard CMF, then you won't need correction matrices. The bad CMF would in effect be part of the "family" of the ideal standard CMF and you'd just need to apply a linear transform to the bad CMF's "output" (by this I mean the output of the tristim device that instantiated this bad CMF), and you'd get accurate x and y values for any given spectral source, barring limitations of drift and signal to noise issues.
The problem is that there is a very small chance of a bad CMF being part of this family. It seems that it would be a huge coincidence if there existed a relationship such that every single point on the Bad CMF's curves would have that same relationship to the corresponding points on the standard CMF. So offset corrections for particular spectral signatures are the next best thing.
I do wonder, however, if one were to try to fit a best fitting set of values for such a putative transformation matrix, how close you could get... I might try that next.
Old
10102013, 12:12 AM
AVS Special Member
Join Date: Aug 2004
Location: Seattle, WA
Posts: 6,929
Mentioned: 3 Post(s)
Tagged: 1 Thread(s)
Quoted: 198 Post(s)
Liked: 241
Quote:
Try it, just try and do it with something a little more spikey than illuminant E.
Try using d65, http://files.cie.co.at/204.xls
or better yet get one that works for d65 and illuminant E.
Remember, the colorimeter only gets XYZ data.
Joel Barsotti
SpectraCal
CalMAN Lead Developer
SpectraCal
CalMAN Lead Developer
Old
10102013, 01:49 AM
 Thread Starter
AVS Special Member
Join Date: May 2013
Location: Toronto
Posts: 1,032
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Quoted: 169 Post(s)
Liked: 85
Ok, just did it with the d65 values you gave me (I'm assuming that the xls file has d65 values, even though the title is Illuminant A  are they the same thing?).
(just saw ur edit after I finished this).
This time, I figured out the inverse transform, so was able to use the defective colorimeter to derive the x and y values.
Also, the transform was a more sensible one  it doubled the sensitivities of the X and Z curves, and kept Y unchanged.
First row shows the transformation from XYZ to the new CMF. This new CMF on the right (ABC) represents the filter functions from our defective colorimeter.
Second row shows the x and y values that are derived from integrating the illuminant into the original XYZ CMF. This represents what would happen if you had an ideal colorimeter.
Third row shows the corresponding values (a, b) that are derived from integrating the illuminant into the transformed CMF. This represents what our defective colorimeter would output.
Fourth row shows what happens when I apply the inverse transform to each discrete triplet of (partial) sums while integrating the illuminant over the ABC CMF. The sum of these inversely transformed partial sums were then normalized, yielding the same values as the original x and y. In other words, we end up with the same values as the ideal colorimeter.
(just saw ur edit after I finished this).
This time, I figured out the inverse transform, so was able to use the defective colorimeter to derive the x and y values.
Also, the transform was a more sensible one  it doubled the sensitivities of the X and Z curves, and kept Y unchanged.
First row shows the transformation from XYZ to the new CMF. This new CMF on the right (ABC) represents the filter functions from our defective colorimeter.
Second row shows the x and y values that are derived from integrating the illuminant into the original XYZ CMF. This represents what would happen if you had an ideal colorimeter.
Third row shows the corresponding values (a, b) that are derived from integrating the illuminant into the transformed CMF. This represents what our defective colorimeter would output.
Fourth row shows what happens when I apply the inverse transform to each discrete triplet of (partial) sums while integrating the illuminant over the ABC CMF. The sum of these inversely transformed partial sums were then normalized, yielding the same values as the original x and y. In other words, we end up with the same values as the ideal colorimeter.
Old
10102013, 02:45 AM
 Thread Starter
AVS Special Member
Join Date: May 2013
Location: Toronto
Posts: 1,032
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Quoted: 169 Post(s)
Liked: 85
ah ****.
I just realized in real life, the colorimeter won't have access to the partial sums.
edit: doesn't make a difference. I redid the calculations, but this time I applied the inverse transform to the fully summed triplet A, B, C. This yielded a new triplet A', B', C', and I then normalized these. You end up with the exact same values.
So this works with your criteria of only providing the (fully summed) X Y Z data (although I've called it A B C data in this case to distinguish it from the ideal colorimeter).
I just realized in real life, the colorimeter won't have access to the partial sums.
edit: doesn't make a difference. I redid the calculations, but this time I applied the inverse transform to the fully summed triplet A, B, C. This yielded a new triplet A', B', C', and I then normalized these. You end up with the exact same values.
So this works with your criteria of only providing the (fully summed) X Y Z data (although I've called it A B C data in this case to distinguish it from the ideal colorimeter).
Old
10102013, 08:42 AM
AVS Special Member
Join Date: Aug 2004
Location: Seattle, WA
Posts: 6,929
Mentioned: 3 Post(s)
Tagged: 1 Thread(s)
Quoted: 198 Post(s)
Liked: 241
Quote:
Originally Posted by spacediver
ah ****.
I just realized in real life, the colorimeter won't have access to the partial sums.
edit: doesn't make a difference. I redid the calculations, but this time I applied the inverse transform to the fully summed triplet A, B, C. This yielded a new triplet A', B', C', and I then normalized these. You end up with the exact same values.
http://www.joystiq.com/
So this works with your criteria of only providing the (fully summed) X Y Z data (although I've called it A B C data in this case to distinguish it from the ideal colorimeter).
ah ****.
I just realized in real life, the colorimeter won't have access to the partial sums.
edit: doesn't make a difference. I redid the calculations, but this time I applied the inverse transform to the fully summed triplet A, B, C. This yielded a new triplet A', B', C', and I then normalized these. You end up with the exact same values.
http://www.joystiq.com/
So this works with your criteria of only providing the (fully summed) X Y Z data (although I've called it A B C data in this case to distinguish it from the ideal colorimeter).
Now try shifting the peak peaks on your filters a few nm, if you just adjust the sensitivity, what you are suggesting would work.
The reality is that the slope, center, and sensitivity are all be different.
Joel Barsotti
SpectraCal
CalMAN Lead Developer
SpectraCal
CalMAN Lead Developer
Old
10102013, 10:04 AM
AVS Special Member
Join Date: Sep 2006
Location: Planet Dog
Posts: 5,981
Mentioned: 71 Post(s)
Tagged: 0 Thread(s)
Quoted: 1071 Post(s)
Liked: 861
Probably the killer is the slope, that is the hardest to emulate with physical filters. Also red generally needs more tweaking due to the complex matching function. This approach might work with fully characterized ABC at high spectral resolution along with knowledge of the display spectra but who wants to measure every colorimeter with a tunable laser or monochrometer?

HCFR stable build 3.3.6
Build a color correction cube for your eeColor box using ArgyllCMS: A Comparison of 3DLUT Solutions for the eeColor box
Some common display real world black levels, Some movie luma and luminance statistics
PN60F8500AFXZA TFXPAKUC 1116.1 + SamyGO  some recommended settings
Old
10102013, 11:10 AM
 Thread Starter
AVS Special Member
Join Date: May 2013
Location: Toronto
Posts: 1,032
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Quoted: 169 Post(s)
Liked: 85
Quote:
later this evening, I'll experiment with a more complex transform that radically changes the distributions. My guess is that it won't matter one bit. I'm pretty sure that you could prove it mathematically  it would look something like this:
If CMF_ABC = transform*CMF_XYZ,
then
Integral of [CMF_XYZ(lambda), SPD(lambda), d(lambda)] is equivalent to Integral of invtransform*[CMF_ABC(lambda), SPD(lambda), d(lambda)]
where SPD(lambda) is the spectral source as a function of lambda (wavelength).
(my calculus is rudimentary so not even sure if the syntax is correct, but hopefully it gets the idea across).
Old
10102013, 11:13 AM
 Thread Starter
AVS Special Member
Join Date: May 2013
Location: Toronto
Posts: 1,032
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Quoted: 169 Post(s)
Liked: 85
Quote:
This approach is independent of SPD. And if it did indeed work, you'd only need to do it once at the factory and it would yield accurate results for any source.
The problem, as I've mentioned, is that in reality you'd never get a colorimeter whose CMF was a linear combination of the standard CMF. I'm gonna try experiment with a best fit for arbitrarily defined CMF's (rather than generating them as a linear combination of the standard CMF), and see how close it gets. My guess is that it'll rarely get close enough to make it a better solution than using offset tables.
Old
10102013, 12:25 PM
AVS Special Member
Join Date: Sep 2006
Location: Planet Dog
Posts: 5,981
Mentioned: 71 Post(s)
Tagged: 0 Thread(s)
Quoted: 1071 Post(s)
Liked: 861
By "this approach" I meant more generally calculating XYZ matrix corrections directly from source/sensor spectral characteristics instead of using the sensor itself to do the integration.

HCFR stable build 3.3.6
Build a color correction cube for your eeColor box using ArgyllCMS: A Comparison of 3DLUT Solutions for the eeColor box
Some common display real world black levels, Some movie luma and luminance statistics
PN60F8500AFXZA TFXPAKUC 1116.1 + SamyGO  some recommended settings
Old
10102013, 01:35 PM
 Thread Starter
AVS Special Member
Join Date: May 2013
Location: Toronto
Posts: 1,032
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Quoted: 169 Post(s)
Liked: 85
not sure what you mean  can you flesh it out a bit more?
Old
10102013, 01:59 PM
 Thread Starter
AVS Special Member
Join Date: May 2013
Location: Toronto
Posts: 1,032
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Quoted: 169 Post(s)
Liked: 85
Interesting historical connection here:
As I understand it....
Was just reading about William David Wright and John Guild's observer functions back from the late 20's. Guild had some color matching data derived from 7 observes, using a particular set of primaries. A few years later, Wright collected some data of his own, from 10 observers. Interestingly, not only were two CMFs derived from different observers, but using different primaries for color matching. In fact, Wright wasn't aware of this when he collected his data, since Guild had not yet published his own data.
In the lead up to the 1931 meeting, Guild took Wright's data, and transformed it to see whether the chromaticity coordinates would match up. And they did, with remarkable agreement!
This is a great example of how if you can map one CMF onto another, then you can predict the output of one CMF given the inputs to the other. In this case, as each set of CMFs were based on monochromatic primaries, it is a simple matter to find the linear transform. You just map the three primaries of one CMF (which are the basis vectors of that color space) onto the three primaries of the other CMF. In effect, when Guild transformed Wright's data, he was simulating what Wright's observers would have reported had they been mixing with Guild's set of primaries.
In fact, it was this very discovery which allowed Guild to see the opportunity for a standard observer function  remember, the standard X Y Z CMF was not directly empirically derived, but based on a linear transform of a particular R G B CMF, using different primaries.
As I understand it....
Was just reading about William David Wright and John Guild's observer functions back from the late 20's. Guild had some color matching data derived from 7 observes, using a particular set of primaries. A few years later, Wright collected some data of his own, from 10 observers. Interestingly, not only were two CMFs derived from different observers, but using different primaries for color matching. In fact, Wright wasn't aware of this when he collected his data, since Guild had not yet published his own data.
In the lead up to the 1931 meeting, Guild took Wright's data, and transformed it to see whether the chromaticity coordinates would match up. And they did, with remarkable agreement!
This is a great example of how if you can map one CMF onto another, then you can predict the output of one CMF given the inputs to the other. In this case, as each set of CMFs were based on monochromatic primaries, it is a simple matter to find the linear transform. You just map the three primaries of one CMF (which are the basis vectors of that color space) onto the three primaries of the other CMF. In effect, when Guild transformed Wright's data, he was simulating what Wright's observers would have reported had they been mixing with Guild's set of primaries.
In fact, it was this very discovery which allowed Guild to see the opportunity for a standard observer function  remember, the standard X Y Z CMF was not directly empirically derived, but based on a linear transform of a particular R G B CMF, using different primaries.
Old
10102013, 09:14 PM
 Thread Starter
AVS Special Member
Join Date: May 2013
Location: Toronto
Posts: 1,032
Mentioned: 4 Post(s)
Tagged: 0 Thread(s)
Quoted: 169 Post(s)
Liked: 85
Quote:
So it seems that a linear transformation will preserve the peaks of the function. In other words, if two CMF's have a different set of peak sensitivities, they are not linearly transformable. (side note, also found that some transformation matrices are not invertible, but that's a separate issue).
See image below. (I think the reason that one of the lines doesn't match up precisely is because the function was flat at those points, so there wasn't a true peak)
Now this makes sense in a way. With the original RGB CMF's, the "colorimeter" was the human visual system. Whether this was with Wright's Primaries, or Guild's primaries, they were all being filtered through the same human visual system:
look at this quote from a chapter in Schanda's book, written by Francoise Vienot and Pieter Walraven:
Quote:
"A color match is obtained only when two stimuli produce equal quantum catches in the three kinds of cones. Any linear transformation of the colormatching functions describe the colormatching properties of the eye. Therefore, the cone fundamentals are obtained from one of these transformations (p. 220)"
Now I have yet to read the chapter, and wrap my head around exactly how the CMFs associated with a particular choice of primaries used in these color matching experiments relate to the "cone fundamentals", but it seems clear that the original RGB CMF's, the derived XYZ CMF, and the "retinal CMF" are all part of the same family of linear transforms. Also bear in mind that this quote is from the beginning of the chapter, and may reflect the historical theories on cone fundamentals, rather than the more nuanced particulars that emerged later.
So, as Sotti has indicated, if the peaks don't match up, then you cannot use the techniques associated with linear transformations to map between spaces. In order for a particular colorimeter to fulfill this criterion, it would have to have filters that matched, at least with respect to peak sensitivity, that of the human visual system.

Thread Tools  


Posting Rules  