-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HOW-TO] Camera Flash #1084
Comments
There is no explicit support in libcamera for flash metering at the moment, so I think you would have to implement something for yourself. I think quite a bit of experimentation might be necessary. Here's what I might try and do.
I'm not familiar with speedlite, but I'm guessing these are xenon flashes? This would pose quite a few challenges. Timing is very critical, in fact I've known cameras that expect you to use a xenon flash to have a hardware trigger line that gets pulsed at the right moment. Even worse, most of our cameras are rolling shutter cameras, so you can't even guarantee to illuminate the entire frame with a single pulse. As regards the mechanics of getting an LED flash to come on, that's not really a Picamera2 question and I don't know the answer. Maybe try asking that on the Camera Board forum and you'll find someone who can help you. Good luck! |
Hi, thank you for the elaborated answer. I was kind of expecting that I might need to find my own algorithm to apply. I like to avoid switching between modes, because at the same time I want to synchronize two cameras as we found a way here: #1050 |
I don't think the existing AEC/AGC will help you as that's all very bound up with the runtime C++, the camera metadata and ISP statistics. I think re-inventing some of that in Python is going to be necessary. First of all, using the low resolution image is complicated somewhat by the fact that gamma is applied to it, whereas ISP statistics are complicated by the fact that you have to unpack them, and they're different on a Pi 5 (don't know if that's an issue for you). If you're using the low resolution image, it'll probably be YUV420 (it can be RGB on a Pi 5, but not earlier Pis). We probably only need the Y channel. I would also build yourself an inverse-gamma lookup table (you can find the gamma transform in the .json camera tuning file). Reducing the size of the low resolution image will leave you with less computation, though there will be a limit as to how low you can go. It might be 64x64, not sure. So I'd do this:
There's probably quite a lot to digest there - hope it helps! |
Describe what it is that you want to accomplish
Hey, I want to build a mobile camera.
After allowing per tuning file cranking up the range for AnalogueGain to 16 for the imx708 the shutter speed got on the faster side. It helps to achieve sharp images if hand held.
But if it is getting darker or indoors, a flash could be useful to get decent lit sharp captures.
I think about a LED or a speedlite to add to the camera.
My questions:
dtparam=cam1_sync=24
to config.txt seems to have no effect on RPI5.Additional context
For reference, I found these related issues.
The text was updated successfully, but these errors were encountered: