Revision: | 1.1 |
Committed: | Fri Feb 28 20:20:56 2003 UTC (21 years, 3 months ago) by greg |
Content type: | application/x-csh |
Branch: | MAIN |
CVS Tags: | rad5R4, rad5R2, rad4R2P2, rad5R0, rad5R1, rad3R7P2, rad3R7P1, rad4R2, rad4R1, rad4R0, rad3R5, rad3R6, rad3R6P1, rad3R8, rad3R9, rad4R2P1, rad5R3, HEAD |
Log Message: | Created script for computing Reinhard's photographic tone-mapping |
# | Content |
---|---|
1 | #!/bin/csh -f |
2 | # |
3 | # Apply Reinhard's simple tone operator |
4 | # |
5 | if ($#argv != 3) then |
6 | echo Usage: $0 key input.hdr output.tif |
7 | exit 1 |
8 | endif |
9 | set lavg=`pvalue -h -H -b -d $argv[2]:q | total -p -m` |
10 | set lmax=`pextrem $argv[2]:q | sed -n '2s/^[1-9][0-9]* [1-9][0-9]* [^ ]* \([^ ]*\) .*$/\1/p'` |
11 | pcomb -e "Lavg:$lavg;Lwht:$lmax;a:$argv[1]" -f reinhard.cal $argv[2]:q \ |
12 | | ra_tiff - $argv[3]:q |