The Raspberry Pi Camera Board is the official camera module for the Raspberry Pi microcomputer line.
Rather, there are two such modules: Raspberry Pi Camera Board V2 and Raspberry Pi NoIR Camera Board V2, which differs from the usual version by a cut-out IR filter, due to which the picture from such a camera looks somewhat phantasmagoric during the day, but it is clearer and more legible in conditions of insufficient lighting.
This review looks at the “regular” Raspberry Pi Camera Board V2 module
- Model name : Raspberry Pi Camera Board V2
- Resolution : 8MP (up to 3280×2464)
- Sensor : Sony IMX 219 PQ CMOS, ¼ inches
- Supported video formats : 1080p (30fps), 720p (60fps), 640 × 480p (90fps)
- Focal length : 33 mm
- Lens speed : f / 2
Appearance and scope of delivery
The camera comes in a cardboard box with the manufacturer’s logo.
All Raspberry Pi Foundation products are manufactured at the facilities of two companies – RS Components (England) and element14 (China). I purchased a camera module manufactured by element14, for the same money and from the same seller you can take an English assembly model, the difference between them will only be in the box printing.
In the box is the camera itself with a loop connected to it and a safety manual in different languages, including Russian.
The loop length is 15.5 cm. It is compatible with the CSI interface on all models of the Raspberry Pi line except Zero and Zero W, which use a reduced version of the connector, which is connected to through a special adapter. In Raspberry Pi Zero W Review, this adapter can be seen in the photographs.
The dimensions of the module are 23 × 25mm.
There are 4 holes for fixed mounting with screws or latches.
On the back of the module There is a connector for connecting a loop.
Most cases for the Raspberry Pi 3 are not very adapted to work with the camera module. It is possible to bring the loop out, but how to fix the camera in a static position are the user’s problems.
I myself ordered a Raspberry Pi Camera Board with a view to use in tandem with Raspberry Pi the Zero the W . The cover of the standard case of this microcomputer is already equipped with an opening for the camera, and the characteristics of the small “raspberry” are more suitable for such tasks undemanding to processor power.
Raspberry pi camera setup
Connect and configure the camera
All the drivers necessary for getting started are already present in the Raspbian distribution, but for the camera to work, you must manually enable it in the settings:
In the settings, select the item “Interfacing Options”
And in the menu that opens – “Camera”.
After enabling camera module support, the configuration utility will prompt you to reboot. We agree.
The last step is to edit the /etc /modules file
sudo nano /etc/modules
And add the line bcm2835-v4l2 to it .
You can verify that the settings are correct using the command
If everything went fine, then the camera module will be displayed as video0 in the listing that appears .
Control Raspberry Pi Camera from the console
In order to take photos and videos using the Raspberry Pi Camera Board , two console utilities that are present in Raspbian out of the box are enough : raspistill and raspivid .
In order to take a photo you need to run the command:
raspistill -o image.jpg
This command takes a photo and saves it to the image.jpg file in the directory from which it starts (by default it is / home / pi).
With the default settings, the camera shoots at a maximum resolution of 3280 × 2464 pixels, 1 photo weighs ~ 4.5 Mb. If you open the resulting photo in MS Paint and without making any changes, simply save it under a different name, then the file size immediately decreases to ~ 2 Mb.
A couple of examples of photos received from the camera. By clicking with the middle mouse button they can be opened in the original resolution. Images turned out to be a little more blurry than it could be, because during the shooting I held the camera in my hand. With a hard mount, the camera will not shake and the image will become a little sharper.
What can be said about the quality of the photo? There is no autofocus here, and the fixed focus is set to long-range plans by default (this is clearly seen in the photograph with the monitor, where the monitor is clearly not in focus, but the wallpaper behind it).
The camera is not suitable for subject shooting, for photographing texts, too – but landscape views will turn out normally. That is, it is quite suitable for video surveillance purposes. Well, the focus can be tightened up manually, achieving optimal quality in a stationary location.
In general, the module shoots at the level of modern budget smartphones, which, considering its cost, is quite good. The camera does not have IR illumination and quickly fades in the dark. So for work in low light conditions it is better to choose another model – Raspberry Pi NoIR Camera Board .
To shoot a video, you need to run the command:
raspivid -o video.h264
Which will write the video to the video.h264 file until the moment of its interruption.
To record a video of a fixed length, the -t switch is added to the command, indicating the duration of the video in milliseconds:
raspivid -o video.h264 -t 10000
In this case, a video of 10 seconds in length will be shot. The weight of a file with a ten-second video in fullHD resolution without transcoding is 20 MB.
Also, when shooting video and photos using the Raspberry Pi Camera Board, you can rotate the camera with the -vf (vertical flip) and -hf (horisontal flip) keys.
The quality of the resulting video is comparable to the average car DVR.
If you need to transcode the video track from the H.264 format to the MPEG4 format, install the GPAC utility package:
sudo apt-get install -y gpac
And run the transcoding:
MP4Box -add video.h264 video.mp4
The output is a file in .mp4 resolution, understood by all modern devices and video players.
For the camera module, you can come up with more complex use cases.
For example, turn a “raspberry” into an IP camera. Or shoot timelapses. Or set up a script that, when a certain trigger is triggered (for example, a motion sensor, or when the Telegram bot receives the corresponding command) takes a photo and uploads it to the cloud on the Internet.
I will write more about some of these things later in separate articles.
Raspberry Pi Camera Board V2 Advantages and disadvantages
- Good quality for the price
- Virtually no setup required before starting work
- Compact dimensions and compatibility with the Raspberry Pi Zero W
- Fixed focus
- Lack of IR illumination
I liked the Raspberry Pi Camera Board V2 module.
Compact and inexpensive module that produces a picture of sufficient quality for use for video surveillance. Its closest competitors are ordinary webcams of the budget price segment.
But the design of a single-board computer with a “webcam” connected to it via USB will turn out to be more cumbersome and clumsy than the design using a module specially designed for this purpose and a compatible case.
I recommend to buy, along with the Raspberry Pi the Zero the W .