FloatImg4PythonBinding/Fonderie/essai.sh

60 lines
1.3 KiB
Bash
Raw Normal View History

2020-12-02 19:24:54 +01:00
#!/bin/bash
2021-01-08 22:57:45 +01:00
# ------------------------------------------------------------
2021-01-10 22:52:33 +01:00
essai_filtres ()
2021-01-08 22:57:45 +01:00
{
2021-01-10 22:52:33 +01:00
FILTRES=$(./t -L | awk 'NR>1 { print $1 }' | sort)
2020-12-07 04:45:51 +01:00
rm /tmp/fstack*.png
2020-12-02 19:24:54 +01:00
2021-02-25 08:23:27 +01:00
SRC=$(ls -rt1 $HOME/Essais/FondageDePlomb/capture/* | tail -1)
# SRC=mire.fimg
2021-01-10 22:52:33 +01:00
2020-12-04 23:14:44 +01:00
for F in $FILTRES
do
2020-12-07 04:45:51 +01:00
I="/tmp/fstack-"$F".png"
2021-01-10 22:52:33 +01:00
echo ; echo ======== $I
./t -v -i $SRC -F $F -o foo.png
txt=$(printf "( %-10s )" $F)
convert foo.png -pointsize 48 -kerning 0 \
2020-12-07 04:45:51 +01:00
-fill Gray80 -undercolor Gray20 \
2020-12-04 23:14:44 +01:00
-font Courier-Bold \
2021-01-10 22:52:33 +01:00
-annotate +10+50 "$txt" \
2020-12-04 23:14:44 +01:00
$I
done
2021-01-10 22:52:33 +01:00
echo ; echo "making gif89a..."
convert -delay 200 /tmp/fstack*.png foo.gif
2021-01-08 22:57:45 +01:00
}
# ------------------------------------------------------------
2021-01-13 16:09:27 +01:00
essai_singlepass ()
2021-01-08 22:57:45 +01:00
{
MP4="/home/tth/Essais/FondageDePlomb/foo.mp4"
2021-01-16 11:29:40 +01:00
INPUT="/home/tth/Essais/FondageDePlomb/capture/02[0123]??.fimg"
2021-02-23 11:30:49 +01:00
FILTRE="multidots:liss3x3:nothing:liss3x3:liss3x3"
2021-01-13 16:09:27 +01:00
OUTDIR="/tmp/x8/"
2021-01-11 22:22:03 +01:00
echo '********* essai single *********'
2020-12-04 23:14:44 +01:00
2021-01-13 16:09:27 +01:00
rm $OUTDIR/*.png
2020-12-08 15:51:07 +01:00
2021-01-13 16:09:27 +01:00
time ./singlepass -v -g "$INPUT" -F $FILTRE -O $OUTDIR -s
2021-01-08 22:57:45 +01:00
2021-01-13 16:09:27 +01:00
echo ; echo "encoding picz to " $MP4
2021-01-08 22:57:45 +01:00
ffmpeg -nostdin \
-loglevel error \
2021-01-13 16:09:27 +01:00
-y -r 25 -f image2 -i /tmp/x8/%05d.png \
2021-01-08 22:57:45 +01:00
-c:v libx264 -pix_fmt yuv420p \
$MP4
}
# ------------------------------------------------------------
# MAIN
2021-02-23 03:22:14 +01:00
essai_filtres
2021-01-08 22:57:45 +01:00
# ------------------------------------------------------------