Image processing: effect of illuminant on sRGB image

AI Thread Summary
The discussion focuses on generating an sRGB image under illuminant A from a D65 white point. The key equations involve color matching functions (CMFs) and their transformation through matrix operations, specifically the relationship between the illuminant and the tristimulus values. The challenge lies in manipulating the non-square CMF matrix to derive the new color matching functions and adjust the spectrum accordingly. A proposed solution involves using linear algebra to solve for the new primaries, but confusion arises regarding the dimensions of the matrices involved. Ultimately, the discussion highlights the complexities of color space transformations in image processing.
Number2Pencil
Messages
204
Reaction score
1

Homework Statement



Assume an image file is sRGB under D65. Generate the image as it would appear under illuminant A ( a 171x1 matrix).

Homework Equations



effect of illuminant:

B = LA

where A is the a color matching function, L is a diagonalized version of illuminant A, and B is the color matching function as a product of the illuminant. CMF's have the dimensions mxn where n is the number of primaries, and m is the sample count of the function. n is usually 3 because it's related to the 3 types of cones in the eye.

t = A'g

where g is the sampled spectrum, and t is the "tristimulus value". If using the color matching function for the CIEXYZ color-space, the tristimulus value has the form [X;Y;Z]. There are some manipulations to transform XYZ into other color-spaces (often utilizing a "white point", such as CIERGB, CIELab, etc).


The effect of the spectrum due to illuminant:

g = Lr

The Attempt at a Solution



I'm not sure where to really start here. I have sRGB with a white point D65, but since this is a tristimulus value, I really only know how to convert it to other tristimulus values. I could transform each pixel from sRGB to XYZ, multiply by the inverse XYZ CMF to convert back to a spectrum, adjust the XYZ CMF to account for the illuminant, adjust the spectrum for the illuminant, and use these to get a new XYZ tristimulus value, and convert back to sRGB...

The kink in that plan was that the CMF, A, is not square, so I can't take the inverse. So either there is some linear algebra magic I'm not seeing, or there is something I can do with this illuminant vector to the tristimulus values.
 
Physics news on Phys.org
Haha...not a lot of image processing gurus out there I suppose?

I think I may have found a clue to this problem, it is in this formula:

B' = (A'Q)^-1 A'

Where B is a new color matching functions with associated primaries Q by using color matching function A (which is associated with Primaries P). There is a note that says the columns of A'Q are the amount of the new primaries Q required to match the old primaries P, and that it will be a 3x3 matrix.

Another formula says that if d is the color vector (tristimulus value?) associated with primaries P and d is the color vector associated with primaries Q, then

d = (A'Q)^-1c

So I have A, and I can get B using the luminance formula from the first post, and I have P because the primaries of RGB are well known...if I can find Q I think I can get it using the last formula.

I'm not really sure how to solve this matrix equation for Q:

B' = (A'Q)^-1 A'

If A'Q is really a 3x3 matrix, and A' is a 3x171, then that means Q needs to be a 171x3 to get a 3x3 output.
 
Back
Top