FloatImg4PythonBinding/scripts/contrast-test.sh

39 lines
655 B
Bash
Raw Normal View History

2019-11-29 19:55:52 +01:00
#!/bin/bash
2019-12-12 12:45:29 +01:00
CMDPATH="/usr/local/bin"
2019-11-29 19:55:52 +01:00
GRAB="quux.fimg"
COS01="cos01.fimg"
2019-12-12 12:13:21 +01:00
COS010="cos010.fimg"
2019-11-29 19:55:52 +01:00
SQRT="sqrt.fimg"
POW2="pow2.fimg"
2019-12-12 12:13:21 +01:00
# --------- conversion fimg -> pnm
2019-11-29 19:55:52 +01:00
f2p ()
{
2019-12-12 12:13:21 +01:00
dst=$(basename $1 .fimg).pnm
echo == converting $1 to $dst
2019-12-12 12:45:29 +01:00
${CMDPATH}/fimg2pnm $1 $dst
2019-11-29 19:55:52 +01:00
}
2019-12-12 12:13:21 +01:00
# --------- capturer une image
2019-12-12 12:45:29 +01:00
${CMDPATH}/grabvidseq -v -u -n 2400 -p 0.04 -o ${GRAB}
2019-12-12 12:13:21 +01:00
echo ERRCODE $?
f2p ${GRAB}
2019-12-12 12:45:29 +01:00
# ----------- traitements
${CMDPATH}/fimgfx pow2 $GRAB $POW2
2019-11-29 19:55:52 +01:00
f2p $POW2
2019-12-12 12:45:29 +01:00
${CMDPATH}/fimgfx sqrt $GRAB $SQRT
2019-11-29 19:55:52 +01:00
f2p $SQRT
2019-12-12 12:45:29 +01:00
${CMDPATH}/fimgfx cos01 $GRAB $COS01
2019-11-29 19:55:52 +01:00
f2p $COS01
2019-12-12 12:45:29 +01:00
${CMDPATH}/fimgfx cos010 $GRAB $COS010
2019-12-12 12:13:21 +01:00
f2p $COS010
2019-11-29 19:55:52 +01:00
2019-12-12 12:45:29 +01:00
echo == Making gif89a
convert -delay 40 *.pnm foo.gif