Linux Format

The Pi High Quality Camera

Interchang­eable lenses, powerful sensor, flexibilit­y and resolution all make a winner says Les Pounder.

-

Interchang­eable lenses, powerful sensor, flexibilit­y and resolution all make a winner, says Les Pounder.

The Raspberry Pi Camera Module is one of those add-ons that we love to play with. Creating images and videos using a Pi in real time is still mind blowing for most, but the two previous first-party camera modules have suffered with a fixed focus lens – albeit one of good quality – and fragile constructi­on.

Enter the Raspberry Pi High Quality Camera, a new module that ups the image quality with a new 12MP sensor and supports interchang­eable lenses and tripodmoun­ting. The module is larger and, at £50 without any of the required lenses, quite a bit more expensive than prior models. However, the increased resolution and flexibilit­y make it a great choice for photograph­y-intensive projects.

A 12.3 megapixel Sony IMX477R sensor offers significan­tly more pixels than the 8MP Pi Camera V2, the previous first-party module which will remain on sale. The camera is also much larger than previous models, measuring 38mm square, versus 24 x 23mm for the V2.

The size increase is because of an interchang­eable C mount where compatible lenses (sold separately) can be screwed into place. The included adapter will also enable CS lenses to be used with the camera.

At the four corners of the camera are M2.5 screw holes, which can be used to mechanical­ly connect the camera to an object or frame. At the base of the camera is a 0.25-inch screw point for connecting the camera to a standard photograph­y tripod.

The final hardware feature is the inclusion of a 200mm ribbon cable compatible with the CSI (camera) connector on all models of Pi, with the exception of the Pi Zero range which requires an adapter for the later boards. Take care when inserting the cable into your powered-down Raspberry Pi because the connection is fragile.

When using the Raspberry Pi High Quality Camera, you’ll need to have a reliable power source. In our tests with a Raspberry Pi 4 we found that the screen would go blank when taking an image because of the amount of power being used. The solution is to use the official Raspberry Pi USB charger or another that provides at least 3 amps and 5 volts of reliable juice.

The camera is nothing without a lens, and in our supplied review unit we tested a 6mm CCTV C-mount lens and a 16mm Cs-mount lens. The lenses retail for £12 and £40, respective­ly, and you’ll need to buy one right away because the module doesn’t include one in the box.

The software side

To use any of the official cameras we first need to enable the camera interface in the Raspberry Pi Configurat­ion tool ( sudo raspi-config ). Then, after a reboot, we can start taking pictures.

You may be thinking that we could use the camera with applicatio­ns such as Cheese or guvcview, but sadly this is not easily done. In our tests the images created with Cheese suffered from a nasty purple tint, and guvcview would refuse to start when the camera was connected. Hopefully, future software updates will resolve these problems. However, on the bright side, the Chromium browser did recognise it as a webcam and we were able to use it successful­ly in Google Meet.

Presumably, any other web-based camera applicatio­n would work just as well.

The first time we take a picture with any official camera, we use raspistill , Raspbian’s built-in capture command, which can quickly show if the camera is connected and working as expected. To test the focus of the camera we ran raspistill with the -k switch, which enabled us to set the focus of the lens.

The maximum resolution is 4,056x3,040 pixels (5K) and this produces an image of around 6MB in size. Images are typically saved as JPG, but we can also select RAW, GIF, BMP, PNG, YUV420 and RG8888 file formats.

Another way to capture images and video is via the Picamera Python module, which enables the camera to be used in projects powered by the popular programmin­g language. With Picamera we can trigger the camera to take an image or video using sensors and inputs connected to the GPIO. At the time of writing the Picamera library has basic functional­ity and can record 1,080p video and 5K images, and also manipulate the images on the fly. Enhanced functional­ity for the Raspberry Pi High Quality Camera is still a little way off yet, but developers are working to make this happen.

Image quality

The previous camera modules provided a decent entry into photograph­y with Raspberry Pi, but these images were okay at best. With a fixed focus lens, the subject had to be brought to the lens and compositio­n was cramped. Version 2 of the Raspberry Pi Camera Module did feature a focus ring to alter the focus of the camera. But this required a special tool to rotate, otherwise you’d risk scratching the lens. Colour reproducti­on was poor and image quality was grainy. But for less than £24 (sometimes less than £8) what did we expect?

With the High Quality Camera, we see much sharper images with rich colours. A manually controlled focus means that we can compose our shots and focus on specific areas while blurring out the rest of the shot for that profession­al look.

We took the same shots using the older V2 camera and the new High Quality Camera and you can easily see the images are vastly superior with the new camera.

Overall the image quality with the new camera is much better. Indoors and out, we were able to take clear images and change the light levels manually and focus our shots according to the subject. To record video we can use the Python Picamera library or we can use raspivid in the terminal. The video output from the latter is in h264 format, which can be played using the VLC or omxplayer media players. At the time of writing the playback isn’t perfect, and can jump around erraticall­y from time to time. But playing the same video on our Lenovo laptop provided a smooth experience.

So can the camera capture 4K video? Sorry, no. The best is still 1,080p at 30fps. We did push the camera a little further and managed to get 1,080p at 60fps, but it was a little glitchy. To capture higher frames per second videos we need to drop the resolution. We captured decent footage at 800x600 120fps, but it was still a little glitchy. We found that converting the video to m4v via the excellent Handbrake video conversion tool provided much better playback.

Pi Zero friendly?

The Raspberry Pi High Quality Camera is designed to work with the majority of Pis. The only exception being the first generation of Pi Zero, which has no CSI port. If you have a Pi Zero with the small CSI connector then you can connect up the Raspberry Pi High Quality Camera Module and use it in a project. We tested 1,080p video recording and still images at maximum resolution on a Pi Zero. All worked well, if a little slowly compared to a Pi 4. So if you’re planning to use the Pi Zero with this camera, don’t expect high-speed reactions for bike trail jaunts or home security, but you will get great results.

 ??  ??
 ??  ?? The new camera dwarfs the old V2 camera module.
The new camera dwarfs the old V2 camera module.
 ??  ?? The supplied ribbon cable enables you to connect the camera to all models of the Raspberry Pi board.
The supplied ribbon cable enables you to connect the camera to all models of the Raspberry Pi board.
 ??  ?? The new camera module with lens attached is a beefy combinatio­n.
The new camera module with lens attached is a beefy combinatio­n.
 ??  ?? The Raspberry Pi High Quality Camera doesn’t come supplied with a lens, so for this review we used CCTV mount lenses,
The Raspberry Pi High Quality Camera doesn’t come supplied with a lens, so for this review we used CCTV mount lenses,

Newspapers in English

Newspapers from Australia