From 38eca8e65c98a50ac8352fbe1b1c25ac97db9676 Mon Sep 17 00:00:00 2001 From: Benjamin Loison Date: Wed, 5 Jun 2024 16:23:55 +0200 Subject: [PATCH] Add `verify_dots.py` --- datasets/raise/fft/verify_dots.py | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 datasets/raise/fft/verify_dots.py diff --git a/datasets/raise/fft/verify_dots.py b/datasets/raise/fft/verify_dots.py new file mode 100644 index 0000000..c68a8d8 --- /dev/null +++ b/datasets/raise/fft/verify_dots.py @@ -0,0 +1,28 @@ +import os +from tqdm import tqdm +import numpy as np +import matplotlib.pyplot as plt +import sys + +sys.path.insert(0, '../') + +from utils import isARawImage, Color, getColorChannel, mergeSingleColorChannelImagesAccordingToBayerFilter, iterativeMean + +#images = [] +folder = '../rafael/230424' +meanImages = iterativeMean() + +for file in tqdm(os.listdir(folder)): + if isARawImage(file): + #print(file) + filePath = f'{folder}/{file}' + imageColorChannels = {color: getColorChannel(filePath, color) for color in Color} + imageMergedColorChannels = mergeSingleColorChannelImagesAccordingToBayerFilter(imageColorChannels) + #images += [imageMergedColorChannels] + meanImages.add(imageMergedColorChannels) + +#print(np.mean(images, axis = 0).shape) +print(meanImages.shape) + +plt.imshow() +plt.show() \ No newline at end of file