5
$\begingroup$

I am having trouble obtaining RGB colour values from the spectra of an object. I have the specific flux $F_\nu$ as a function of $\nu$ for each pixel of the image I'd like to make, but am unsure of how to turn this into RGB.

The proper method seems to be to calculate the $XYZ$ values by integrating the spectral power density $P(\lambda) = \nu^2 F_\nu /c$ against the CIE standard observer functions, then doing a linear transformation into $RGB$ space. However, I can not seem to find a reference that gives the normalization for the transformation into XYZ.

My question is: am I approaching this in the right way, and if so how is the transformation from spectra to $XYZ$ normalized? Thanks!

$\endgroup$
2
$\begingroup$

You can find the conversion matrices for a variety of colorspaces here: http://www.cs.rit.edu/~ncs/color/t_convert.html and the format for integrating the input spectrum at RIT. Quoting from the latter:

COnversion process

So, I'm guessing the part you're missing is the x,y,z curves in the second row there. Go to Wikipedia or some other optics-related site to get as detailed a set of numbers for the x, y, and z response curves and the integral (done numerically) is pretty straightforward.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.