I'm trying to use the Pi (NoIR) Camera to record a timelapse that needs to produce good results both during day and night. By default, I don't get a correctly exposed result under all conditions. I can dial in an exposure compensation that works for night, one that works for a front-lit subject in daytime, and one that works for backlit a subject in daytime. But a single setting won't work in all cases when using the default metering.

I believe that using spot metering (plus exposure compensation) would help a lot, if I can somehow place the metering spot on the subject. (The location is critical.) But where is the metering spot in the image? How big is it? Can I move its location? Spot metering would be my preferred solution.

Alternatively, is it possible to dynamically adjust exposure compensation based on various factors (time of day, processing the last image, etc.) without shutting down the camera between images? Is there a camera API that allows such fine grained control?

2 Answers 2


To the best of my knowledge, the spot used in spot metering mode (not the default) is in the center of the capture area and cannot be moved (or at least I haven't seen anything in the MMAL interface that would allow it to be moved). One of the Broadcom engineers that works on the camera module made some interesting comments about the metering algorithm in this forum post.

On the subject of adjusting exposure compensation, that can certainly be done while the camera is running and recording so you could certainly control it based on time of day, results of processing last image, and so on.


With libcamera this is now possible. With the --metering flag a mode can be chosen (spot, average, matrix or custom), and in the tuning file you can configure the custom mode with weights for different regions in the image (see the tuning guide).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.