Using USB cameras

Instead of using the Raspberry Pi Camera Module, it's also possible to use a standard USB webcam to take still images. You should be aware though that the dedicated camera module is far superior to a USB webcam in terms of image quality. Although, you may already have a webcam knocking about in your box of bits, so why not try it?

Installing the webcam

After you've connected your webcam to a USB port on your Pi, you can check whether it's been recognized using the lsusb command:

$ lsusb

I'm using a Logitech webcam that gets reported as follows with lsusb (Device 006):

pi@raspberrypi ~ $ lsusb Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device ...

Get Building a Home Security System with Raspberry Pi now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.