banner

Blog

Mar 18, 2023

Raspberry Pi Camera Module 3 review

A few days before launching the Raspberry Pi Camera Module 3 with HDR and autofocus, Raspberry Pi Trading asked me whether I would be interested in reviewing the new modules, and sent me three samples: the standard module, the Raspberry Pi Camera Module 3 Wide, as well as the NoIR version that lacks an IR filter and is better suited for night shots.

It took a full week for DHL to send the package to my house, but I’ve now had time to review the new Raspberry Pi Camera Module 3, mostly with libcamera, but also Picamera2, focusing on the new features such as HDR, autofocus, and wide angle. I also had a quick try at the Raspberry Pi Camera Module 3 NoIR but without IR lights.

Regular readers know I had already made some DIY camera mounts using empty gum bottles, and I just replaced the Lotte XYLITOL stickers with some CNXSoft stickers for this review.

The first time I used the camera I had some unnecessary problems because a web search sent me to outdated documentation on Raspberry Pi dot org where you are told to enable the camera in the settings and raspi-config. The place where you need to go to for the latest documentation is Raspberry Pi dot com. I still had issues because I downloaded Raspberry Pi OS last month, and when I used libcamera-hello application to check whether the camera was detected it would just report "no camera is available". I just had to update my image with apt, and all good.

The good news is that the Raspberry Pi camera module 3 works out of the box without any configuration. Just make sure your install the latest Raspberry Pi OS or upgrade your installation, and make sure you use the correct documentation and you are good to go.

All my three modules could be detected properly as follows:

Each has a different signature, so if you’re writing an application that needs to detect the camera variants that should not be a problem.

I already reported that when playing with the gum bottle mount, I had troubles with the Camera Module 3 Wide after a while as the system would return errors or show the camera is not available. I initially tried to check the FPC cable connection, but no luck, and I thought I had somehow damaged the module. But I eventually found on the camera was slightly dislodged from the connector (I took it out for the photo).

Once I inserted it and press on it again, the Wide camera module worked as expected.

Let's take some photo samples with libcamera starting with a non-HDR photo with the standard module:

Note I have to rotate the image by 180 degrees because of the way the module is mounted. You can click on the photos to see the original size (but converted to WebP for most people)

Let's now do that with HDR:

I took the photo a few hours before sunset and the difference is not dramatic, but we can better the left side of the background in the HDR photos. We do lose resolution with HDR, as while the first photo has a 4608 x 2592 resolution, the HDR one is 2304 x 2196.

The Camera Module 3 (and the NoIR) can focus from 10 cm to infinity, and I move a subject close to the camera. I looked clear on the small HDMI screen I used, but it was about 9cm from the lens so the logo is a little blurry. We can see the background is blurry because of the focus.

I also used libcamera-vid to test autofocus while shooting a video. That's with HDR enabled.

It works reasonably fast in well-light environments even with HDR enabled. Autofocus feels a bit faster without HDR.

Let's now switch the Raspberry Pi Camera Module 3 Wide placed in about the same position as the first module.

We have a greater field of view and in this particular scene the HDR comes to life as we can see some of the details under the roof of the gazebo.

I place the Linux Tux/CNXSoft logo in the same position as previously (~9cm from the lens) and we can see more of the bottle with the greater field of view, and it's clearer since the Wide camera module can focus from 5cm to infinity.

Autofocus is working relatively well in the video below.

But I’d like to note something interesting which happens with both the standard and wide camera modules. In video mode, the field of view is greater when enabling HDR, while the captured zone is much smaller when HDR is disabled.

That's probably because the resolution is set to 2304×1296 with HDR, and 1536×864 without HDR. I tried to force the resolution to 4608×2592 or 2304×1296 in non-HDR mode:

The videos themselves are recorded at 640×480 resolution:

The NoIR camera module should shine in dark scenes and at night, preferably with IR lights. I just tried it a night with a light on.

I was expecting some pinkish image, so I felt like something was wrong. Switching to the standard camera module does not actually make much difference for this specific scene.

I also tried the NoIR camera during the day to make sure the camera output was different, and indeed it is, with washed-out and pink colors as expected, although not quite as pronounced as samples from the NoiR v2 camera.

I also tried autofocus in HDR mode with the NoIR camera module at night, and it did not work very well, as in not at all.

I also had this issue during day time from time to time, and it depends on the scene and lighting conditions as well. I actually have similar issues with my DSLR camera, but I can always tap the display or switch to manual focus. It should also be possible to do so with the Camera Module 3, but it would require a touchscreen display, a rotary encoder, and implement the software to support those features.

Finally, I gave a try at the Picamera2 Python camera library that was officially released last September. It relies on libcamera, so I only used it with the standard camera module to make sure the new features were properly implemented.

I used the Qt Picamera2 app, after getting it as follows

It started and I could see the camera output for both the Still Capture…

and Video tabs.

The preview window is quite small because I’m using a 1280 x 800 HDMI display, and it would look much better on a Full HD display. You’ll also notice the message "HDR unavailable: install opencv to try it".

Picamera2 is a Python library so so I tried to install Python OpenCV with pip:

The last command took around 1h30 to complete, and it failed due to a missing file:

I ended up spending four hours on this only to find out I should use apt instead:

It took around 2 to 3 minutes to install, and the HDR options are now showing up with the ability to select the number of HDR frames and gamma setting.

The app has plenty of other options with image tuning, pan/zoom, AEC/AWB, and I also notice I could adjust the focus manually by moving a slider. But when I clicked on the "Take photo" button, my Raspberry Pi 4 froze for several long seconds (Numlock would not turn on/off), and eventually, the Qt Picamera2 app crashed. I went to check out the kernel to find out the system had run out of memory:

So besides using a Full HD display, it might be better to run the Qt app on a board with more RAM, as I’m using a Raspberry Pi 4 SBC with 1GB RAM only. I had no such problem with the command line utilities based on libcamera.

I’d like to thank Raspberry Pi Trading for sending the Camera Module 3 for review. The standard versions sell for $25, and the wide-angle modules go for $35. You’ll find them at the usual Raspberry Pi distributors.

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 or become a Patron on Patreon

Related posts:

SHARE