[Radiance-general] Cropping a .pic file

Krystyna Zelenay kzelenay at berkeley.edu
Tue Jun 21 22:21:04 PDT 2011


Hi Greg,

Thank you for your feedback. I will try this out.

I also found this document which may provide an alternative method to
creating a mask:
http://www.radiance-online.org/radiance-workshop8/Presentations/wienhold_rad_ws_2009_evalglare_intro.pdf

Krystyna



On Sun, Jun 19, 2011 at 10:17 PM, Greg Ward <gregoryjward at gmail.com> wrote:
> Thanks, Krystyna -- this is helpful.
>
> There are a few ways you could do this.  The easiest might be to use pinterp to convert the view angles and average over rectangles, but the more accurate way if you really want a cone angle is with pcomb, like so:
>
> angle = 60
> pcomb -e "fang:$angle/180" -e 'xc:xmax/2;yc:ymax/2' -e 'r2=((x-xc)*(x-xc)+(y-yc)*(y-yc))/(xc*yc)' \
>        -e 'lo=if(r2-fang*fang,0,WE/(PI*fang*xc*fang*yc)*li(1))' -o render.hdr \
>        | pvalue -h -H -pG -df | total -if
>
> Then repeat with angle=120.  This command only works for angular fisheye images with 180 degrees in each dimension and square pixels (-vta -vh 180 -vv 180 -pa 1) which is what you have.  (The -pa 1 option is defaulted.)
>
> The reported result will be in averaged cd/m^2 (nits).  If you want radiance units (watts/m^2) instead, take off the WE constant (=179) and substitute 1.0 in the final -e option to pcomb.
>
> The command works by setting all pixels outside the desired cone to 0, and scaling the rest by one over the number of pixels inside the target radius.  The picture is converted to IEEE floats by pvalue and summed up by the total utility.
>
> I did a quick test and it seems to work OK.
>
> Best,
> -Greg
>
>> From: Krystyna Zelenay <kzelenay at berkeley.edu>
>> Date: June 19, 2011 9:41:51 PM PDT
>>
>> Hi Greg,
>>
>> I am using DIVA for Rhino to do the renderings. It looks like the
>> rpict view parameters used in DIVA are the following:
>> -vta -vp 1275.98 31.928 229.686 -vd -17.783 -2.785 0 -vu 0 0 1 -vh 180
>> -vv 180 -vo 0 -va 0 -vs 0 -vl 0
>>
>> DIVA outputs a pic file with a 180 degree fisheye view and I was
>> hoping that I could mask all but a 60 and 120 degree cone of vision
>> within the image so that I can calculate maximum and minimum pixel
>> values within these smaller views. Rectangular areas for calculating
>> averages would work.
>>
>> Thank you,
>>
>> Krystyna
>
> _______________________________________________
> Radiance-general mailing list
> Radiance-general at radiance-online.org
> http://www.radiance-online.org/mailman/listinfo/radiance-general
>



More information about the Radiance-general mailing list