Clean find_consecutive_most_similar_images.py
				
					
				
			This commit is contained in:
		| @@ -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 | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user