[Radiance-general] pcomb photometrically correct

Gregory J. Ward gregoryjward at gmail.com
Thu Feb 1 18:00:48 CET 2007


Hi Axel,

I'm glad Jack answered you, first.  I wouldn't have thought through  
to your purpose to suggest mksource.

Even so, I'd hate to leave your other questions unanswered, so here  
goes...

> From: "Axel Jacobs" <a.jacobs at londonmet.ac.uk>
> Date: February 1, 2007 7:17:53 AM PST
> ...
>
> Firstly, a quick test-run to warm up:
> $ pcomb -e 'lo=li(1)' -o 004.hdr > test.pic ; ximage test.pic &
> This does nothing but show the brightness. The -o ensures I get
> photometric units.
>
> Fine so far. BUT: If I run the same command straight into ximage, the
> picture looks the same, but hitting 'L' displays a luminance of 0.0  
> for
> all pixels (the square light source should have a luminance of just  
> under
> 500 cd/m2):
> $ pcomb -e 'lo=li(1)' -o 004.hdr |ximage
> This is the first thing that I don't understand.

Ximage doesn't load the original HDR pixels into memory, instead  
relying on the file's presence to query specific values.  If you  
don't give it the file, it disables its query function.

> Second question: To set the threshold to 400 cd/m2 like described  
> above, I
> run:
> $ pcomb -e 'lo=if(li(1)-400/WE,li(1),0)' -o 004.hdr > test.pic ;  
> ximage
> test.pic &
> WE is the white efficacy, which seems to be read-only: Setting WE=2000
> doesn't do anything.
> URL: http://luminance.londonmet.ac.uk/pickup/400.png (the light  
> only --
> rest is black)
>
>> From pcomb(1):
> "... WE gives the white efficacy (lumens/brightness) for pixel values,
> which may be used with the -o option or the  le(n) values to  
> convert to
> absolute photometric units (see below)"
>
> The exposure value le(n) is the same for the entire picture (in my  
> case
> just over 0.4), so is it correct to say that I only have to worry  
> about it
> when combining multiple images? And that WE is equally useful with  
> li(n),
> not just li(n) and -o?

You should EITHER use the -o option (once for each input file), OR  
use le(n) to adjust the exposure, not both.  If the -o option is  
applied to an input image, values you get will already have been  
divided by the associated expousre.

> So combining multiple images with different exposures would be done  
> like so:
> $ pcomb -e 'lo=li(1)/le(1)+li(2)/le(2)' -o 004.hdr 006.hdr > test.pic
> Right?

Given what I just said, you would either use:

$ pcomb -e 'lo=li(1)/le(1)+li(2)/le(2)' 004.hdr 006.hdr > test.pic

or:

$ pcomb -e 'lo=li(1)+li(2))' -o 004.hdr -o 006.hdr > test.pic

If you felt like it, you could get the same result from:

$ pcomb -e 'lo=li(1)+li(2)/le(2)' -o 004.hdr 006.hdr > test.pic

but that would be a little twisted...

-Greg



More information about the Radiance-general mailing list