Bibliothèque de traitements d'images en virgule flottante. http://la.buvette.org/photos/cumul/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

shoot.sh 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #!/bin/bash
  2. # change this to point to your installed binary
  3. #
  4. GVS=${HOME}/Devel/FloatImg/v4l2/grabvidseq
  5. # ------------------------------------
  6. # set some default values
  7. DEV=/dev/video2
  8. SZ=640x480
  9. NBRE=320
  10. PERIOD=0.0
  11. COUNT=compteur
  12. OPTIONS=" -v "
  13. SHOW="no"
  14. # output format can be of those types:
  15. # .pnm .fimg or .png
  16. OFORMAT="P_%04d.pnm"
  17. # ces parametres peuvent etre surcharges avec
  18. # un fichier nomme "reglages" dans le repertoire
  19. # de travail.
  20. # ------------------------------------
  21. # overide parameters from $PWD
  22. if [ -r ./reglages ]
  23. then
  24. source ./reglages
  25. fi
  26. # ------------------------------------
  27. # get the current picture number
  28. if [ -r $COUNT ]
  29. then
  30. numero=$( head -1 $COUNT )
  31. else
  32. numero=1
  33. fi
  34. # ------------------------------------
  35. # make the output filename
  36. if [ 1 -eq $# ]
  37. then
  38. outfile="$1"
  39. else
  40. outfile=$( printf ${OFORMAT} $numero )
  41. fi
  42. # ------------------------------------
  43. # grab and display the fancy picture
  44. $GVS -d $DEV -n $NBRE -p $PERIOD $OPTIONS -s $SZ -o $outfile
  45. if [ ${SHOW} == "yes" ]
  46. then
  47. display $outfile &
  48. fi
  49. # ------------------------------------
  50. # increment and save the picture number
  51. numero=$(( numero + 1 ))
  52. echo $numero > $COUNT