Arducam High-Resolution Autofocus Camera (16MP IMX519) for Raspberry Pi Bullseye OS

Arducam High-Resolution Autofocus Camera (16MP IMX519) for Raspberry Pi Bullseye OS

Introduction

Arducam High-Resolution Autofocus Camera (16MP IMX519) for Raspberry Pi Bullseye and Buster OS have the problem where the pre-installed libcamera is unable to open the Arducam 16MP IMX519 camera module. It required its own version of libcamera and hence this tutorial is to show the steps to install and set up the camera module in Raspberry Pi Bullseye OS. There’s a drawback where the limited version of libcamera for this camera module will cause problems for the older camera modules such as compatibility to the libcamera.

These are the specifications of the camera:

Sensor

Sony IMX519

Optical Size

Type 1 / 2.53"

Sensor Resolution

4656 x 3496 pixels

Still Resolution

16 Megapixels

Video Modes

1080p30, 720p60

Focal ratio (F-Stop)

1.75

Focal Length

4.28mm

 

**In this tutorial, the installation steps are for Raspberry Pi Bullseye OS. For the Raspberry Pi Buster OS, please refer to this tutorial page.

Hardware

 

Install and Set Up the Arducam Autofocus Camera

1. Download the bash scripts.

wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
chmod +rwx install_pivariety_pkgs.sh

2. Update the Raspberry Pi.

sudo apt update 

3. Install libcamra-dev.

./install_pivariety_pkgs.sh -p libcamera_dev

4. Install libcamera-apps.

./install_pivariety_pkgs.sh -p libcamera_apps

5. Install the kernel driver.

./install_pivariety_pkgs.sh -p imx519_kernel_driver

After the installation is done, enter “y” under the “reboot now?(y/n):”.

6. Install the focus adjustment software.

git clone https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver.git

 

Manually adjusting the focus

1. Open camera in live preview in the terminal.

libcamera-still -t 0 

2. Open a new terminal at “File -> New Terminal” and enter the following lines to use the focus adjustment tool.

cd Arducam-Pivariety-V4L2-Driver/focus
python3 FocuserExample.py -d /dev/v4l-subdev1

3. At the focus adjustment tool, press the Up/Down Arrow for focus adjustment, press “Ctrl + C” to save, or “R” to reset.

 

Autofocus

1. Open camera in live preview with autofocus in the terminal. 

libcamera-still -t 0 --autofocus --keypress

2. The “--keypress” is to trigger multiple times of autofocus or refocus the camera by pressing “F” followed by the “Enter” key.

 

Video

 

References