ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/px/pacuity.csh
(Generate patch)

Comparing ray/src/px/pacuity.csh (file contents):
Revision 3.5 by greg, Wed Feb 16 05:40:11 2005 UTC vs.
Revision 3.6 by greg, Mon Nov 10 19:08:19 2008 UTC

# Line 4 | Line 4
4   # Adjust picture acuity according to human visual abilities
5   #
6   if ($#argv != 1) then
7 <        echo "Usage: $0 input.pic > output.pic"
7 >        echo "Usage: $0 input.hdr > output.hdr"
8          exit 1
9   endif
10   set td=/tmp
11   set tfc1=$td/ac$$.cal
12 < set tf=($td/c{1,2,4,8,16,32}d$$.pic $tfc1)
12 > set tf=($td/c{1,2,4,8,16,32}d$$.hdr $tfc1)
13   set ifile=$1
14   onintr quit
15   tabfunc -i acuity > $tfc1 << EOF
# Line 40 | Line 40 | set vp=`vwright V < $ifile`
40   set aext=(`pextrem -o $ifile | rcalc -f $tfc1 -e 'max(a,b):if(a-b,a,b);$1=acuity(log10(max(179*(.265*$3+.67*$4+.065*$5),1e-4)))'`)
41   ( rcalc -e "$vp" -e "A:3438*sqrt(Vhn/$pres[1]*Vvn/$pres[2])" \
42          -e 'f=60/A/2/$1;cond=if(1.5-$1,1,if(1-f,-1,if($1-'"$aext[2]"',-1,$1-'"$aext[1])))" \
43 <        -o 'pfilt -1 -r 2 -x /${f} -y /${f} '"$ifile | pfilt -1 -r 1 -x $pres[1] -y $pres[2] > $td/"'c${$1}d'$$.pic \
43 >        -o 'pfilt -1 -r 2 -x /${f} -y /${f} '"$ifile | pfilt -1 -r 1 -x $pres[1] -y $pres[2] > $td/"'c${$1}d'$$.hdr \
44          | csh -f ) << EOF
45   1
46   2
# Line 63 | Line 63 | go = clarity*gi(clear_picture) + (1-clarity)*gi(fuzzy_
63   bo = clarity*bi(clear_picture) + (1-clarity)*bi(fuzzy_picture);
64   picture_acuity(n) : select(n,1,
65   _EOF_
66 < set pf=($td/c1d$$.pic)
66 > set pf=($td/c1d$$.hdr)
67   foreach i (2 4 8 16 32)
68 <        if ( -f $td/c${i}d$$.pic ) then
69 <                set pf=( $pf $td/c${i}d$$.pic )
68 >        if ( -f $td/c${i}d$$.hdr ) then
69 >                set pf=( $pf $td/c${i}d$$.hdr )
70                  echo -n "$i," >> $tfc1
71          endif
72   end

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines