2020-10-06 13:01:48 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-10-09 01:26:07 +02:00
|
|
|
src=/dev/shm/foo.fimg
|
|
|
|
out=out.fimg
|
|
|
|
|
|
|
|
maxi=99
|
|
|
|
W="640"
|
|
|
|
H="480"
|
|
|
|
grabopt=" -s 640x480 -v -p 0 -n 100 -c cos01 "
|
2020-10-07 11:32:23 +02:00
|
|
|
|
2020-10-07 15:26:34 +02:00
|
|
|
mkdir V
|
2020-10-06 13:01:48 +02:00
|
|
|
|
2020-10-09 01:26:07 +02:00
|
|
|
G=$(printf "%dx%d+0+0" $W $H)
|
|
|
|
|
2020-10-06 13:01:48 +02:00
|
|
|
for foo in $(seq 0 $maxi)
|
|
|
|
do
|
|
|
|
|
2020-10-07 15:26:34 +02:00
|
|
|
echo
|
|
|
|
|
2020-10-06 16:30:42 +02:00
|
|
|
grabvidseq -$grabopt -o $src
|
|
|
|
|
2020-10-06 13:01:48 +02:00
|
|
|
fval=$(echo "$foo / $maxi" | bc -l)
|
2020-10-09 01:26:07 +02:00
|
|
|
./t -k $fval -v qsortrgb $src
|
|
|
|
echo $foo ' = ' $fval
|
2020-10-06 13:01:48 +02:00
|
|
|
|
2020-10-09 01:26:07 +02:00
|
|
|
dst=$(printf "V/%03d.png" $foo)
|
2020-10-06 13:01:48 +02:00
|
|
|
|
2020-10-09 01:26:07 +02:00
|
|
|
montage $src $out -geometry $G $dst
|
2020-10-06 13:01:48 +02:00
|
|
|
|
|
|
|
done
|
|
|
|
|
2020-10-09 01:26:07 +02:00
|
|
|
convert -delay 10 V/*.png foo.gif
|