diff --git a/RGB_channels.py b/RGB_channels.py index a1bda0d..efdfbc9 100644 --- a/RGB_channels.py +++ b/RGB_channels.py @@ -81,9 +81,13 @@ def average_and_export(): frames_num = rep_files_init() while i < frames_num: i += 1 - image = "frames/frame1.jpg" + image = "frames/frame" + str(i) + ".jpg" read_img = cv2.imread(image) - out_colors = RGB_dataframe(read_img, i) + #Bug here inside of func with min funcs of empty data + try: + out_colors = RGB_dataframe(read_img, i) + except: + out_colors = out_colors Ravg = sum(out_colors[0])/len(out_colors[0]) Gavg = sum(out_colors[1])/len(out_colors[1]) Bavg = sum(out_colors[2])/len(out_colors[2])