Hi, I’m using an Arducam camera connected over USB to my computer and I’m seeing unstable image quality. I take 9 images in a row with 3 seconds between each shot and I don’t touch any camera settings during that time, but only one of them (b-3.jpg) comes out clear/well-focused. The other 8 are noticeably worse. I need all of them to be as clear as b-3.jpg. Here’s the loop I use:
for i in {1..9}; do
sleep 3s
fswebcam -r 2592x1944 --no-banner "b-$i.jpg"
done
And here’s the camera’s v4l2 configuration dump for reference:
Thanks for the detailed dump. A couple of things stand out. Your focus_auto is already 0 (off) and focus_absolute is 1000, so on paper you’re on a fixed focus — but the way clarity varies shot to shot (one good, the rest bad) looks like auto-focus interference/instability shifting the focus between captures. Let’s try locking it down:
Explicitly disable AF before the capture session and set a known fixed focus:
We’re already using fixed focus, but we’ve noticed the camera sometimes changes the focus value on its own. For example, when the camera restarts it fully reverts to the factory default values. That’s not acceptable for us — the settings must stay the same under any circumstance.
I honestly can’t tell you how to reproduce it exactly, because we don’t always notice when the value changes (the change isn’t always obvious), and we don’t know what triggers it. One example we caught: the focus was set to 200 and then it changed to 350 on its own. It looks to us like the camera is overriding/abolishing the fixed focus setting and auto-focusing by itself.
Please tell us: under what conditions/actions does the focus get overridden or change by itself, and what causes the camera to revert to factory defaults? We’d like to find a way to stop this so the settings never change.
Thanks for the extra detail. For the reset-to-default part, here’s what’s happening on our side: the cameras don’t support hot read/write, so the focus value isn’t stored persistently. After the camera powers off and comes back, the focus value goes back to the default (factory) value. If you need a specific value that survives a power cycle, that would require a factory-level customization — our sales team can help arrange that.
Let’s set the power-off case aside for a second. We’re seeing the focus value change even in situations where there is no power-off at all. How do you explain that? The camera keeps running and the value still drifts between shots.
That’s a fair challenge, and it’s a different scenario from the power-cycle reset. The ‘no hot read/write’ explanation only covers what happens after a power-off — it doesn’t really account for the value changing while the camera stays powered and running. Let’s try to catch it in the act:
Poll the controls in a loop and log them next to a timestamp, e.g.:
while true; do date; v4l2-ctl --list-ctrls | grep focus; sleep 2; done
Leave that running while you capture, and note whether the focus value changes between two shots that should have identical settings.
2. It would also help to switch the auto controls to manual — exposure_auto and white_balance_temperature_auto — since an active auto control can make the driver renegotiate other parameters mid-session.
3. Is this on one specific camera, or does it happen across multiple units?
If you can grab the log around the moment the value drifts without a power cycle, that gives us something concrete to work with.
We’ll try to capture that log, but honestly it’s hard to reproduce because the changes aren’t always obvious and we don’t know what triggers them.
Separately — is there any tool you can share, or that we can buy, that lets us change the default factory setting ourselves? Depending on the installation location the setting might need to change, and it’s very inconvenient to have to manufacture a camera with a setting specific to a customer installation each time. That would really help us.
Right now there isn’t a user-accessible tool for changing the camera’s default factory setting. Those values live in firmware, and on the standard units there’s no persistent (hot-write) storage for user-supplied values — which is also why anything you set reverts to default after a power cycle. We’ve passed your requirement to our engineers to evaluate whether a customization/tool is feasible, and I’ll update this thread once we hear back.
Quick summary of where we stand:
Confirmed: settings including focus are not persistent across power cycles — no hot read/write, so the focus value reverts to the factory default after power-off. Persisting a custom value needs a factory customization.
Still open: the focus value changing while the camera is running and was never powered off. The no-hot-write explanation doesn’t cover that case, and it remains under investigation.
Workaround for now: keep focus_auto=0 and explicitly re-apply focus_absolute at the start of each capture session, so even if a reset happens you always start from a known value.
Open item: engineers are evaluating whether a tool or customization to change the default factory setting is possible.
Please post the v4l2-ctl polling log whenever you manage to catch the drift without a power cycle — that’s the key piece we still need.