fwiz
fwiz

Reputation: 21

Auto focus with the Picamera2 in python works much slower than the "libcamera"

Autofocusing with libcamera works faster than the Picamera2 python library; Even if I increase buffer-count to 4 it still takes some seconds to automatically focus on subject (not fast like it focuses with libcamera)

libcamera-still -t 0 --autofocus-mode continuous

This above code focuses automatically faster than the Picamera2 python library using this code:

from picamera2 import Picamera2 
from libcamera import controls 
picam2 = Picamera2()
picam2.start(show_preview=True)
picam2.set_controls({"AfMode":controls.AfModeEnum.Continuous})

In case of Picamera2, it takes longer time than to the libcamera, and it's not smooth too. It's not the case for libcamera command given through terminal.

Upvotes: 1

Views: 473

Answers (0)

Related Questions