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.
“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
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:Shell1raspistill -o image.jpg
- Capture a 5s video in h264 format:Shell1raspivid -o video.h264
- Capture a 10s video:Shell1raspivid -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:Shell1sudo apt-get install mplayer netcat-openbsd
and run the following command:Shell1nc -l 5001 | mplayer -fps 31 -cache 1024 -
- Windows PC
Download MPlayer and Netcat.
Start a command promt, and type the following type:Shell1[Path to nc.exe]\nc.exe -L -p 5001 | [Path to mplayer.exe]\mplayer.exe -fps 31 -cache 1024 -
- Mac OS X
Run the following command in Terminal to view the feed using MPlayer:Shell1nc -l 5001 | mplayer -fps 31 -cache 1024 -
You may also want to view the feed directly from the Raspberry Pi:
nc -p 5001 -l > buffer | /opt/vc/src/hello_pi/hello_video/hello_video.bin buffer
Raspicam source code is available on github.
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
|Support CNX Software - Donate via PayPal, become a Patron on Patreon, or buy review samples|