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] Set auto white balance mode with camera controls

See original GitHub issue

Describe what it is that you want to accomplish Set auto white balance mode

Describe alternatives you’ve considered N/A

Additional context I’ve dug through the code, but neither _VIRTUAL_FIELDS_MAP_ in controls.py or camera_ctrl_info in picamera2.py has illuminated this information for me. It is implied that this would be controlled via the camera controls interface on page 21 of the documentation (along with exposure, sharpness, etc), but I cannot figure out how to actually use this.

I understand this library is incomplete so if this is simply not implemented yet just let me know

Really, I’d like to know where I can find a list of things I can mess with using the controls. Thanks

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
flatsiedatsiecommented, Aug 3, 2022

Thanks. I’m trying to switch between ‘normal’ and ‘night mode’ on the fly. With PiCamera I could use:

self.picam.exposure_mode = "auto"
self.picam.image_effect = "none"
self.picam.exposure_compensation = 0
self.picam.ISO = 0
self.picam.brightness = 50
self.picam.contrast = 0

and

self.picam.exposure_mode = "night"
self.picam.image_effect = "denoise"
self.picam.exposure_compensation = 25
self.picam.ISO = 800
self.picam.brightness = 70
self.picam.contrast = 50

With PiCamera2 I was trying self.picam.set_controls({"ExposureTime": 100000, "AnalogueGain": 1}). I’ll see if I can get close to what I had.

0reactions
CorvetteColecommented, Aug 26, 2022

you might need to turn off auto exposure for the exposuretime to work. just a thought

Read more comments on GitHub >

github_iconTop Results From Across the Web

Camera Controls: White Balance - Digital Photo
Automatic – Automatic white balance (AWB) sounds great, and in practice, in changing lighting situations, it's an ideal way to get close on ......
Read more >
How to Adjust Your Digital Camera's White Balance: 5 Steps
1. Understand what white balance is and how it affects your digital camera's picture. Different kinds of lighting look the same to the...
Read more >
How To Control & Get Perfect White Balance In-Camera
To do this, you'll be adjusting the color temperature in your camera and compensating for the light in your scene by adjusting the...
Read more >
6 Easy Methods to Achieve Perfect White Balance Every Time
Try to set white balance in camera. There is an auto white balance setting on your camera that you can use. Or you...
Read more >
Auto White Balance - RED camera
From the White Balance menu tap OK next to Auto White Balance. The camera automatically sets the color temperature and tint settings.
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