Adding camera brightness and contrast controls
This commit is contained in:
@@ -105,6 +105,16 @@ class Camera:
|
||||
main={"size": (1280, 720)},
|
||||
)
|
||||
self._picam.configure(config)
|
||||
self._picam.set_controls(
|
||||
{
|
||||
"Brightness": 0.1, # -1.0 to 1.0, default 0.0
|
||||
"Contrast": 1.1, # 0.0 to 32.0, default 1.0
|
||||
"Saturation": 1.1, # 0.0 to 32.0, default 1.0
|
||||
"Sharpness": 1.0, # 0.0 to 16.0, default 1.0
|
||||
"AwbEnable": True, # auto white balance
|
||||
"AeEnable": True, # auto exposure
|
||||
}
|
||||
)
|
||||
self._encoder = H264Encoder(bitrate=BITRATE)
|
||||
buffered = io.BufferedWriter(self._output)
|
||||
self._picam.start_recording(self._encoder, FileOutput(buffered))
|
||||
|
||||
Reference in New Issue
Block a user