RGB irradiance from HDR-images

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

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 <[email protected]> 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
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Dolf,

is it that you want to trace rays for image pixels dependent on their pixel value? So something like "if (pixel_red >=.5) then rtrace pixel_origin pixel_direction"? For that, you can use rcalc, which understands float triples (aka pixels values) as input, and can output either valid origin/direction vectors or nul-vectors depending on the input.

Cheers, Lars.

Cheers, Lars.

···

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

Thanks for the response.

Andrew, your subjects are what I was looking for.

Though I am still not there yet ... However, first I’ll try to play a
little more with it.

Lars, unfortunately that's not what I'm trying. When I made some more
progress and I am better capable to describe the problem, then I'll send
you a small update.

Thanks again!

Dolf

···

On Wed, Aug 7, 2013 at 10:56 AM, Lars O. Grobe <[email protected]> wrote:

Hi Dolf,

is it that you want to trace rays for image pixels dependent on their
pixel value? So something like "if (pixel_red >=.5) then rtrace
pixel_origin pixel_direction"? For that, you can use rcalc, which
understands float triples (aka pixels values) as input, and can output
either valid origin/direction vectors or nul-vectors depending on the input.

Cheers, Lars.

Cheers, Lars.

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@radiance-**online.org<[email protected]>
http://www.radiance-online.**org/mailman/listinfo/radiance-**general<http://www.radiance-online.org/mailman/listinfo/radiance-general>