[Radiance-general] vta 2 vth
Mehlika Inanici
inanici at u.washington.edu
Wed Feb 18 12:03:58 PST 2009
Thanks Gerg and Lars. pinterp seems to be the solution!
Cheers,
Mehlika
Greg Ward wrote:
> Hi Mehlika,
>
> I think the output of this command was originally intended for the
> "total" command to add up illuminance in lux. Thus, the pixel values
> get added up and divided by the total number of above-hemisphere
> pixels, which you don't want to do in this case. I guess what you're
> trying to do instead is reweight your pixels according to the cosine,
> but it doesn't really make sense to me. If you actually want to
> change the projection rather than creating a reweighted image, you
> should use pinterp, instead:
>
> pinterp -vf input.hdr -vth -x 1024 -y 1024 -ff input.hdr 1 > hemi.hdr
>
> (Just saw Lars' response, which is along similar lines to this...)
>
> If you still want to go ahead with the command, you can modify it
> thusly to get more what you say you're expecting:
>
> pcomb -e 'sq(x):x*x' \
> -e 'ar=190/2*PI/180*sqrt(sq(2/xmax*x-1)+sq(2/ymax*y-1))' \
> -e 'cf=WE/le(1)*if(ar-PI/2,0,if(ar-.01,cos(ar) *sin(ar)/ar,1))' \
> -e 'lo=cf*li(1)' input.hdr > corrected.hdr
>
> Best,
> -Greg
>
>> From: Mehlika Inanici <inanici at u.washington.edu>
>> Date: February 18, 2009 10:32:07 AM PST
>>
>> Hi Greg (and everybody in the group),
>>
>> I have used the formula Greg provided for a previous discussion
>> (http://www.radiance-online.org/pipermail/radiance-general/2009-January/005644.html)
>> to convert an angular projection to hemispherical fisheye projection.
>>
>> I am getting bizarre results. So, just to see what is going on, I
>> have generated an overcast sky with vta option (-vta -vp 1.000 1.000
>> 0.000 -vd 0.000 0.000 1.000 -vu -1 0 0 -vh 180 -vv 180 -vs 0 -vl 0)
>>
>> I have used your formula:
>>
>> pcomb -e 'sq(x):x*x' \
>> -e 'ar=190/2*PI/180*sqrt(sq(2/xmax*x-1)+sq(2/ymax*y-1))' \
>> -e
>> 'cf=WE*sq(190*PI/180*2/(xmax+ymax))*if(ar-PI/2,0,if(ar-.01,cos(ar)
>> *sin(ar)/ar,1))' \
>> -e 'lo=cf*li(1)' input.hdr > corrected.hdr
>>
>> (I used 181 degrees instead of 190)
>>
>> and I was hoping to have an image similar to what I would have
>> generated using the vth option (-vth -vp 1.000 1.000 0.000 -vd 0.000
>> 0.000 1.000 -vu -1 0 0 -vh 180 -vv 180 -vs 0 -vl 0).
>>
>> After the correction, my luminance values dropped significantly (2500
>> cd/m2 dropped to 4.3). You can find the original and corrected images
>> at: http://faculty.washington.edu/inanici/vta/
>>
>> Any ideas why I am having difficulties with this? Thanks in advance...
>>
>> Cheers,
>> Mehlika
>
> _______________________________________________
> 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