[Radiance-general] RGB irradiance from HDR-images

Andrew McNeil amcneil at lbl.gov
Tue Aug 6 11:00:50 PDT 2013


Hi Dolf,

If your hdr image is created using rpict with the -i option than you can
use pvalue to extract the pixel irradiance values.
pvalue -da -h -H basic.hdr > basic_RGB.txt

If you just want to apply masks you can use pcomb with if statements like
this:
pcomb -e 'ro=if(ri(2),ri(1),0);go=if(gi(2),gi(1),0);bo=if(bi(2),bi(1),0)'
basic.hdr mask1.hdr > basic_mask1.hdr

If your hdr images were not generated using rpict -i you could use vwrays
and rtrace to generate the illuminance data files for your image:
vwrays -x 500 -y 500 -vf view.vf | rtrace -i -ab 3 scene.oct > output.txt

Hope this helps,
Andy




On Tue, Aug 6, 2013 at 7:25 AM, Dolf Bakker <dolfbakker at gmail.com> wrote:

> Hello everybody,
>
>
> is it possible to calculate the RGB irradiance values from a HDR-image
> (generated by Rpict)?
> So I'm trying to use the "photographic film/sensor" of  the "camera" as a
> photosensor.
>
> I am trying to do use a HDR image, since I want to apply various masks on
> the HDR image.
> So I am trying to cut out various sections of my photographic film, and
> placing a photosensor / lux-meter on the cut-out sections of the
> photographic film.
>
> I was hoping to use something like this:
>
> rmagic basic.hdr | rtrace \-i+ \-dv \-h\- \-ab 3 scene.oct > output1a
> rmagic basic.hdr | rtrace \-i+ \-dv \-h\- \-ab 3 scene.oct | rcalc -e
> '$1=(0.67*$1+0.265*$2+0.065*$3)*179'  > output1b
> rmagic mask1.hdr | rtrace \-i+ \-dv \-h\- \-ab 3 scene.oct > output2a
> rmagic mask1.hdr | rtrace \-i+ \-dv \-h\- \-ab 3 scene.oct | rcalc -e
> '$1=(0.67*$1+0.265*$2+0.065*$3)*179' > output2b
> rmagic mask2.hdr | rtrace \-i+ \-dv \-h\- \-ab 3 scene.oct > output3a
> rmagic mask2.hdr | rtrace \-i+ \-dv \-h\- \-ab 3 scene.oct | rcalc -e
> '$1=(0.67*$1+0.265*$2+0.065*$3)*179' > output3b
>
> Tip, tricks and suggestions are very welcome!
>
> Thanks in advance,
>
>
> Dolf Bakker
>
>
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.radiance-online.org/pipermail/radiance-general/attachments/20130806/c2c5e3a7/attachment-0001.html>


More information about the Radiance-general mailing list