ArduCAM / Arducam-Pivariety-V4L2-Driver

This driver is used for Arducam mipi camera with Pivariety board
40 stars 22 forks source link

Patch applied to libcamera-apps #33

Open galla15 opened 2 years ago

galla15 commented 2 years ago

Hi,

I'm trying to implent a code that uses libcamera-apps librairies to control a Arducam 64MP. I can't get the autofocus to work like your libcamera-still does. I applied all the patches that I found in this repo (under realese). Could you please provide the source code of your libcamera-apps (installed through the script) or a patch to apply to the base raspberry/libcamera-apps.

Thanks

ivolucas commented 1 year ago

+1

galla15 commented 1 year ago

I've actually found the solution to my problem. I didn't set the auto focus mode to auto before sending an auto focus trigger. This can be achieved using the method SetControls() form libcamera-apps lib.

        libcamera::ControlList controls;
        controls.set(libcamera::controls::AfMode, libcamera::controls::AfModeAuto);
        SetControls(controls);

Then the auto focus can be triggered using the following:

        libcamera::ControlList controls;
        controls.set(libcamera::controls::AfTrigger, libcamera::controls::AfTriggerStart);
        SetControls(controls);

All the available controls can be found https://github.com/raspberrypi/libcamera/blob/main/src/libcamera/control_ids.yaml