This page has information on using a USB webcam with the Raspberry Pi.
Webcam with the Terminal
How to use fswebcam
Consider the following commands to get started and use the webcam from the command line:
- <sudo apt install fswebcam>
- might need to to use <sudo usermod -a -G video user name>
- to take a simple picture use <fswebcam image.jpg>
- to change image resolution <fswebcam -r 1280×720 image.jpg>
- to remove the banner under the picture <fswebcam –no-banner image.jpg>
- to skip the first frame which is usually camera set up <fswebcam –skip1 image.jpg>
- to find the list of cameras connected to the RaspPi <fswebcam -list-inputs>
Using OpenCV to Control a Webcam
Installing and using OpenCV to manage a webcam
Using a Webcam on Raspberry Pi
- sudo install fswebcam
- sudo usermod -a -G video root or sudo usermod -a -G video pi
- fswebcam image.jpg