a lot a better things

This commit is contained in:
Tonton Th
2025-01-26 19:32:18 +01:00
parent 9962480356
commit b344d0b762
4 changed files with 37 additions and 21 deletions

View File

@@ -2,6 +2,8 @@
set -ue
source tools/config.sh
TMPFILE="/dev/shm/plot-timing.tmp"
IMAGE="timing.png"
@@ -12,12 +14,14 @@ else
sequence="escadrille"
fi
echo "plot timing $sequence" >> WS/log
# echo "plot timing $sequence" >> WS/log
grep $sequence WS/mp4.timing | tail -3600 | awk ' \
grep $sequence WS/mp4.timing | tail -3600 | awk \
-v nbframes=$NBFRAMES \
' \
BEGIN { \
nbrames=360; \
for (foo=0; foo<nbrames; foo++) { \
# print "nb frames = ", nbframes; \
for (foo=0; foo<nbframes; foo++) { \
mini[foo] = 666; \
maxi[foo] = -42; \
count[foo] = 0; \
@@ -32,7 +36,7 @@ BEGIN { \
} \
\
END { \
for (foo=0; foo<nbrames; foo++) { \
for (foo=0; foo<nbframes; foo++) { \
if (count[foo] > 0) { \
mean = accu[foo] / count[foo]; \
printf "%4d %4f %4d %4d\n", foo, mean, \
@@ -42,10 +46,10 @@ END { \
} \
' > $TMPFILE
# cat -n $TMPFILE | tail # ; exit
# head $TMPFILE ; exit
gnuplot << __EOC__
set term png size 1280,1024
set term png size $Img_Width,$Img_Height
set output "timing.png"
set grid
set xrange [:360]
@@ -58,5 +62,5 @@ gnuplot << __EOC__
"/dev/shm/plot-timing.tmp" u 1:2 w l lc "#000000" t "moyenne",
__EOC__
convert -negate -colorspace gray -level -33% $IMAGE WS/negatif.png
convert -negate -level -33% $IMAGE WS/negatif.png