question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[HOW-TO] ExposureTime / ShutterSpeed

See original GitHub issue

How set minimum ExposureTime / maximum ShutterSpeed.

Dear Developers, I working on a SkyCam for SolarPowerPredictions. I created some examples…

libcamera-jpeg -o shutterspeedxy.jpg --shutter xy

shutters

Ironically there comes a point where the exposure increases again instead of continuing to decrease.

However I just would like to reduce the exposure time further? How can I set the maximum possible, do i need to add more settings?

Thank you!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:15

github_iconTop GitHub Comments

1reaction
davidplowmancommented, Jun 2, 2022

There are a couple of problems here. Firstly it looks like you might be using the old PiCamera interface? The Picamera2 interface uses a set_controls method to pass particular camera controls, e.g.

camera.set_controls({"ExposureTime": 100000, "AnalogueGain": 1})

The next thing is that cameras have quite a deep pipeline, especially for exposure and analogue gain (as even the sensor takes several frames to deal with them), so it will be quite a few frames before those controls have the effect you want. Though you can change them frame-by-frame, so the long-ish delay is only for the first change to happen. (The other alternative is to stop the camera, request the values and then restart it. You’re then guaranteed that the very first frame will have to values you wanted, but the whole stop/start procedure is a bit slow.)

I’ve wondered about providing a function which says “capture frames at these different exposures/gains”. It would take a while for the first one to arrive, but then they’d come in pretty much “back to back”, (Though even then care has to be taken because nothing guarantees that the system might not drop one of them, so you’d have to sort of keep requesting them until you’ve got them all). So maybe I’ll look into that.

One more small fly in the ointment is that I think nothing actually tells you the max/min possible exposures, so asking for something smaller than is possible would end up getting stuck waiting for something that can’t happen. We’d probably need some changes in libcamera to address that, so that might be slightly trickier, or at least take longer to change.

1reaction
davidplowmancommented, May 27, 2022

I see you’ve posted on libcamera-apps now, so thanks for doing that. I’ve replied there, so will close this thread. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Guide To Shutter Speed and Exposure Time
The shutter speed, sometimes known as exposure time, determines the amount of time your film is exposed to light when taking a photograph....
Read more >
Camera Exposure: Aperture, ISO & Shutter Speed
Camera tries to achieve as fast a shutter speed as possible for a given exposure — ideally 1/250 seconds or faster.
Read more >
Shutter Speed Chart & Photography Guide [2021]
Shutter speed controls the exposure time. For example, a shutter speed of 2 seconds, exposes the image sensor to light for 2 seconds....
Read more >
Exposure, Aperture and Shutter Speed Explained
Shutter speed is simply a measure of how long the camera's shutter is open for. It typically ranges from anywhere around 1/1000th of...
Read more >
Understanding Shutter Speed for Beginners - Photography Life
The other important effect of shutter speed is on exposure, which relates to the brightness of an image. If you use a long...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found