Rcalc if(cond,then,else)

Dear list,

I'd like to use Pvalue to pipe an image in to Rcalc and divide each pixel's Red value by its Blue value. If the latter ratio is greater/equal to .6 then I'd like make the given pixel white and if not then black. I'm using the following Pvalue command:
pvalue -o -h -H image.hdr

The if(cond,then,else) function is eluding me

Thanks as always.

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

···

On May 29, 2012, at 3:49 PM, Guglielmetti, Robert wrote:

Yeah Randolph, this is very cool, and a nice application of HDRI in the real world. Might be worth posting a link to this on the HDRI list as well.
________________________________________
From: Eddy Santosa [[email protected]]
Sent: Friday, May 25, 2012 4:56 PM
To: Radiance general discussion
Subject: Re: [Radiance-general] OT: A study of LCD display luminance

Randolph,

Thank you very much for sharing nice study. It's interesting results. Last time, I relied on the LCD manufacturer brightness specs or nit number to model and I was not sure whether it was a correct method.
Additionally, in your first image, may i know how you set the brightness setting in your computer? was it in maximum/100% brightness setting?

Thank you,

Eddy Santosa

On Fri, May 25, 2012 at 3:22 PM, Randolph M. Fritz <[email protected]<mailto:[email protected] > >> wrote:
For a simulation, I wanted to include some LCD displays. Problem was, I didn't know how bright they actually were. So I did an HDR photographic study of mine. I thought some of you might be interested, so I've put it up online. If you are interested, you can see the results here:
http://elad.lbl.gov/index.php/Interior_Applications/Display_Luminance/L226W

--
Randolph M. Fritz

_______________________________________________
Radiance-general mailing list
[email protected]<mailto:[email protected]>
http://www.radiance-online.org/mailman/listinfo/radiance-general

_______________________________________________
Radiance-general mailing list
[email protected]
http://www.radiance-online.org/mailman/listinfo/radiance-general

Hi Chris,

The "pcomb" program was built for this kind of thing. Try:

  pcomb -e 'lo=if(0.6*bi(1)-ri(1),0,1)' input.hdr | ra_tiff -b - black_white.tif

I didn't use a ratio so as to avoid divid-by-zero errors, and converted the (monocrhome) output to TIFF.

-Greg

···

From: Humann Chris <[email protected]>
Date: May 30, 2012 12:08:11 PM PDT

Dear list,

I'd like to use Pvalue to pipe an image in to Rcalc and divide each pixel's Red value by its Blue value. If the latter ratio is greater/equal to .6 then I'd like make the given pixel white and if not then black. I'm using the following Pvalue command:
pvalue -o -h -H image.hdr

The if(cond,then,else) function is eluding me

Thanks as always.

Chris