From 6e4c338a6acc46bda308a07df75a536d71ca0070 Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 23 Mar 2023 14:46:13 +0100 Subject: [PATCH] - Removed experimental code from numpyHDR - added picamburst for creating the ev stack --- picamburst.py | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/picamburst.py b/picamburst.py index b0e9f7a..f948d07 100644 --- a/picamburst.py +++ b/picamburst.py @@ -2,21 +2,25 @@ import numpyHDR from picamera2 import Picamera2 -from libcamera import controls +from libcamera import Controls picam2 = Picamera2() config = picam2.create_still_configuration() picam2.configure(config) picam2.start() -picam2.set_controls({"AwbEnable": 1, "AeEnable": 1, "AeConstraintMode": controls.AeConstraintModeEnum.Highlight}) +ctrls = Controls(picam2) +ctrls.AwbEnable = 1 +ctrls.AeEnable = 1 +ctrls.ConstraintModeEnum.Highlight np_array_ev0 = picam2.capture_array() -picam2.set_controls({"AwbEnable": 1, "AeEnable": 1, "AeConstraintMode": controls.AeConstraintModeEnum.Shadows}) -np_array_ev1 = picam2.capture_array() -picam2.set_controls({"AwbEnable": 1, "AeEnable": 1, "AeConstraintMode": controls.AeConstraintModeEnum.Normal}) -np_array_ev_neg1 = picam2.capture_array() -picam2.helpers.save(np_array_ev0, "1.jpg") -picam2.helpers.save(np_array_ev1, "2.jpg") -picam2.helpers.save(np_array_ev_neg1, "3.jpg") +#picam2.set_controls({"AwbEnable": 1, "AeEnable": 1, "AeConstraintMode": controls.AeConstraintModeEnum.Shadows}) +#np_array_ev1 = picam2.capture_array() +#picam2.set_controls({"AwbEnable": 1, "AeEnable": 1, "AeConstraintMode": controls.AeConstraintModeEnum.Normal}) +#np_array_ev_neg1 = picam2.capture_array() +meta = "nichts" +picam2.helpers.save(np_array_ev0, meta, "1.jpg") +#picam2.helpers.save(np_array_ev1, meta ,"2.jpg") +#picam2.helpers.save(np_array_ev_neg1, meta, "3.jpg") picam2.stop() \ No newline at end of file