FloatImg4PythonBinding/contrib/raytrace.sh

32 lines
521 B
Bash
Raw Normal View History

2022-01-08 21:51:31 +01:00
#!/bin/bash
src="/dev/shm/foo.fimg"
dst="hf.tga"
2022-01-09 09:32:39 +01:00
TMPDIR=${HOME}/TMP
2022-01-08 21:51:31 +01:00
POVOPT="-w512 -h342 +q9 -a "
2022-01-09 09:32:39 +01:00
rm $TMPDIR/hf???.png
2022-01-08 21:51:31 +01:00
2022-01-09 09:32:39 +01:00
for idx in $(seq 0 60)
2022-01-08 21:51:31 +01:00
do
echo "========================== " $idx
grabvidseq -v \
-d /dev/video0 -s 640x480 \
2022-01-09 09:32:39 +01:00
-n 60 -p 1.0 \
2022-01-08 21:51:31 +01:00
-o ${src}
./fimg2povhf $src $dst
2022-01-09 09:32:39 +01:00
out=$(printf "%s/hf%03d.png" $TMPDIR $idx)
2022-01-08 21:51:31 +01:00
echo "raytracing " ${POVOPT} $out
povray -iscene.pov ${POVOPT} -o${out} 2> pov.stderr
# tail -15 pov.stderr
done
2022-01-09 09:32:39 +01:00
convert -delay 10 -colors 240 $TMPDIR/hf???.png foo.gif
2022-01-08 21:51:31 +01:00