Should obtain the PRNU by averaging Gaussian noise images by definition.
Let us first try to proceed this way.
As PIL does not seem to allow us to easily see multiple images at the same time to compare them, let us use matplotlib to do so.
importmatplotlib.pyplotaspltimportnumpyasnp# Some example data to displayx=np.linspace(0,2*np.pi,400)y=np.sin(x**2)fig,(ax1,ax2)=plt.subplots(1,2)fig.suptitle('Horizontally stacked subplots')ax1.plot(x,y)ax2.plot(x,-y)plt.show()
Should obtain the PRNU by averaging Gaussian noise images by definition.
Let us first try to proceed this way.
As PIL does not seem to allow us to easily see multiple images at the same time to compare them, let us use matplotlib to do so.
```py
import matplotlib.pyplot as plt
import numpy as np
# Some example data to display
x = np.linspace(0, 2 * np.pi, 400)
y = np.sin(x ** 2)
fig, (ax1, ax2) = plt.subplots(1, 2)
fig.suptitle('Horizontally stacked subplots')
ax1.plot(x, y)
ax2.plot(x, -y)
plt.show()
```
Source: https://matplotlib.org/3.8.0/gallery/subplots_axes_and_figures/subplots_demo.html
Should compute RMS to see the estimated PRNU matches the actual one.
Related to #19.
Could render intermediary image differences, as it is easy to see an almost black uniform image but it is hard to compare 2 random images. However, this assumes that the color scale for each image is identical, which is probably not the case currently.
Could render intermediary image differences, as it is easy to see an almost black uniform image but it is hard to compare 2 random images. However, this assumes that the color scale for each image is identical, which is probably not the case currently.
image=np.array(imagesWithPrnu[0][:1]).mean(axis=0)plt.title(f'First image with PRNU\ni.e. estimated PRNU\nRMS with actual PRNU = {round(rmsDiffNumpy(image,prnus[0]),4)}')plt.imshow(image)plt.savefig('first_image_with_prnu.svg')
Could make the PRNU actually show PRNU:
Maybe would have to consider the transparency and not anti-aliasing.
```py
plt.title('Actual PRNU')
plt.imshow(prnus[0])
plt.show()
```
```py
image = np.array(imagesWithPrnu[0][:1]).mean(axis = 0)
plt.title(f'First image with PRNU\ni.e. estimated PRNU\nRMS with actual PRNU = {round(rmsDiffNumpy(image, prnus[0]), 4)}')
plt.imshow(image)
plt.savefig('first_image_with_prnu.svg')
```









Could make the PRNU actually show `PRNU`:


Maybe would have to consider the transparency and not anti-aliasing.
See [prnu_written_as_such](https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/src/branch/prnu_written_as_such) branch.









Get closer to the real case with the 16 images of https://mcolom.perso.math.cnrs.fr/pages/no_noise_images/.
It is assumed that by their processing, these images do not sound. Thus we add a UNPR and potentially Gaussian noise and we hope that by defusing we will have on the one hand a noiseless image and on the other hand the UNPR, the Gaussian noise and an image residue. As a result, the UNPR will be retained but the Gaussian noise will cancel and it is hoped that the residual image by the number and diversity of scenes on the images will also cancel.
Note that the depressor, depending on the generation of the NRP, can interpret it as stage and therefore not be isolated as desired. To avoid this one can generate a UNPR more likely to be detected as noise by generating it as a Gaussian noise.
What is the next step?
> Get closer to the real case with the 16 images of https://mcolom.perso.math.cnrs.fr/pages/no_noise_images/.
It is assumed that by their processing, these images do not sound. Thus we add a UNPR and potentially Gaussian noise and we hope that by defusing we will have on the one hand a noiseless image and on the other hand the UNPR, the Gaussian noise and an image residue. As a result, the UNPR will be retained but the Gaussian noise will cancel and it is hoped that the residual image by the number and diversity of scenes on the images will also cancel.
Note that the depressor, depending on the generation of the NRP, can interpret it as stage and therefore not be isolated as desired. To avoid this one can generate a UNPR more likely to be detected as noise by generating it as a Gaussian noise.
From `Minutes` Google Docs.
Translated with https://libretranslate.com.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Should obtain the PRNU by averaging Gaussian noise images by definition.
Let us first try to proceed this way.
As PIL does not seem to allow us to easily see multiple images at the same time to compare them, let us use matplotlib to do so.
Source: https://matplotlib.org/3.8.0/gallery/subplots_axes_and_figures/subplots_demo.html
Should compute RMS to see the estimated PRNU matches the actual one.
Related to #19.
Showcase an example and now make a curve to make it clearer. Note that if want a maximum precision curve, may have to pay attention to complexity.
Could render intermediary image differences, as it is easy to see an almost black uniform image but it is hard to compare 2 random images. However, this assumes that the color scale for each image is identical, which is probably not the case currently.
Could make the PRNU actually show
PRNU:Maybe would have to consider the transparency and not anti-aliasing.
See prnu_written_as_such branch.
What is the next step?
From
MinutesGoogle Docs.Translated with https://libretranslate.com.
As a result continue working at #25.