[Radiance-general] Generating a black and white pic
Greg Ward
gregoryjward at gmail.com
Fri Jan 28 16:15:46 CET 2005
Be careful with thresholding, since the if() function takes any
non-zero positive value as "true". For this reason, it's generally a
good idea to use some small epsilon to avoid errors, like:
if(li(1)-1e-7, 1, 0);
-G
> From: Christopher Kings-Lynne <chriskl at familyhealth.com.au>
> Date: January 28, 2005 6:58:53 AM PST
>
> Raphael Compagnon wrote:
>> This command should do what you expect:
>> pcomb -e 'ro=li(1)*ri(2);go=li(1)*gi(2);bo=li(1)*bi(2)' mask.pic
>> picture.pic >result.pic
>
> Ah yes, and I can threshold my mask image like this:
>
> pcomb -e 'lo=if(li(1), 1, 0)' input.pic > mask.pic
>
> Cheers,
>
> Chris
More information about the Radiance-general
mailing list