Add a try with numpy.corrcoef
This commit is contained in:
parent
6ed57bc477
commit
1a910d2e2c
@ -138,7 +138,8 @@ for computeExtremes in tqdm(([True] if minColor is None or maxColor is None else
|
||||
#plt.imsave(f'{escapeFilePath(actualCamera)}_{cameraTestingImageIndex}.png', cameraTestingImagesNoise[actualCamera][cameraTestingImageIndex])
|
||||
# Loop over each camera to compute closeness between the considered testing image noise and the estimated PRNUs of the various cameras.
|
||||
for camera in IMAGES_CAMERAS_FOLDER:
|
||||
distance = rmsDiffNumpy(cameraTestingImagesNoise[actualCamera][cameraTestingImageIndex], camerasIterativeMean[camera].mean)
|
||||
distance = abs(np.corrcoef(cameraTestingImagesNoise[actualCamera][cameraTestingImageIndex].flatten(), camerasIterativeMean[camera].mean.flatten()) - 1)
|
||||
#distance = rmsDiffNumpy(cameraTestingImagesNoise[actualCamera][cameraTestingImageIndex], camerasIterativeMean[camera].mean)
|
||||
print(f'{cameraTestingImageIndex=} {camera=} {actualCamera=} {distance=}')
|
||||
if minimalDistance is None or distance < minimalDistance:
|
||||
minimalDistance = distance
|
||||
|
Loading…
x
Reference in New Issue
Block a user