Get Snapshots using a RPi Camera

RPi camera is specially designed for Raspberry Pi. Rpi even has an on board, dedicated, connection slot compatible with the RPi camera. This camera module is not compatible for other devices and therefore most people prefer an ordinary webcam over a dedicated RPi camera. But, when it comes to image processing in Pi, Rpi camera performs much better than an ordinary webcam. Higher resolution and improved frame rate are the two key features that makes this module apt for image processing.

Lets check out, step by step, on how to use the Rpi camera module with the Raspberry Pi.

Modules Needed

  1. Raspberry Pi (Any Model)
  2. Raspberry Pi Camera Module

The ‘Pi cam’ captures and encodes video (h.264 HD) using RPi’s GPU and it needs no CPU assistance for the same, whereas an ordinary webcam requires CPU assistance for this process which ultimately reduces the speed of the system. So that makes Rpi cam great for high end image processing in Raspberry Pi.

Moreover Rpi camera weighs less, just over 3g. A short ribbon cable is its mode of connection with the Raspberry Pi. When connected to the RPi board, it gets connected to the RPi processor via Camera Serial Interface (CSI) bus, a higher bandwidth link which carries pixel data from the camera to the processor.

On the RPi board, the RPi camera cable connector slot is placed between the Ethernet port and the HDMI port with the silver connectors facing the HDMI port. To establish hardware connection, just plug in the camera ribbon cable in to this slot. After connecting the cam, run “sudo raspi-config” fron the prompt. If the “camera” option is not listed, run “sudo apt-get update” and “sudo apt-get upgrade” commands in the lx terminal for getting system update. After that run “sudo raspi-config” again and see the listed camera option.

Enable the “camera” option, select “Finish” and reboot your Raspberry Pi.

Thats it! Lets take some pictures! “raspistill” is a command line application used to capture images using RPi cam. To capture an image in jpeg format, type “raspistill -o snapshot.jpg” in the prompt (“snapshot” is the file name for your image).

If you want make a 5 second video with your Raspberry Pi camera module, run “raspivid -o video.h264 -t 5000” in the prompt (“video” is the file name for your video file and “5000″ is the length of the video in milliseconds).

Now you know how to make videos using your RPi. The RPi cam along with a Raspberry Pi can be used as a surveillance camera with image processing schemes.

Resources

  1. A Detailed Raspi Cam Documentation
  2. Raspberry Pi Camera Module Mechanical Dimensions
  3. Raspberry pi camera pinout

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">