Trying to focus on 23/04/24 Rafael images, verifying that there are 253 as claimed.
3552 - 3294 + 1 = 259.
So a bit more than claimed but it is the same order of magnitude.
Let us check my notes and manually check if I notice differences. There is nothing to declare both in my notes and after having manually checked for this range of images.
for imageIndex in `seq 3294 3552`doFILE=DSC0$imageIndex.ARW
ln -s "/mnt/hdd0/robust_image_source_identification_on_modern_smartphones/rafael_240424/$FILE""/home/benjamin/robust_image_source_identification_on_modern_smartphones/datasets/raise/rafael/230424/$FILE"done
Estimated PRNU with wavelet denoiser:
Modified brightness and contrast:
We observe small circles and greater ones specific to the lens but as before (see issues/49#issuecomment-1693) lines artifacts but here also blocks, maybe due to the denoiser method, I am running other denoisers to investigate. Note that small circles match with those that we see on initial images.
Also note that we notice lens circle on the initial images, here DSC03552.JPG:
Estimated PRNU with mean denoiser:
Similar results except no more blocks:
Modified contrast and brightness:
Estimated PRNU with bilateral denoiser:
Modified contrast and brightness:
./extract_noise.py
Denoising images for color red: 100%|██████████████████████████████████████████| 259/259 [28:53:42<00:00, 401.63s/it]
Denoising images for color green_right: 100%|██████████████████████████████████| 259/259 [28:40:03<00:00, 398.47s/it]
Denoising images for color green_bottom: 100%|█████████████████████████████████| 259/259 [29:27:57<00:00, 409.57s/it]
Denoising images for color blue: 100%|█████████████████████████████████████████| 259/259 [29:17:09<00:00, 407.06s/it]
Trying to focus on 23/04/24 Rafael images, verifying that there are 253 as claimed.

3552 - 3294 + 1 = 259.
So a bit more than claimed but it is the same order of magnitude.
Let us check my notes and manually check if I notice differences. There is nothing to declare both in my notes and after having manually checked for this range of images.
```bash
for imageIndex in `seq 3294 3552`
do
FILE=DSC0$imageIndex.ARW
ln -s "/mnt/hdd0/robust_image_source_identification_on_modern_smartphones/rafael_240424/$FILE" "/home/benjamin/robust_image_source_identification_on_modern_smartphones/datasets/raise/rafael/230424/$FILE"
done
```
#### Estimated PRNU with wavelet denoiser:

Modified brightness and contrast:

We observe small circles and greater ones specific to the lens but as before (see [issues/49#issuecomment-1693](https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/issues/49#issuecomment-1693)) lines artifacts but here also blocks, maybe due to the denoiser method, I am running other denoisers to investigate. Note that small circles match with those that we see on initial images.
Also note that we notice lens circle on the initial images, here `DSC03552.JPG`:



#### Estimated PRNU with mean denoiser:
Similar results except no more blocks:

Modified contrast and brightness:

#### Estimated PRNU with bilateral denoiser:

Modified contrast and brightness:

```bash
./extract_noise.py
```
```
Denoising images for color red: 100%|██████████████████████████████████████████| 259/259 [28:53:42<00:00, 401.63s/it]
Denoising images for color green_right: 100%|██████████████████████████████████| 259/259 [28:40:03<00:00, 398.47s/it]
Denoising images for color green_bottom: 100%|█████████████████████████████████| 259/259 [29:27:57<00:00, 409.57s/it]
Denoising images for color blue: 100%|█████████████████████████████████████████| 259/259 [29:17:09<00:00, 407.06s/it]
```
Help on built-in function listdir in module posix:
listdir(path=None)
Return a list containing the names of the files in the directory.
path can be specified as either str, bytes, or a path-like object. If path is bytes,
the filenames returned will also be bytes; in all other circumstances
the filenames returned will be str.
If path is None, uses the path='.'.
On some platforms, path may also be specified as an open file descriptor;\
the file descriptor must refer to a directory.
If this functionality is unavailable, using it raises NotImplementedError.
The list is in arbitrary order. It does not include the special
entries '.' and '..' even if they are present in the directory.
The list is in arbitrary order.
At least the two consecutive executions returned an identical list.
Avoid precising in [b0fa01c6c4e2a6d0afb6cbd096e49c4a522e638d](https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/commit/b0fa01c6c4e2a6d0afb6cbd096e49c4a522e638d):
```python
help(os.listdir)
```
```
Help on built-in function listdir in module posix:
listdir(path=None)
Return a list containing the names of the files in the directory.
path can be specified as either str, bytes, or a path-like object. If path is bytes,
the filenames returned will also be bytes; in all other circumstances
the filenames returned will be str.
If path is None, uses the path='.'.
On some platforms, path may also be specified as an open file descriptor;\
the file descriptor must refer to a directory.
If this functionality is unavailable, using it raises NotImplementedError.
The list is in arbitrary order. It does not include the special
entries '.' and '..' even if they are present in the directory.
```
> The list is in arbitrary order.
At least the two consecutive executions returned an identical list.
```py
def tqdm(x, y = None):
return x
```
shows that the program is `Killed` probably because of insufficient RAM.
I verified the usage of `subgroupIterativeMean = subgroupsIterativeMean[subgroupIndex]` with:
```py
# check *pointer* mutation
print(subgroupIterativeMean.numberOfElementsInMean)
```
When will compare 2 devices estimated PRNUs the resolution will matter, could for instance consider only the minimal resolution of both devices. Note that corners may introduce a bias as for one device using the minimal resolution may contain all the corners and not for the other.
Concerning what is planned, that is RAISE flat-field and Rafael 23/04/24:
exiftool flat_001.NEF
Interesting fields found manually seem to be:
Image Width : 4992
Image Height : 3280
Rows Per Strip : 3280
Raw Image Center : 2496 1640
exiftool DSC03552.ARW
Image Width : 6048
Image Height : 4024
Rows Per Strip : 4024
Sony Image Width : 6000
Full Image Size : 6000x4000
Sony Image Height : 4000
Exif Image Width : 6000
Exif Image Height : 4000
RAISE flat-field: (3280, 4948)
Rafael 23/04/24: (4024, 6024)
When will compare 2 devices estimated PRNUs the resolution will matter, could for instance consider only the minimal resolution of both devices. Note that corners may introduce a bias as for one device using the minimal resolution may contain all the corners and not for the other.
Concerning what is planned, that is RAISE flat-field and Rafael 23/04/24:
```bash
exiftool flat_001.NEF
```
Interesting fields found manually seem to be:
```
Image Width : 4992
Image Height : 3280
Rows Per Strip : 3280
Raw Image Center : 2496 1640
```
```bash
exiftool DSC03552.ARW
```
```
Image Width : 6048
Image Height : 4024
Rows Per Strip : 4024
Sony Image Width : 6000
Full Image Size : 6000x4000
Sony Image Height : 4000
Exif Image Width : 6000
Exif Image Height : 4000
```
Should check actually with `rawpy`.
```py
import rawpy
imageFilePath = 'rafael/230424/DSC03552.ARW'
with rawpy.imread(imageFilePath) as raw:
rawImageVisibleShape = raw.raw_image_visible.copy().shape
print(rawImageVisibleShape)
```
RAISE flat-field: `(3280, 4948)`
Rafael 23/04/24: `(4024, 6024)`
RMS between estimated PRNU of 2 subgroups of raise flat-field TIF using wavelet denoiser:
PRNU subgroup 0:
Contrast and brightness modified:
PRNU subgroup 1:
So the blocking artifacts maybe comes from TIF usage.
RMS between estimated PRNU of 2 subgroups of raise flat-field TIF using wavelet denoiser:

PRNU subgroup 0:

Contrast and brightness modified:

PRNU subgroup 1:

So the blocking artifacts maybe comes from TIF usage.
Forgot to add to [80a33428d6993bcd25c107bf4461d40df7d5244b](https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/commit/80a33428d6993bcd25c107bf4461d40df7d5244b):
```py
import matplotlib.pyplot as plt
X = range(10)
plt.plot(X)
plt.show(block = False)
```
Maybe [`mergeSingleColorChannelImagesAccordingToBayerFilter`](https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/src/commit/5647ab401923bac767b8e5040f3ea315a4eac1a9/datasets/raise/utils.py#L98) is not optimized.
RAISE flat-field raw images wavelet denoiser PRNU estimation among 2 subgroups:
RAISE flat-field raw images bilateral denoiser PRNU estimation among 2 subgroups:
Not the same y axis scale but seems smoother.
A bit surprising that do not have as good estimated PRNUs as expected.
In fact it seems that it is because I forgot the [0, 1] rescaling before denoising. Also suspicious that do not have low y-axis values as above.
Otherwise denoting on the x-axis the images considered could help, also for reproducibility and better comparison. Well in fact there are 2 subgroups with different images each, so it is not as clean as I initially had in mind.
RAISE flat-field raw images wavelet denoiser PRNU estimation among 2 subgroups:



RAISE flat-field raw images bilateral denoiser PRNU estimation among 2 subgroups:

Not the same y axis scale but seems smoother.


A bit surprising that do not have as good estimated PRNUs as expected.
In fact it seems that it is because I forgot the [0, 1] rescaling before denoising. Also suspicious that do not have low y-axis values [as above](https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/issues/59#issuecomment-1727).
Otherwise denoting on the x-axis the images considered could help, also for reproducibility and better comparison. Well in fact there are 2 subgroups with different images each, so it is not as clean as I initially had in mind.
RAISE flat-field raw images bilateral right green denoiser PRNU estimation among 2 subgroups:
RAISE flat-field raw images bilateral right green denoiser PRNU estimation among 2 subgroups:



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.
Trying to focus on 23/04/24 Rafael images, verifying that there are 253 as claimed.
3552 - 3294 + 1 = 259.
So a bit more than claimed but it is the same order of magnitude.
Let us check my notes and manually check if I notice differences. There is nothing to declare both in my notes and after having manually checked for this range of images.
Estimated PRNU with wavelet denoiser:
Modified brightness and contrast:
We observe small circles and greater ones specific to the lens but as before (see issues/49#issuecomment-1693) lines artifacts but here also blocks, maybe due to the denoiser method, I am running other denoisers to investigate. Note that small circles match with those that we see on initial images.
Also note that we notice lens circle on the initial images, here
DSC03552.JPG:Estimated PRNU with mean denoiser:
Similar results except no more blocks:
Modified contrast and brightness:
Estimated PRNU with bilateral denoiser:
Modified contrast and brightness:
Avoid precising in b0fa01c6c4e2a6d0afb6cbd096e49c4a522e638d:
At least the two consecutive executions returned an identical list.
shows that the program is
Killedprobably because of insufficient RAM.I verified the usage of
subgroupIterativeMean = subgroupsIterativeMean[subgroupIndex]with:When will compare 2 devices estimated PRNUs the resolution will matter, could for instance consider only the minimal resolution of both devices. Note that corners may introduce a bias as for one device using the minimal resolution may contain all the corners and not for the other.
Concerning what is planned, that is RAISE flat-field and Rafael 23/04/24:
Interesting fields found manually seem to be:
Should check actually with
rawpy.RAISE flat-field:
(3280, 4948)Rafael 23/04/24:
(4024, 6024)RMS between estimated PRNU of 2 subgroups of raise flat-field TIF using wavelet denoiser:
PRNU subgroup 0:
Contrast and brightness modified:
PRNU subgroup 1:
So the blocking artifacts maybe comes from TIF usage.
Forgot to add to 80a33428d6993bcd25c107bf4461d40df7d5244b:
Related to Benjamin_Loison/rawpy/issues/3.
Maybe
mergeSingleColorChannelImagesAccordingToBayerFilteris not optimized.RAISE flat-field raw images wavelet denoiser PRNU estimation among 2 subgroups:
RAISE flat-field raw images bilateral denoiser PRNU estimation among 2 subgroups:
Not the same y axis scale but seems smoother.
A bit surprising that do not have as good estimated PRNUs as expected.
In fact it seems that it is because I forgot the [0, 1] rescaling before denoising. Also suspicious that do not have low y-axis values as above.
Otherwise denoting on the x-axis the images considered could help, also for reproducibility and better comparison. Well in fact there are 2 subgroups with different images each, so it is not as clean as I initially had in mind.
RAISE flat-field raw images bilateral right green denoiser PRNU estimation among 2 subgroups:
With corrected RAW image denoiser:
RAISE flat-field raw images wavelet denoiser PRNU estimation among 2 subgroups:
Modified contrast and brightness:
RAISE flat-field raw images bilateral denoiser PRNU estimation among 2 subgroups: