Skip to content

libcamera enablement

Aaron W Morris edited this page Aug 13, 2023 · 40 revisions

Modules

Module Sensor Notes
Camera Module v1 ov5647 Max exposure: 6s
Camera Module v2 imx219 Max exposure: 11s
HQ Camera imx477
Hawkeye 64MP ?
imx462 imx462 Long exposures broken with AWB disabled
Camera Module v3 imx708
GS Camera Module imx296 Global Shutter

Instructions

Please read the instructions on the Waveshare site

Manual instructions

Camera auto-detection may not detect the camera. You may need to manual load the overlay for your camera.

IMX477

Add to /boot/config.txt

dtoverlay=imx477
# imx477 requires minimum 32MB of GPU memory
#gpu_mem=32

IMX378

Add to /boot/config.txt

dtoverlay=imx378
# imx378 requires minimum 32MB of GPU memory
#gpu_mem=32

IMX462

Add to /boot/config.txt

dtoverlay=imx462,clock-frequency=74250000
# imx462 requires minimum 32MB of GPU memory
#gpu_mem=32

64mp Hawk-eye

dtoverlay=arducam-64mp
gpu_mem=128

Customizations

The command used to generate images with libcamera-still may be customized.

https://www.raspberrypi.com/documentation/computers/camera_software.html

Focusing

Focusing will only work with camera modules with auto-focuser capability like the camera module 3

--autofocus-mode manual --lens-position 7.1
Moves the lens to a fixed focal distance, normally given in dioptres (units of 1 / distance in metres).

    0.0 will move the lens to the "infinity" position

    Any other number: move the lens to the 1 / number position, so the value 2 would focus at approximately 0.5m

    default - move the lens to a default position which corresponds to the hyperfocal position of the lens.

Binning

IMX477 and IMX378

Bin2 mode (half resolution). This is useful with SoCs with lower memory resources like Raspberry Pi 3.

--mode 2028:1520

Bin4 mode

--mode 1014:760

# cropped
--mode 1332:990:10

Alternate tuning file

July 2023 update. The location of the tuning files has changed.

--tuning-file /usr/share/libcamera/ipa/rpi/vc4/camera.json

Old location

--tuning-file /usr/share/libcamera/ipa/raspberrypi/camera.json

Manual size adjustment

--width and --height only change the output image size in software, but it does not change the sensor parameters.

--width 2028 --height 1520

64mp Hawk-eye

Bin2 (16mp)

--mode 4624:3472

Bin4 (4mp)

--mode 2312:1736
Clone this wiki locally