Linux et images

Dernière modification : 2012/06/30 20:40

Capturer la webcam

Avec mencoder, capturer l'image de la webcam dans un fichier AVI
mencoder tv:// -tv driver=v4l:width=640:height=480:device=/dev/video0 -nosound -ovc lavc -o capture.avi


Redimensionner des images jpg au format PAL

#!/bin/bash
mkdir conv
for i in *.jpg
 do
 echo "$i"
 convert -resize 720x576 "$i" "conv/$i"
 done

Pal = 720x576
HD = 1280×720 pixels (720p) ou 1920×1080 pixels (1080i/1080p)

Animation avec une suite d'images jpeg

mencoder mf://*.jpg -mf fps=10:type=jpeg -ovc lavc -o animation.avi

ou
mencoder mf://*.JPG -mf w=1080:h=720:fps=15:type=jpg -ovc lavc -lavcopts vcodec=mpeg4 -oac copy -o sortie.avi


Vectoriser une image

Avec autotrace
autotrace -output-format svg -output-file logo_zildjian.svg logo_zildjian.png


Assembler un tableau d'images en une seule :

montage -mode Concatenate -tile 3x2 c1l1.jpg c2l1.jpg c3l1.jpg c1l2.jpg c2l2.jpg c3l2.jpg


Faire une planche contact avec plusieurs photos (vid: appelle montage)

convert 'vid:IMGP61*.JPG' planche.jpg


OCR reconnaissance de caratères

À partir de fichier tif en 1 bit, résultats optimisés pour la langue française dans le fichier resultat.txt
tesseract source.tif resultat -l fra


Scripts pour ImageMagick

http://www.fmwconcepts.com/imagemagick/