2023-03-23 12:36:45 +01:00
|
|
|
#!//usr/bin/python3
|
|
|
|
|
2023-03-23 14:32:50 +01:00
|
|
|
import numpyHDR
|
2023-03-23 12:36:45 +01:00
|
|
|
from picamera2 import Picamera2
|
2023-03-23 14:47:04 +01:00
|
|
|
from libcamera import controls
|
2023-03-23 14:49:23 +01:00
|
|
|
import time
|
2023-03-23 12:36:45 +01:00
|
|
|
|
|
|
|
picam2 = Picamera2()
|
|
|
|
config = picam2.create_still_configuration()
|
|
|
|
picam2.configure(config)
|
|
|
|
|
|
|
|
picam2.start()
|
2023-03-23 14:49:23 +01:00
|
|
|
time.sleep(1)
|
2023-03-23 14:47:34 +01:00
|
|
|
ctrls = controls(picam2)
|
2023-03-23 14:46:13 +01:00
|
|
|
ctrls.AwbEnable = 1
|
|
|
|
ctrls.AeEnable = 1
|
|
|
|
ctrls.ConstraintModeEnum.Highlight
|
2023-03-23 14:32:50 +01:00
|
|
|
np_array_ev0 = picam2.capture_array()
|
2023-03-23 14:46:13 +01:00
|
|
|
#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")
|
2023-03-23 12:36:45 +01:00
|
|
|
|
|
|
|
picam2.stop()
|