#!/bin/bash GVS=${HOME}/Devel/FloatImg/v4l2/grabvidseq DEV=/dev/video2 SZ=640x480 NBRE=80 PERIOD=0.00 COUNT=compteur # ------------------------------------ # get the current picture number if [ -r $COUNT ] then numero=$( head -1 $COUNT ) else numero=0 fi # ------------------------------------ # make the output filename if [ 1 -eq $# ] then outfile="$1" else outfile=$( printf "P_%04d.pnm" $numero ) fi # ------------------------------------ # take and display the fancy picture $GVS -d $DEV -n $NBRE -p $PERIOD -vv -s $SZ -o $outfile # ------------------------------------ # increment and save the picture number numero=$(( numero + 1 )) echo $numero > $COUNT
Enregistré dans le dd2 du Tetalab.