Skip to content
Discussion options

You must be logged in to vote

I would consider looking at the "lux" value in the image metadata (for example, obtained by picam2.capture_metadata()['lux'], or if you have captured a request already then request.get_metadata()['lux']).

This should give you an absolute measure of the scene brightness - maybe you can use a simple lookup to translate that into an iris value. Of course, the AGC/AEC algortihm (assuming it's running) will take a moment to catch up when the iris moves.

The other way might be to read the "ExposureTime" and "AnalogueGain" out of the metadata instead. You'd multiply the two together and then that would give a similar "absolute brightness" value (though larger now means "darker"). But I expect the

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@elaw01887
Comment options

Answer selected by elaw01887
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants