10 Haziran 2016 Cuma

Raspberry Pi’ye USB Kamera Bağlamak

İlk önce, terminalden fswebcam paketini kuracağız.

pi@raspberrypi:~ $ sudo apt-get install fswebcam

Fotoğraf çekebilmemiz için ilk önce fswebcam yazıyoruz bundan sonra çekeceğimiz fotoğrafımızın ismini ve formatını yazıyoruz fotoğrafımızı çekiyor.
pi@raspberrypi:~ $ fswebcam image.jpg

--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Adjusting resolution from 384x288 to 320x240.
--- Capturing frame...
Captured frame in 0.00 seconds.
--- Processing captured image...

Writing JPEG image to 'image.jpg'.


Fotoğrafın düşük çözünürlüklü olma sebebi varsayılan çözünürlüğü kullanmamız. Şimdi çözünürlük belirterek yeniden resim alalım.
pi@raspberrypi:~ $ fswebcam -r 640x480  image2.jpg

--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
--- Capturing frame...
Captured frame in 0.00 seconds.
--- Processing captured image...
Writing JPEG image to 'image2.jpg'


Şimdi son olarak bannerımızı kaldırarak tekrar resim alalım.
pi@raspberrypi:~ $ fswebcam -r 640x480 --no-banner  image3.jpg

--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
--- Capturing frame...
Captured frame in 0.00 seconds.
--- Processing captured image...
Disabling banner.
Writing JPEG image to 'image3.jpg'.


Kaynak: https://www.raspberrypi.org/documentation/usage/webcams/ 

Hiç yorum yok:

Yorum Gönder