How to install a USB webcam on Raspberry Pi

Source: Internet
Author: User

How to install a USB webcam on Raspberry Pi

Question: Can I use a standard USB webcam on Raspberry Pi? How can I check if the USB webcam is compatible with Raspberry Pi? In addition, how can I install it on Raspberry Pi?

If you want to take a photo or video on raspberry, you can install Raspberry Pi's camera board. If you don't want to spend extra money on the camera module, another method is your common USB camera. You may have installed it on your PC.

In this tutorial, I will show you how to set a camera on Raspberry Pi. Assume that the system you are using is Raspbian.

Before that, you 'd better check whether your camera is in these known Raspberry Pi compatible cameras. If your camera is not in this compatibility list, you may still be able to detect your camera.

 

Check whether the USB camera is rain Raspberry Pi compatible

Check whether your camera can be detected by Raspberry Pi, insert it into Raspberry Pi USB port, and then enter the following command.

  1. $ lsusb

If the output does not contain your camera, it is possible that the power of your Raspberry Pi cannot supply enough power to your camera. In this case, you can use an independent power cord for your camera, such as an active USB hub, and re-enter the lsusb command. If the camera still cannot be identified, we recommend that you purchase other cameras supported by Raspberry Pi.

In the screenshot above, the USB camera is identified as "1e4e: 0102", but the camera manufacturer is not displayed. When you use it in your notebook's Fedora 20, it successfully detects "1e4e: 0102 Cubeternet GL-UPC822 UVC WebCam ".

Another way to check whether the camera is supported by Raspberry Pi is to check the/dev directory. If/dev/video0 is available, it implies that Raspberry Pi supports your camera.

 

Use USB Webcam to take photos

After the USB camera is mounted to Raspberry Pi, the next step is to take some photos to verify its functionality.

To take a photo, you need to install fswebcam, a small camera program. You can install fswebcam directly through the Raspbian repository.

  1. $ sudo apt-get install fswebcam

After installing fswebcam, run the following command on the terminal to capture a photo from the camera:

  1. $ fswebcam --no-banner -r 640x480 image.jpg

This command can capture a x resolution photo and save it in jpg format. It does not leave any watermark at the bottom of the photo.

This is the result of the 640x480 resolution under fswebcam.

The following example shows a photo with no resolution defined. The image is blue and the default resolution is 358x288.

Install NodeJS on the (Raspberry Pi) Raspberry Pi

Install Weston on Raspberry Pi

Linux OS for Raspberry Pi is available

Raspberry Pi (Raspberry Pi) trial note

Introduction to Raspberry Pi (Raspberry Pi) installation, IP configuration, and software source

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.