[Radiance-general] pcomb photometrically correct

Axel Jacobs a.jacobs at londonmet.ac.uk
Thu Feb 1 16:17:53 CET 2007


Dear all,

I'm trying to process an HDR image to pick out the light source. The image
was taken with hdrgen:
RGBE: http://luminance.londonmet.ac.uk/pickup/004.hdr
falsecolor: http://luminance.londonmet.ac.uk/pickup/004_fc.jpg
Header:
$ head -10 004.hdr
#?RADIANCE
CAMERA= NIKON E990 version E990v1.1
hdrgen created HDR image from '0129_012.jpg' '0129_011.jpg' '0129_010.jpg'
'0129_009.jpg' '0129_008.jpg' '0129_007.jpg' '0129_006.jpg' '0129_005.jpg'
'0129_004.jpg' '0129_003.jpg' '0129_002.jpg' '0129_001.jpg'
Removed lens flare
EXPOSURE=4.175030e-01
CAPDATE= 2007:01:29 17:33:57
PRIMARIES= 0.6400 0.3300 0.3000 0.6000 0.1500 0.0600 0.3127 0.3290
FORMAT=32-bit_rle_rgbe
-Y 768 +X 1024

What I'm after is to black out all pixels below a certain threshold, and
leave all others, i.e. the ones that are part of the light source
untouched.

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.

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?

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?

Thanks for shedding some light on the issue.

Cheers

Axel





More information about the Radiance-general mailing list