Raspberry Pi has released an updated camera, Camera Module 3 (aka Camera v3 or Camera Module v3), with an MSRP of $25 for standard or $35 for the wide angle version. The new module brings more pixels, rivalling the High Quality Camera’s 12MP while keeping the smaller sensor-on-a-board form factor. What’s new about this tiny camera is autofocus. This is the first official Raspberry Pi camera with autofocus, though Arducam’s High Resolution camera delivered that functionality last year.
The Raspberry Pi camera was the first official accessory from Raspberry Pi, way back in 2013. The original 5MP model was updated to v2 in 2016 which brought 8MP to the game. Then the cameras got a bit more “serious” with the 12MP Raspberry Pi High Quality Camera in 2020; this version brought interchangeable lenses and a plethora of choices for the keen photographer, but it’s pricey and doesn’t come with a lens.
Fast forward to 2023 and we have a new mainstream Pi camera, the Raspberry Pi Camera v3 which updates the original camera’s sensor-on-a-board form factor to pack a 12MP Sony IMX708 sensor and auto focus. It also comes in four flavors: standard, wide angle, NOIR and NOIR wide angle.
We tested both the standard and wide angle (non-NOIR) versions of the Camera v3 and found the image quality excellent, with the auto focus feature a really helpful upgrade.
Raspberry Pi Camera v3 Specifications
Sensor | Sony IMX708 |
Optical Size | 7.4mm sensor diagonal |
Sensor Resolution | 11.9 Megapixels |
Still Resolution | 4608 x 2592 pixels |
Video Modes | 1080p50, 720p100, 480p120 |
Autofocus System | Phase Detection Autofocus |
Focus Range | 10CM to infinity |
Focal Length | 4.74mm |
Dimensions | 25 x 23.9 x 11.5 mm (75 degree) |
25 x 23.9 x 12.4 mm (120 degree “wide angle”) |
Design of Raspberry Pi Camera v3
At a casual glance there isn’t much difference between Camera v3 and v2, but underneath a silver package lies the auto focus system for the Sony IMX708 sensor. This extra package is where we hit a small issue. The girth of the camera, from the end of the lens to the rear of the PCB, v3 is thicker than previous models.
The standard model is 11.5mm thick, and the wide angle version comes in at 12.4mm. This isn’t a massive issue for most, but it could cause issues for existing cases and mounts. If you spot a cool looking camera holder to 3D print with one of the best 3D printers, then you will need to tweak the print for the extra thickness. We printed a quick stand in just over an hour with our Creality Ender 2 Pro though it required a little MacGyver tweaking to fit the thicker module.
Comparison to Legacy Camera Modules
We consulted Raspberry Pi’s excellent documentation covering all of its previous camera models and using its data we included the Raspberry Pi Camera v3 for comparison. The v3 comes right between the v2 and the HQ camera, exactly as to be expected. We gain more megapixels and an overall larger image. We didn’t have precise data for some columns so we’ll fill those in later.
Header Cell – Column 0 | Camera Module v1 | Camera Module v2 | HQ Camera | Camera Module v3 |
---|---|---|---|---|
Net price | $25 | $25 | $50 | $25 – $35 |
Size | Around 25 × 24 × 9 mm | 38 x 38 x 18.4mm (excluding lens) | 25 × 24 × 11.5mm (12.4mm height for Wide variants) | |
Weight | 3g | 3g | ||
Still resolution | 5 Megapixels | 8 Megapixels | 12.3 Megapixels | 11.9 Megapixels |
Video modes | 1080p30, 720p60 and 640 × 480p60/90 | 1080p47, 1640 × 1232p41 and 640 × 480p206 | 2028 × 1080p50, 2028 × 1520p40 and 1332 × 990p120 | 1080p50, 720p100, 480p120 |
Sensor | OmniVision OV5647 | Sony IMX219 | Sony IMX477 | Sony IMX708 |
Sensor resolution | 2592 × 1944 pixels | 3280 × 2464 pixels | 4056 x 3040 pixels | 4608 × 2592 pixels |
Sensor image area | 3.76 × 2.74 mm | 3.68 x 2.76 mm (4.6 mm diagonal) | 6.287mm x 4.712 mm (7.9mm diagonal) | |
Pixel size | 1.4 µm × 1.4 µm | 1.12 µm x 1.12 µm | 1.55 µm x 1.55 µm | 1.4μm × 1.4μm |
Optical size | 1/4″ | 1/4″ | 1/2.3″ | ? |
Full-frame SLR lens equivalent | 35 mm | ? | ||
S/N ratio | 36 dB | ? | ||
Dynamic range | 67 dB @ 8x gain | ? | ||
Sensitivity | 680 mV/lux-sec | ? | ||
Dark current | 16 mV/sec @ 60 C | ? | ||
Well capacity | 4.3 Ke- | ? | ||
Depth of field | approx. 1 m to infinity | adjustable with supplied tool | N/A | ? |
Focal length | 3.60 mm +/- 0.01 | 3.04 mm | Depends on lens | 4.74mm |
Horizontal field of view | 53.50 +/- 0.13 degrees | 62.2 degrees | Depends on lens | ? |
Vertical field of view | 41.41 +/- 0.11 degrees | 48.8 degrees | Depends on lens | ? |
Focal ratio (F-Stop) | 2.9 | 2 | Depends on lens | ? |
Maximum exposure times (seconds) | 6 | 11.76 | 670.74 | ? |
Using Raspberry Pi Camera v3
At the time of writing, there are two main ways to control the camera. The libcamera library (which replaced raspistill and raspivid) and Picamera2 (an in-house update to the long running community created Picamera). With our Raspberry Pi 4 powered off, we inserted the camera cable and locked it into place. As the camera uses the same connector as previous models, it means that it can be used with the full range of Raspberry Pi boards, including the Raspberry Pi Zero 2 W via an adapter cable.
The biggest downside of the official camera modules has always been the form factor. It lacks a mechanism to lock the camera in place (in a class of 30 educators, all running their cameras, we found innovative ways to secure them). This issue was corrected with the HQ camera’s screw mount but with Camera Module v3, we see only the legacy mount points on the corners of the camera.. Arducam’s autofocus camera features a case which provides a mount point via a clip-on case. We would’ve loved this to come as standard with Camera Module 3. Alas it seems that it will not be, but we can always 3D print a quick holder.
We powered on our Pi running the latest Raspberry Pi OS release, and our first thought was to enable the camera interface, but then we realised that we no longer had to do that. We updated our list of software repositories and then upgraded the software. This pulled the latest Camera Module v3 updates, including Picamera2.
Our first test was via libcamera. We captured a series of JPEG images. The camera was placed 9 inches away from the test objects and lighting was consistent between each shot. What we found in our tests was that still images were excellent. Be they near (4 inches / 10cm) or far they were of consistent quality and on par with the High Quality camera. Autofocus times for still images were quick; we could see the camera hunting for a focus target, but it was never “juddery”.
Recording videos was a different matter. The focus would try and secure a target, which it did quickly, but we could see the “steps” as the focus worked to keep up. That said, close up focus was excellent in our videos, picking up the surface mount components of the original Raspberry Pi.
A new feature included with Camera Module 3 is HDR (High Dynamic Range) which increases the dynamic luminosity range of images. With HDR we get deeper darkness and brighter images. This works by capturing multiple images of the same scene, each with different exposures. These images are then combined into a single image which encompasses the entire range.
Camera Module 3’s HDR images are restricted to 3MP which libcamera uses to generate an image with a resolution of 2304 x 1296. We took two pictures of the same scene, a close up of a Raspberry Pi. One image was with HDR; the other without. The HDR image was unmistakably brighter and vibrant, but it did have a little noise. The non-HDR image lacked the brightness, but also had little to no noise. HDR would be an interesting addition to Raspberry Pi trail cams and to record landscape scenes.
Moving our tests to Picamera2, we recreated the steps in a recent how to but we noticed that autofocus wasn’t very “auto.” It turns out that we need to include an extra class import and a line of code before we open a preview window and record. This extra line is picam2.set_controls({“AfMode”: controls.AfModeEnum.Continuous}) and it comes from the libcamera Controls class.
With this line we instruct the camera to hunt for focus. The process and quality is identical to libcamera. Stills were of good quality and the camera focus hunt was acceptable. Video recording was a little stuttery as the focus searched for a target, but again it was acceptable.
Picamera2 also has HDR, but not directly in the module. The issue is with V4L2, the kernel interface between the camera and the Linux video system. Right now it does not offer ready support for HDR with this camera. In order to activate HDR for Picamera2 we need to open a terminal and manually set the camera to use it.
v4l2-ctl --set-ctrl wide_dynamic_range=1 -d /dev/v4l-subdev0
and to turn it off we use
v4l2-ctl --set-ctrl wide_dynamic_range=0 -d /dev/v4l-subdev0
We took two images with Picamera2, one using HDR and the other without. The results are nearly identical to libcamera, but dare we say that the HDR Picamera image looks a little better?
Wide-Angle Version of Raspberry Pi Camera v3
The wide angle version of Camera Module 3 brings a 120 degree angle of view. In other words we get wider shots that encompass a greater area. The extra field of view brings with it a little distortion in the vertical plane – think the opening crawl to Star Wars. But the extra horizontal space is remarkable and shows (for better or worse) the state of our workbench.
Other than the lens, everything is the same as the standard 75 degree version. We took some close up images with the wide lens, to show the distortion. We also created a quick scene to show colors, and a scene comparison for HDR images.
We’d use this lens for outdoor projects such as trail cams, bird watching, landscapes and sports.
What Projects Is Raspberry Pi Camera v3 Good For?
The fixed focus of the previous camera modules (yes, you could hack them with a little scalpel work on the lens ring) meant that Machine Learning and AI projects could be difficult. Faces / objects would need to be a set distance from the camera in order to “see” them.
With the Camera Module 3 we have an opportunity to extend the vision of our ML/AI projects and use them to monitor objects from afar. Imagine it picking a face from a crowd, focusing on the red car on a freeway or spotting a bluejay flying in the trees. At a more domestic level, hobbyists will use the autofocus on the trail cameras, alarm systems and robot vision projects to provide dynamic responses to moving objects.
The wide angle lens lends itself to outdoor projects, and while it can still be used in ML/AI, the distortion may not benefit your intended use. Research and testing before deploying to mission critical projects is a must.
Bottom Line
For $25 to $35, there is a lot to like here. If you need a camera for a Pi project, you’ll see benefits from using the Camera v3 over the similarly-priced Camera v2. If you are running the latest Raspberry Pi OS, this is truly plug and play and the results are great. Sure we lack the standard camera mounting screw as found on Arducam’s version, but we gain simplicity.
Image quality is great, video is good and HDR is a welcome addition to the repertoire. We won’t be shooting the next blockbuster with this camera, but we will have a lot of fun taking great images.