Clean find_consecutive_most_similar_images.py
This commit is contained in:
parent
0dd21ad34d
commit
4eb8841ebf
@ -4,8 +4,6 @@ from tqdm import tqdm
|
||||
|
||||
folder = 'flat-field/NEF'
|
||||
|
||||
# Could focus on a given crop.
|
||||
|
||||
# Section I. of *Determining Image Origin and Integrity Using Sensor Noise*.
|
||||
def dotProduct(X, Y):
|
||||
return np.multiply(X, Y).sum()
|
||||
@ -27,7 +25,6 @@ highestCorrelation = None
|
||||
highestCorrelationFile = None
|
||||
|
||||
for file in tqdm(sorted(os.listdir(folder)), 'File'):
|
||||
#print(file)
|
||||
colorChannels = {}
|
||||
for color in Color:
|
||||
colorChannel = getColorChannel(f'{folder}/{file}', color)
|
||||
@ -36,8 +33,6 @@ for file in tqdm(sorted(os.listdir(folder)), 'File'):
|
||||
mergedSingleColorChannelImage = mergeSingleColorChannelImagesAccordingToBayerFilter(colorChannels)
|
||||
if lastMergedSingleColorChannelImage is not None:
|
||||
correlation = corr(mergedSingleColorChannelImage, lastMergedSingleColorChannelImage)
|
||||
#print(correlation)
|
||||
#break
|
||||
if highestCorrelation is None or correlation > highestCorrelation:
|
||||
highestCorrelation = correlation
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user