Tuesday, February 19, 2013

Webcam on Linux

Camera commandline tools on Linux
  • fswebcam
  • streamer
  • uvccapture
  • motion

Example to use fswebcam:


fswebcam -d /dev/video0 -r 320x240 mypic.jpg
 

This will use webcam video0 as a camera device with a resolution of 320x240 pixels and outputs it to the file mypic.jpg.

Another nice feature is to use fbi (on Ubuntu) to display the picture in a terminal.
If you don't have fbi, install it with:
sudo apt-get install fbi
Than show an image as follows:
fbi mypic.jpg
or all available pictures:
fbi *.jpg
With  PgDn or PdUp you can go to the next or previous picture.
If it doesn't work for you, you should google for it, it has something to do with vga setting.

Another very useful tool is ImageMagick for processing images. I'll cover that next time.

No comments:

Post a Comment

NSNotification example