[Radiance-general] Getting number of pixels for fisheye view
Greg Ward
gregoryjward at gmail.com
Wed Jan 28 08:54:47 PST 2009
Hi Lars,
Seems to me you have a pretty good grasp of what's going on with this
calculation. You didn't really leave me anything else to explain...
Since S(1) returns exactly 0 for off-view pixels, the 1e-30 threshold
is set to allow for *very* small pixels, as you might have in a very
high-resolution image.
Just beware that because the Radiance RGBE encoding doesn't have an
exact representation of 1.0, that the actual count will be off (by
-0.5% if I remember right).
-Greg
> From: "Lars O. Grobe" <akilog at nus.edu.sg>
> Date: January 28, 2009 5:03:00 AM PST
>
> Hi Greg!
>> If you just want a pixel count, you can use:
>>
>> pcomb -e 'lo=if(S(1)-1e-30,1,0)' input.pic | pvalue -h -H -pG -
>> df | total -if
> Hm, thank You for this, now I am trying to figure out how it works.
> So you set the brightness to 1 if S(1) is greater then the very low
> treshold, else set it to 0, and sum up the pixel values (which are
> either 1 or 0, thus resulting in the n of pixels > 0)? This is very
> similar to what I did with grep, removing all values that have zero
> luminance, and counting the lines than. I was just not sure if it
> is really safe to rely on that pixels with zero luminance must be
> out of the view... But most probably they are, if I do not have a
> perfect absorber in my scene.
>
> CU Lars.
More information about the Radiance-general
mailing list