3 algo="d" #algorythm, Dubois by default
4 model="rc" #color model, green-magenta by default
5 param="" #leave blank, will be -$algo$model
12 -d|--dubois) algo="d";;
13 -f|--full|--full-color) algo="f";;
14 -h|--half|--half-color) algo="d";;
15 -rc|--rc|--red-cyan) model="rc";;
16 -mc|--mc|--magenta-cyan) model="mc";;
17 -gm|--gm|--green-magenta) model="gm";;
18 -ab|--ab|--amber-blue|yellow-blue) model="ab";;
19 -[dfh]rc|-[dfh]gm|-[fe]mc|-dab) param="$1";;
20 -*) echo "no such color model" >/dev/stderr; exit 1;;
21 *) if [ -z "$left" ]; then
23 elif [ -z "$right" ]; then
25 elif [ -z "$stereo" ]; then
33 [ -z "$param" ] && param="-$algo$model"
34 [ -z "$stereo" ] && stereo="${left}_stereo.jpg"
36 geom=$(identify "$left" |sed -rn 's:^.* ([0-9]+x[0-9]+) .*$:\1:gp')
39 stream "$left" "$left.bts"
40 stream "$right" "$right.bts"
42 echo -n anaglyphing...
43 anaglyph "$param" "$left.bts" "$right.bts" "$stereo.bts"
47 convert -depth 8 -size "$geom" "rgb:$stereo.bts" "$stereo"
51 rm "$left.bts" "$right.bts" "$stereo.bts" 2>/dev/null