#!/bin/csh -f

if ($#argv != 2) then
echo "usage: runmytwist im1.png out1twisted.png"
echo ""
exit 1
endif
set m = tmp-twist.m
cat > $m << EOF
path(path,'/home/schar/public_html/colormatching');
a = imread('$1');
c = mytwist(a);
imwrite(c, '$2');
EOF

matlab -nosplash -nodesktop < $m
rm $m
