[Radiance-general] Reflectance data
Greg Ward
gregoryjward at gmail.com
Wed Sep 3 14:14:10 PDT 2014
You can use the routines defined in src/common/ccolor.h to convert from spectral measurements to a CIE color and from there to RGB:
#include "ccolor.h"
{
C_COLOR clr;
float spec_data[MYNWL];
float rgb[3];
double myLuminance = 0.5;
/* set spec_data[] array] */
c_sset(&clr, 344.0, 1045.0, spec_data, MYNWL);
ccy2rgb(&clr, myLuminance, rgb);
}
Note that you have to decide the number of wavelengths ahead of time, and they must be evenly spaced.
I've arbitrarily set the overall Y value to 0.5, but of course you set it to what you need. I can't help you with that part.
Cheers,
-Greg
> From: Jia Hu <hujia06 at gmail.com>
> Subject: [Radiance-general] Reflectance data
> Date: September 3, 2014 8:02:35 PM GMT+01:00
>
> Hello, I use a device to measure the reflectance from 344 to 1045 wavelength,
> How could I convert these measured data into Radiance RGB, and how could I calculate the overall reflectance from the measurement?
>
> I try to use weights of RGB channels in Radiance, but which wavelength out of 344 - 1045 should I select for each channel?
>
> Thanks,
> Jia
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20140903/6bb1979b/attachment.html>
More information about the Radiance-general
mailing list