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:
1 2 |
sudo apt-get update sudo apt-get upgrade |
This may take a little while. After completion, run
1 |
sudo raspi-config |
and enable the camera module, as shown below.
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:
1raspistill -o image.jpg - Capture a 5s video in h264 format:
1raspivid -o video.h264 - Capture a 10s video:
1raspivid -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:
1sudo apt-get install mplayer netcat-openbsd
and run the following command:
1nc -l 5001 | mplayer -fps 31 -cache 1024 - - Windows PC
Download MPlayer and Netcat.
Start a command promt, and type the following type:
1[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:
1nc -l 5001 | mplayer -fps 31 -cache 1024 -
You may also want to view the feed directly from the Raspberry Pi:
1 2 |
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.
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 cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
New 8MP camera model for Raspberry Pi -> http://raspi.tv/2016/new-8-megapixel-raspberry-pi-camera-2-1-launches