Comments (7)
I guess you are using the Arducam autofocus camera.
They have their own modified libcamera and my guess is that AfTrigger is not exposed in their their bindings.
Their libcamera version might also be out of step with the RPi version.
Anyway AfTrigger is not available in the RPi libcamera version (at least it was not a few weeks ago when I last checked)
from picamera2.
Sorry, I'm afraid that's correct, autofocus is not currently available in the Raspberry Pi versions of these libraries.
from picamera2.
@tvoverbeek
It is indeed an Arducam camera.
from picamera2.
@davidplowman
Well, thanks for your reply.
from picamera2.
When you have the libcamera from Arducam installed, this works in python:
picam2.set_controls({"AfTrigger": 0})
from picamera2.
When we trigger Aftirigger using the below code,
picam2.set_controls({"AfTrigger": 0})
How do you wait until the autofocus happens or know that image is focused?
from picamera2.
This answer is specific to Raspberry Pi camera modules that support autofocus (namely the Camera Module 3). I don't know if it works with Arducam modules or software; if it doesn't you would need to go to Arducam for support.
After triggering an autofocus cycle you need to watch the AfState
metadata so discover when it's finished. This is actually all done for you if you call picam2.autofocus_cycle()
.
from picamera2.
Related Issues (20)
- [BUG] Threads not terminating after camera is closed HOT 3
- [HOW-TO] Enable On-Sensor HDR on Pi 5 HOT 1
- [HOW-TO] Dropping frames when recording w/ picamera2, but not with libcamera-vid (1080p60) HOT 5
- [HOW-TO] get hardware acceleration HOT 6
- [HOW-TO] RuntimeError: Failed to reserve DRM plane HOT 5
- [HOW-TO] How to capture images with the picamera2 app continuously without exiting the app and save the images with continuous names/numbers (for example image_1, image_2, image_3, etc.) so that i can capture multiple images without needing to write the file name each time? HOT 7
- [HOW-TO] Record at 50 fps with 2 camera V3 wide angle HOT 5
- [BUG] AttributeError: module 'kms' has no attribute 'PixelFormat' HOT 1
- [BUG] Preview configuration for size overrides still configuration HOT 1
- [HOW-TO] project.toml issue when trying to install rpi-libcamera in conda env with python 3.9 HOT 2
- Pi5 with two cameras, maximum resolution causes error when 'starting' both HOT 17
- Cannot run a simple example on Pi-5 HOT 3
- [HOW-TO] make this rtsp stream stable? HOT 2
- [HOW-TO] Output Correct Raw Pixel Intensities Across Different Exposure Times HOT 12
- [HOW-TO] DRM preview in fullscreen HOT 3
- Photon transfer function, Full well capacity of the IMX708 [OTHER] HOT 2
- [BUG] capture_metadata output key "PispStatsOutput" HOT 1
- [HOW-TO] Reset camera from picamera2.start() after programme crash HOT 5
- [HOW-TO] Record video duration with Motion Capture HOT 1
- [HOW-TO] Sync two cameras in software HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from picamera2.