Home > Hardware, Linux, Video > Raspberry Pi Camera Module Is Now Available, How-to Use It

Raspberry Pi Camera Module Is Now Available, How-to Use It

About one year after showing the first image from the camera module prototype, the Raspberry Pi Foundation announced the Camera board is now available for purchase on RS Component or Element14. Navigating either of these sites is a nightmare, but, if you’re lucky, you should eventually find the camera board for around $25 before taxes and shipping.

Raspberry_Pi_Camera_Module

“Raspicam” features the following hardware specifications:

  • Omnivision 5647 sensor in a fixed-focus module
  • 5MPixel sensor
  • Still picture resolution: 2592 x 1944
  • Max video resolution: 1080p
  • Max frame rate: 30fps
  • Size: 20 x 25 x 10mm
  • Connection by flat ribbon cable to 15-pin MIPI Camera Serial Interface (CSI) connector S5 on Raspberry Pi computer board

The first thing you’ll have to do with the camera is to connect it to the CSI connector on your Raspberry Pi, just behind the Ethernet connector on model B. James explains it very clearly in the video below.

]

Now that the camera is connected, you’ll need to update your Raspbian installation. Login to your pi, and run those commands:

sudo apt-get update
sudo apt-get upgrade

This may take a little while. After completion, run

sudo raspi-config

and enable the camera module, as shown below.
Raspberry Pi Camera Configuration

Save the settings, and reboot.

Two command lines applications called raspivid and raspstill are available respectively to capture video and still images.

Some example s:

  • Capture an image in jpeg format:
    raspistill -o image.jpg
  • Capture a 5s video in h264 format:
    raspivid -o video.h264
  • Capture a 10s video:
    raspivid -o video.h264 -t 10000

You can use the arrow keys to scroll, and type q to exit. Read here for further details.

It’s also possible to stream the Feed to a Linux, Mac OS X, or Windows computer:

  • Linux PC
    Install dependencies:

    sudo apt-get install mplayer netcat-openbsd

    and run the following command:

    nc -l 5001 | mplayer -fps 31 -cache 1024 -
  • Windows PC
    Download MPlayer and Netcat.
    Start a command promt, and type the following type:

    [Path to nc.exe]\nc.exe -L -p 5001 | [Path to mplayer.exe]\mplayer.exe -fps 31 -cache 1024 -
  • Mac OS X
    Download MPlayer.
    Run the following command in Terminal to view the feed using MPlayer:

    nc -l 5001 | mplayer -fps 31 -cache 1024 -

You may also want to view the feed directly from the Raspberry Pi:

mkfifo buffer
nc -p 5001 -l > buffer | /opt/vc/src/hello_pi/hello_video/hello_video.bin buffer

Raspicam source code is available on github.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter