Unrecognised option '--continue-autofocus' with IMX519 and RPi4

Hello!

I’m using IMX519 with RPi4 and libcamera. I followed the instructions came with the camera for installation and have been lucky with libcamera-still so far. --autofocus works but for some reason --continue-autofocus will throw an unrecognised option error. I can’t see --continue-autofocus in the list of commands when I run -h either. I’ve installed both libcamera_dev and libcamera_apps as instructed on arducam’s website. Any idea what the issue might be?

Thank you!

Edit: It seems for some reason libcamera-dev and libcamera-apps weren’t installed. Now when I try to install them I get an error saying

Repository is broken: libcamera-dev:arm64 (= 0.0.10) has no Size information
Repository is broken: libcamera-apps:arm64 (= 0.0.10) has no Size information

How to get around this?

@voyagermech

I’ll check it out tomorrow. Please don’t wrroy

1 Like

@voyagermech afmode continous works for me

libcamera-still -t 0 --afmode continuous
1 Like

Thanks! Just for info, I’ve also tried to directly install the .deb for libcamera-dev and libcamera-apps from arducam’s GitHub (basically the same links the .sh uses) but that also didn’t work.

Thank you! I’ll see how this works for me. Still curious to know how to get -dev and -apps installed though.

Hello!

I was getting a segmentation fault with libcamera-still --afmode continuous so I’ve decided to remove and reinstall libcamera. When I try to install libcamera-apps after libcamera-dev with the below:

./install_pivariety_pkgs.sh -p libcamera-apps

It gives me the below error:

E: Unable to correct problems, you have held broken packages.
Unknown error, please send the error message to [email protected]

Any idea what could be causing it? Thanks!

@voyagermech

Did you clean up all deb packages in the directory?

rm -rf *.deb

You need to remove all libcamera in the environment

sudo apt remove -y libcamera-dev
sudo apt remove -y libcamera0

Then execute, you must have dev first, and then install apps

wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
chmod +x install_pivariety_pkgs.sh
./install_pivariety_pkgs.sh -p libcamera_dev
./install_pivariety_pkgs.sh -p libcamera_apps
1 Like

Thanks! I had failed to remove it all but now I did. After a clean reinstall, while I still don’t see the --continue-autofocus among libcamera-still’s options, libcamera-still --afmode continuous works!

The clean install also solved the seg fault I was getting with --afmode continuous before.

Thank you @Carl and @Edward!

Hi,

I change my pi cam to the arducam 16Mpx IMX519 Autofocus and i have install everything as it’s explain on the website and the camera start and was fine, next day its just giving a blurry image

I have a RPI4 with OS Raspbian GNU/Linux 11 (bullseye)

I already tried a clean install like mention in comments above but still the same.

I try to use the arducam controller manual focus and it doesnt do anything. I have also install the IMX519 slow speed driver.

I saw some videos showcasing autofocus with some objects, does it need a target to focus? I believe it should only focus when needed right?

python3 FocuserExample.py -d /dev/v4l-subdev1

Tried both commands below but says i dont have the --afmode parameter available. I tried --help on libcamera-still and its not there.

libcamera-still -t 0 --afmode auto --autofocus
libcamera-still -t 0 --afmode continuous

Closing Libcamera application(frames displayed 0, dropped 0)
Camera stopped!
Tearing down requests, buffers and configuration
Camera closed
ERROR: *** unrecognised option ‘–afmode’ ***

i believe the commands above might have been updated to the ones below, but even so camera is still blurry

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

Is possible to be some HW issue? I read somewhere about contact with some components might lead to some unexpected issues with the autofocus.

Anything i can test or you need to debug please let me know.
If you can share the commands would be apreciated :slight_smile:

Well i figure out the issue.

It was in the HW, probably some conector/flat taking some pressure or touching something else and it was messing with the autofocus.

I have a small plastic cover on my cam and after i give it some space the camera started to focus again.

So if you have this kind of issue, just set it on the table and test again :slight_smile: