[Radiance-general] Getting number of pixels for fisheye view
Greg Ward
gregoryjward at gmail.com
Tue Jan 27 20:40:25 PST 2009
Hi Lars,
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
Beware that this will count all pixels for anything but -vth or -vta
with very large -vv or -vh settings (>300 degrees or so).
-Greg
> From: "Lars O. Grobe" <akilog at nus.edu.sg>
> Date: January 27, 2009 7:36:13 PM PST
>
> Hi list,
>
> to be able to integrate the luminance values of a fisheye view, I
> need the number of pixels in the image that are part of the view. I
> can take all pixels which have not a value of exactly 0 (as this
> should never exist for a valid material), but this seams to be not
> very accurate. I know that I can test if a pixel is inside the
> field of view using pcomb, which defines S(n) as zero for pixels
> outside the view, but I do not know how to access this value to
> count pixels inside the view. At the moment, the easiest way for me
> would be to render a fisheye pointing towards a 180 degree source
> without any geometry and count all none-black pixels, but I am sure
> that there must be a better way to test for the pixels' validity.
>
> CU Lars.
More information about the Radiance-general
mailing list