Add verify_dots.py

This commit is contained in:
Benjamin Loison 2024-06-05 16:23:55 +02:00
parent fbd7cb01e1
commit 38eca8e65c
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8

View File

@ -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()