pcomb to change pixel brightness values

Dear list,

Once again I'm stuck scratching my head over pcomb functional syntax.

I'd like to be able to modify an HDR image such that any pixel of a specific brightness li(n) is changed to a specific color of a given value and the original pixel values are maintained for all the other pixels below the brightness threshold.

As always thanks,
Chris

Christian Humann ~ Associate
LOISOS + UBBELOHDE
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1917 Clement Avenue Building 10A
Alameda, CA 94501 USA
- - - - - - - - - - - - - - - - - - - - - - - - - - -
510 521 3800 VOICE
510 521 3820 FAX
- - - - - - - - - - - - - - - - - - - - - - - - - - -
www.coolshadow.com

Hi Chris,

Easy enough:

  pcomb -e 'Rs:.353;Gs:.915;Bs:.081' -e 'Lt:1000/WE' -e 'over=li(1)-Lt' \
    -e 'ro=if(over,Rs,ri(1));go=if(over,Gs,gi(1));bo=if(over,Bs,bi(1))' -o input.hdr > output.hdr

I've arbitrarily set your special color to RGB=(.353,.915,.081) and the threshold to 1000 cd/m^2.

Cheers,
-Greg

···

From: Humann Chris <[email protected]>
Date: March 1, 2013 1:18:26 PM PST

Dear list,

Once again I'm stuck scratching my head over pcomb functional syntax.

I'd like to be able to modify an HDR image such that any pixel of a specific brightness li(n) is changed to a specific color of a given value and the original pixel values are maintained for all the other pixels below the brightness threshold.

As always thanks,
Chris