Is there a way to change tuning on a running Picamera2? #639
-
The sensor's tuning file is only used when the Picamera2 object is created. Like so
I want to change parameters of the camera tuning on the fly, i.e., change parameters of the tuning file an exisiting Picamera2 object is using. Is this even possible? How could I approach such a thing? I found a funny thing with a temporary file and a corresponding environment variable pointing to this file, like here:
- but at what moment in time is this used by the underlying libcamera code? Is it possible to trigger a reread of the tuning file? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi, as things stand the tuning file is only read when libcamera starts and, as you've discovered, you can only override the default behaviour with an environment variable that points to some other file. The only way to force it to be re-read would be to close the Picamera2 object and make a new one. There are certainly some changes that would be nice here. I know I'd like to be able to pass the tuning data as data, and not via a file. The idea of changing tuning parameters on the fly is of course an interesting one too, but awkward because we generally do that through "controls" and (a) libcamera wants controls that are not specific to particular platforms and (b) there is no "vendor" control to tunnel through the libcamera API down to stuff that's Pi-specific. So this is a bit tricky at the moment. Was there anything specific that you wanted to have access to? If it could be cast as a "general libcamera control" then maybe it would be feasible. |
Beta Was this translation helpful? Give feedback.
Hi, as things stand the tuning file is only read when libcamera starts and, as you've discovered, you can only override the default behaviour with an environment variable that points to some other file. The only way to force it to be re-read would be to close the Picamera2 object and make a new one.
There are certainly some changes that would be nice here. I know I'd like to be able to pass the tuning data as data, and not via a file. The idea of changing tuning parameters on the fly is of course an interesting one too, but awkward because we generally do that through "controls" and (a) libcamera wants controls that are not specific to particular platforms and (b) there is no "vendor" con…