Raspberry pi Basics

Webcam With Raspberry Pi

Tutorial on How to Interface Webcam With Raspberry Pi :

Raspberry PI application in the field of Image Processing and real time access of the video or image via PI camera or a Webcam is something that makes it very special. Real time image processing schemes can be developed using PI, as it supports the webcam interface, and thereby we can process the algorithms for detection, recognition, segmentation, surveillance etc.

Webcam are USB camera device that can be added to Raspberry pi through its USB jack. Once the Webcam is attached to PI, it can be accessed directly from the GUI or the most effective way is via Terminal Command Line.

We need additional Packages for interfacing Webcam: fswebcam package

Step1: Open the Command Terminal and type lsusb

Step2:   If the camera is detected then a similar message will be displayed, as shown in the image above (marked in red).

Step3: For installing fswebcam software package, type in as follows:

sudo apt-get install fswebcam

Step 4:  After the installation enter the command fswebcam followed with a desired file name for saving the image.

fswebcam testimage.jpg

Step5:  For selecting a proper resolution follow the commands given below:

fswebcam -r 640×480 testimage.jpg

The camera will capture the snapshot and it will be saved in the main folder using the preferred name.

Show More

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button
Close