Arducam Hawk-Eye: 64MP Camera module for the Raspberry Pi

Michael K
Level Up Coding
Published in
6 min readJul 11, 2022

--

Arducam 64MP Camera Module hooked up to a Raspberry Pi 4
Hawk-Eye camera module hooked up to a Raspberry Pi 4

If you have used the normal Raspberry Pi camera module before, you’ll know it leaves a lot to be desired. The HQ Camera released by the Pi Foundation later solved some of the issues with the original camera, however, the bulky lenses make it more difficult to incorporate for some projects.

Enter the Hawk-Eye camera — a small yet mighty camera module. Arducam opened pre-orders for this camera module a few months back for $35 USD, which is an incredible deal as the normal camera module costs this much, let alone the HQ Camera which starts at $50 without any lenses. Now that the Hawk-Eye has been released to the public its price has jumped to $60 USD.

Setup

To harness the full 64MP power of the sensor, you’ll need a Raspberry Pi 4 or Compute Module 4 while older Pis are restricted to 16MP. After installing a recent version of Bullseye (from 2022–01–28 or later), the camera drivers and custom libcamera setup can be installed as so:

After the restart, we can confirm the installation worked by listing the cameras available via the terminal:

If you run into an issue where the camera is not detected, double-check your camera cable first and then try to re-install the camera driver only and reboot. If you did not edit the configuration file and reboot first you’ll need to re-install the camera kernel driver once again as the configuration change has to be loaded before installing the driver.

Close-up of the camera module without the clear cover
Close-up of the Hawk-Eye camera module

Testing

To test out the camera, I set up some extra lighting in my office and grabbed some props. To get decent shots, the lens requires a lot of light — even with the fixed Focal Ratio (F-Stop) of F/1.8. A tripod or some kind of mount is required as getting a handheld shot focused well was difficult even with my girlfriend operating the focus and trigger.

We can create a script to grab a picture from the camera or use it as a live view when setting up a shot. This will give us a decently working point-and-shoot camera system, albeit a bit less complicated than your standard off-the-shelf camera. Fortunately for us, the application includes web control so we can send commands to trigger some actions that are not available via the normal V4L2 library such as autofocusing and capturing.

We’ll first need to install the V4L2 library released by Arducam, which is their solution for a camera-agnostic driver for use with their camera lineup. We’ll also install readchar to make reading the hotkeys easy:

By default the script will capture 4K resolution images (3840 x 2160), however, you can increase the resolution up to 9248 x 6944 in the configuration at the top of the script. With the code ready, it’s time to compare it to some other cameras since we now have complete control over the focusing, previews, and grabbing of photos.

Comparison to other cameras

To get a better idea of the quality, I grabbed my DSLR and my phone to compare:

  1. Canon T3i (600D) w/ Canon 24–105 F/4-L (18MP)
  2. Google Pixel 6 (non-pro) F/1.85 (50MP)
3 images of a toy airplane propeller are arraigned in columns comparing a DSLR, Pixel 6 and the Arducam.

The quality of the camera module is pretty impressive when compared to the DSLR. When comparing this sample photo, the depth of field lacks a bit when compared to the DSLR — but I think this is to be expected considering the lens difference. The Pixel’s post-processing over did it a bit on this photo, which led to some odd areas around the props in my opinion.

3 images of a metal car and plant are arraigned in columns comparing a DSLR, Pixel 6 and the Arducam.

The DSLR seemed to pick up a bit more detail on this test, but some post-processing would help sharpen up the Arducam image for sure. With the Arducam, some of the highlights are lost in the background on the flower pot when compared to the DSLR, but this as well could be fixed with some light editing.

3 images of a CPU are arraigned in columns comparing a DSLR, Pixel 6 and the Arducam.

I also wanted to see how the cameras handled small details, like the text printed on this CPU. The same amount of detail is visible, however, when comparing the edge dot matrix patterns the DSLR seems more clear.

Test project

This camera module is one of the components for a project I have planned where I want to build my own performance data recorder for my car using a Raspberry Pi, an OBD-2 module, and sensors. I also needed audio and video with the data, so I wanted a high-quality compact camera module that could be mounted easily on my windshield.

To record audio, I followed this guide to set up a USB audio device as the camera does not have a microphone included. To combine the audio and video in real-time, I opted to use FFmpeg as it is very well supported in the community and has always worked great in my experience (it is also included by default on Raspbian).

After running the command, a live-view window will appear and allow you to check the video framing and focus if needed. Once you have recorded all that is required, you can press Ctrl+C in the terminal to exit the command and FFmpeg will save the file to the path specified at the end of the command.

Video Mode sample in motion

This sample was recorded at 1080p 30fps, but the resolution could be changed to 720p 60fps for example. After comparing some test captures, the h264 mode (default) captures the best quality and has the least compression compared to the MJPEG mode. When cranking up the quality for the MJPEG mode, the framerate suffers and cannot keep a constant 30fps. The YUV420 mode works too, however, it is too high quality and the camera module cannot stay over 5fps at 1080p.

A split image is shown with one half being a still image from a H264 video and the other being a normal camera capture using PNG.
Quality comparison between a frame grab from h264 and a full-quality PNG capture

Conclusion

This Arducam camera module crams great quality, solid color representation, and lots of other great features into a small package at an decent price. While I only explored a single camera in this test, you can also connect two to four cameras at once using a Quad Camera Kit sold by Arducam. I am very excited for future releases from Arducam as I can only imagine what will be possible in another year or two!

Level Up Coding

Thanks for being a part of our community! More content in the Level Up Coding publication.
Follow: Twitter, LinkedIn, Newsletter
Level Up is transforming tech recruiting 👉 Join our talent collective

--

--

Software Engineer with a passion for helping spread technical knowledge about my favorite hobbies from microcontrollers to automotive and much more.