- Added safety measure to round incoming Exposure to int before processing.

This commit is contained in:
Thomas 2023-09-24 09:42:34 +02:00
parent 903eb07e4b
commit 48f0ef52ab
2 changed files with 3 additions and 3 deletions

View File

@ -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_exposure_stack()
stack = pcb.get_ex2posure_stack()
if int(select) == 2:
path_list = []

View File

@ -15,7 +15,7 @@ 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 ba the factor to get the above or under epxosures.'''
'''The Autoamtically set exposure of the first frame is saved and multiplied or divided by the factor to get the above or under epxosures.'''
picam2.start()
time.sleep(1)
@ -23,7 +23,7 @@ def get_exposure_stack(factor: int = 2):
print(picam2.capture_metadata())
start = picam2.capture_metadata()
exposure_start = start["ExposureTime"]
gain_start = start["AnalogueGain"]
gain_start = int(round(start["AnalogueGain"]))
if exposure_start > 117000 or exposure_start < factor:
print("Low Light levels out of range, can't make HDR")
exit()