Simplify grayscale rendering

This commit is contained in:
Benjamin Loison 2024-03-29 12:16:13 +01:00
parent b375acbb3a
commit 60eceb575e
Signed by: Benjamin_Loison
SSH Key Fingerprint: SHA256:BtnEgYTlHdOg1u+RmYcDE0mnfz1rhv5dSbQ2gyxW8B8

View File

@ -63,11 +63,6 @@ for imageName in os.listdir(datasetPath):
cameraPrnuEstimateNpArray = np.array(imagesPrnuEstimateNpArray).mean(axis = 0)
rms = rmsDiffNumpy(cameraPrnuEstimateNpArray, prnuNpArray, True)
title = f'Camera PRNU estimate\nRMS with actual one: {rmsDiffNumpy(cameraPrnuEstimateNpArray, prnuNpArray):.4f} (normalized RMS: {rmsDiffNumpy(cameraPrnuEstimateNpArray, prnuNpArray, True):.4f})'
showImageWithMatplotlib(cameraPrnuEstimateNpArray, title)
#showImageWithMatplotlib(cameraPrnuEstimateNpArray, title)
_256RangeCameraPrnuEstimateNpArray = cameraPrnuEstimateNpArray - cameraPrnuEstimateNpArray.min()
_256RangeCameraPrnuEstimateNpArray *= 255 / _256RangeCameraPrnuEstimateNpArray.max()
#showImageWithMatplotlib(_256RangeCameraPrnuEstimateNpArray, title, 'gray')
plt.imshow(_256RangeCameraPrnuEstimateNpArray, cmap = 'gray', vmin = 0, vmax = 255)
plt.show()
showImageWithMatplotlib(cameraPrnuEstimateNpArray, title, 'gray')