From accaf550912b5c3b3947a4f9ffcb6b4ae99938d7 Mon Sep 17 00:00:00 2001 From: Thomas Date: Sun, 24 Sep 2023 09:57:24 +0200 Subject: [PATCH] - Added safety measure to round incoming Exposure to int before processing. --- makehdr.py | 2 +- picamburst.py | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/makehdr.py b/makehdr.py index 5116424..4e079a2 100644 --- a/makehdr.py +++ b/makehdr.py @@ -12,7 +12,7 @@ select = input("Select Image Source: 1 - Raspicam, 2 - From File, 3 - Image sequ if int(select) == 1: import picamburst as pcb #Get sequence from raspicam - stack = pcb.get_ex2posure_stack() + stack = pcb.get_exposure_stack() if int(select) == 2: path_list = [] diff --git a/picamburst.py b/picamburst.py index 999d095..82efa15 100644 --- a/picamburst.py +++ b/picamburst.py @@ -13,9 +13,14 @@ picam2.set_controls({"AeEnable": 1}) picam2.set_controls({"AfMode": controls.AfModeEnum.Manual }) picam2.set_controls({"LensPosition": 0.0 }) -def get_exposure_stack(factor: int = 2): - '''Returns a list with arrays that contain different exposures controlled by the factor.''' - '''The Autoamtically set exposure of the first frame is saved and multiplied or divided by the factor to get the above or under epxosures.''' +def get_exposure_stack(factor: int = 2) -> list: + '''Returns a list with arrays that contain different exposures controlled by the factor. + The Autoamtically set exposure of the first frame is saved and multiplied or divided by the factor to get the above or under epxosures. + + :param factor: The EV difference in the exposure of the desired images + :return: List containing arrays with the pictures + ''' + picam2.start() time.sleep(1)