36 Commits

Author SHA1 Message Date
ccb2b4bd86 #21: Write PRNU as such to make figures clearer 2024-03-26 03:15:34 +01:00
f181a3498c Correct Image wuthout PRNU rendering and precise that it is the first image 2024-03-26 01:45:47 +01:00
03f52a5bd1 Finish Matplotlib figure showing PRNU estimation by averaging 2024-03-25 20:45:51 +01:00
2baf9c3000 Add and use rmsDiffNumpy 2024-03-25 20:14:33 +01:00
7c7cbad0ef Rename rmsdiff to rmsDiffPil 2024-03-25 20:01:51 +01:00
8b0b58953d WIP: Matplotlib figure showing PRNU estimation by averaging
Committed to showcase
Benjamin_Loison/Pillow#4.
2024-03-25 19:45:46 +01:00
044d25cbaa Add and use showImageWithMatplotlib 2024-03-25 18:37:09 +01:00
8575da5b1d WIP: Getting PRNU by averaging on fake dataset 2024-03-25 17:45:01 +01:00
72e37a252a Add algorithms/distance/rmsdiff.py 2024-03-22 13:59:41 +01:00
cf22ff2694 Add comments 2024-03-22 12:59:52 +01:00
d818714344 CAI over images mean does not seem better 2024-03-22 12:57:24 +01:00
464e43861b Prefer *mean* over *average* 2024-03-22 12:54:34 +01:00
41926663b7 Correct a typo but PRNU classifier still looking random 2024-03-22 12:51:34 +01:00
36f5b69f5e First PRNU classifier acting randomly it seems 2024-03-22 12:46:13 +01:00
a9adf2d53d Compare RMS difference between average images and the average CAI images
#9 (comment)
2024-03-22 12:11:26 +01:00
452dd755fc First PRNU distance test 2024-03-22 11:58:34 +01:00
92ede944c7 Not satisfying due to zero offset 2024-03-22 11:42:47 +01:00
c287d5f0ef Add an use toPilImage 2024-03-22 11:39:51 +01:00
674025fa62 First iteration of fake dataset generation 2024-03-22 11:20:07 +01:00
9f34973132 Move into multiple files and functions Context-Adaptative Interpolator (CAI) 2024-03-22 11:11:11 +01:00
876ce96a58 Add datasets/fake/generate_dataset.py 2024-03-22 10:31:47 +01:00
408b7a2ba9 Add flat vision dataset size computation
It is about 8.7 GB.
2024-03-21 17:15:56 +01:00
e23543506a Correct getPixelIndexesAround missing one pixel 2024-03-21 16:19:40 +01:00
13de984d59 Add articles/Wiener_Filtering/ 2024-03-21 16:18:06 +01:00
f3e96243f3 Fix #10: Implement Wiener filter 2024-03-21 15:11:15 +01:00
739317fa63 WIP: Context-Adaptive Interpolator (CAI) 2024-03-21 13:00:51 +01:00
d43ff5777f Add articles/Wu_ICIP_2012/ 2024-03-21 13:00:23 +01:00
45726968f2 Fix #12: Use a new image (#15) 2024-03-21 10:53:03 +01:00
668057e261 WIP: Context-Adaptive Interpolator (CAI) 2024-03-21 10:04:05 +01:00
ad961b75fc Add articles/Cross-correlation - Wikipedia/ 2024-03-20 11:39:42 +01:00
1d94bb61fe Add articles/Autocorrelation - Wikipedia/ 2024-03-20 11:15:46 +01:00
4720fe5799 Add articles/Stationary process - Wikipedia/ 2024-03-20 11:10:58 +01:00
b125b5a247 Add articles/Transfer function - Wikipedia/ 2024-03-20 11:01:59 +01:00
c9d1c4c1ee Add articles/Frequency response - Wikipedia/ 2024-03-20 11:00:22 +01:00
a7280a690c Add articles/Stochastic process - Wikipedia/ 2024-03-20 10:55:04 +01:00
127304fe88 Add Linear time-invariant system - Wikipedia/ 2024-03-20 10:49:37 +01:00
27 changed files with 958 additions and 49 deletions

View File

@@ -1,26 +0,0 @@
from PIL import Image
from statistics import mean
# What about other color channels?
image = Image.open('9f04e2005fddb9d5512e2f42a3b826b019755717.jpg').convert('L')
newI = image.load()
I = image.copy().load()
DEFAULT_COLOR = 255
# This threshold is debatable.
THRESHOLD = 20
# How to manage the border of the image?
for m in range(1, image.size[0] - 1):
for n in range(1, image.size[1] - 1):
e = I[m, n + 1]
se = I[m + 1, n + 1]
s = I[m + 1, n]
sw = I[m + 1, n - 1]
w = I[m, n - 1]
nw = I[m - 1, n - 1]
no = I[m - 1, n]
ne = I[m - 1, n + 1]
A = [e, se, s, sw, w, nw, no, ne]
if max(A) - min(A) <= THRESHOLD:
newI[m, n] = int(round(I[m, n] - mean(A), 0))
image.rotate(-90).show()

View File

@@ -0,0 +1,56 @@
# Based on https://web.archive.org/web/20231116015653/http://nrl.northumbria.ac.uk/id/eprint/29339/1/Paper_accepted.pdf IV. B..
from PIL import Image
from statistics import mean, median
from wiener_filter import wienerFilter
# Assume greyscale PIL image passed.
# What about other color channels? See #11.
def contextAdaptiveInterpolator(I, IImage, showProgress = False):
rImage = Image.new('L', (IImage.size[0] - 2, IImage.size[1] - 2))
r = rImage.load()
# This threshold is debatable. See #13.
THRESHOLD = 20
if showProgress:
print('before for loops')
# Equation (10)
# Accelerate computation. See #15.
for m in range(1, IImage.size[0] - 1):
for n in range(1, IImage.size[1] - 1):
e = I[m , n + 1]
se = I[m + 1, n + 1]
s = I[m + 1, n]
sw = I[m + 1, n - 1]
w = I[m , n - 1]
nw = I[m - 1, n - 1]
no = I[m - 1, n]
ne = I[m - 1, n + 1]
A = [e, se, s, sw, w, nw, no, ne]
if max(A) - min(A) <= THRESHOLD:
newPixel = I[m, n] - mean(A)
elif abs(e - w) - abs(no - s) > THRESHOLD:
newPixel = I[m, n] - (s + no) / 2
elif abs(s - no) - abs(e - w) > THRESHOLD:
newPixel = I[m, n] - (e + w) / 2
elif abs(sw - ne) - abs(se - nw) > THRESHOLD:
newPixel = I[m, n] - (se + nw) / 2
elif abs(se - nw) - abs(sw - ne) > THRESHOLD:
newPixel = I[m, n] - (sw + ne) / 2
else:
newPixel = I[m, n] - median(A)
r[m - 1, n - 1] = round(newPixel)
if showProgress:
print('after for loops')
# Why need to rotate the image? See #14.
#rImage.rotate(-90).show()
Q = 3
# $\sigma_0^2$ is the noise variance.
sigma_0 = 9 ** 0.5
if showProgress:
print('before wiener filter')
return wienerFilter(r, rImage, Q, sigma_0, showProgress)

View File

@@ -0,0 +1,9 @@
from PIL import Image
from context_adaptive_interpolator import contextAdaptiveInterpolator
MODE = 'L'
IImage = Image.open('9f04e2005fddb9d5512e2f42a3b826b019755717.jpg').convert(MODE)
I = IImage.load()
contextAdaptiveInterpolator(I, IImage).show()

View File

@@ -0,0 +1,40 @@
from PIL import Image
from tqdm import tqdm
def wienerFilter(r, rImage, Q, sigma_0, showProgress):
h_wImage = Image.new('L', (rImage.size[0], rImage.size[1]))
h_wImagePixels = h_wImage.load()
def h_w(hImage, h, i, j):
# Equation (7)
return h[i, j] * sigma(hImage, h, i, j) / (sigma(hImage, h, i, j) + sigma_0 ** 2)
# Minimum of the considered variances.
def sigma(hImage, h, i, j):
# Equation (9)
return sigma_q(hImage, h, i, j, Q)
def getPixelIndexesAround(i, numberOfPixelsInEachDirection):
return range(i - numberOfPixelsInEachDirection, i + numberOfPixelsInEachDirection + 1)
# Expand image with border pixels.
def getPixelWithinImage(z, upperBound):
return max(min(z, upperBound - 1), 0)
# Local variance obtained by Maximum A Posteriori (MAP).
def sigma_q(hImage, h, i, j, q):
# Equation (8)
numberOfPixelsInEachDirection = (q - 1) // 2
B_q = [(x, z) for x in getPixelIndexesAround(i, numberOfPixelsInEachDirection) for z in getPixelIndexesAround(j, numberOfPixelsInEachDirection)]
return max(0, (1 / q ** 2) * sum([h[getPixelWithinImage(x, hImage.size[0]), getPixelWithinImage(z, hImage.size[1])] ** 2 - sigma_0 ** 2 for (x, z) in B_q]))
if showProgress:
print('wiener filter start for loops')
rImageSize0Range = range(rImage.size[0])
for i in tqdm(rImageSize0Range) if showProgress else rImageSize0Range:
for j in range(rImage.size[1]):
h_wImagePixels[i, j] = round(h_w(rImage, r, i, j))
if showProgress:
print('wiener filter end for loops')
return h_wImage.rotate(-90)

View File

@@ -0,0 +1,18 @@
from PIL import ImageChops
import math
import operator
import functools
import numpy as np
def rmsDiffPil(im1, im2):
"Calculate the root-mean-square difference between two images"
h = ImageChops.difference(im1, im2).histogram()
# calculate rms
return math.sqrt(functools.reduce(operator.add,
map(lambda h, i: h*(i**2), h, range(256))
) / (float(im1.size[0]) * im1.size[1]))
def rmsDiffNumpy(image0, image1):
return np.sqrt(np.mean(np.square(image0 - image1)))

View File

@@ -0,0 +1 @@
https://en.wikipedia.org/w/index.php?title=Autocorrelation&oldid=1211572148

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" standalone="no"?>
<xournal creator="Xournal++ 1.1.3" fileversion="4">
<title>Xournal++ document - see https://github.com/xournalpp/xournalpp</title>
<page width="596.00000000" height="842.00000000">
<background type="pdf" domain="absolute" filename="/home/benjamin/Desktop/bens_folder/school/ens/asp/aria/internship/work/articles/Autocorrelation - Wikipedia/Autocorrelation - Wikipedia.pdf" pageno="1"/>
<layer>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">45.10602425 65.69134267 148.63046697 65.69134267</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">98.02477044 84.13145601 292.67048845 84.13145601</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">298.78055760 84.10058635 402.80266367 84.10058635</stroke>
<stroke tool="highlighter" color="#ff00007f" width="8.50000000" fill="128">41.36420533 93.94832053 102.19996831 93.94832053</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">108.64795861 94.34702503 167.48338780 94.34702503</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">233.34182253 94.30004870 401.49822252 94.30004870</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">41.71263465 104.66538384 157.58657280 104.66538384</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">327.28528522 102.87766486 401.44835586 102.87766486</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">43.30386526 114.05436237 183.48971651 114.05436237</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">190.62672900 113.63662272 403.00698580 113.63662272</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">42.56321717 123.34089563 164.29336125 123.34089563</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="1.41000000" fill="255">170.77100365 126.17460024 403.39125152 126.17460024</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="1.41000000" fill="255">40.37847757 135.94280024 121.93374197 135.94280024</stroke>
<text font="Sans" size="11.00000000" x="255.30545354" y="109.75416635" color="#00c0ffff" ts="0" fn="">why whould it be missing?</text>
</layer>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="2"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="3"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="4"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="5"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="6"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="7"/>
<layer/>
</page>
</xournal>

View File

@@ -0,0 +1 @@
https://en.wikipedia.org/w/index.php?title=Cross-correlation&oldid=1193503271

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" standalone="no"?>
<xournal creator="Xournal++ 1.1.3" fileversion="4">
<title>Xournal++ document - see https://github.com/xournalpp/xournalpp</title>
<page width="596.00000000" height="842.00000000">
<background type="pdf" domain="absolute" filename="/home/benjamin/Desktop/bens_folder/school/ens/asp/aria/internship/work/articles/Cross-correlation - Wikipedia/Cross-correlation - Wikipedia.pdf" pageno="1"/>
<layer>
<text font="Sans" size="11.00000000" x="254.94909668" y="99.11550903" color="#00c0ffff" ts="0" fn="">to investigate</text>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">267.48571777 124.12182617 323.80781974 124.12182617</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">357.43951416 123.44583130 442.32898420 123.44583130</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">467.44500732 125.49694824 534.17380054 125.49694824</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">529.06909180 198.39959717 537.72819212 207.05869750</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">537.39208984 207.38223267 550.51501465 189.92749023</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">523.11785889 275.24618530 527.91525377 283.55551699</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">528.16571045 283.40579224 542.33862305 264.13464355</stroke>
<stroke tool="highlighter" color="#ff00007f" width="8.50000000" fill="128">263.87579346 203.13952637 263.87579346 203.13952637</stroke>
<stroke tool="highlighter" color="#ff00007f" width="8.50000000" fill="128">370.60308838 204.73757935 370.60308838 204.73757935</stroke>
</layer>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="2"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="3"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="4"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="5"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="6"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="7"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="8"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="9"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="10"/>
<layer/>
</page>
</xournal>

View File

@@ -0,0 +1 @@
https://en.wikipedia.org/w/index.php?title=Frequency_response&oldid=1191754424

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" standalone="no"?>
<xournal creator="Xournal++ 1.1.3" fileversion="4">
<title>Xournal++ document - see https://github.com/xournalpp/xournalpp</title>
<page width="596.00000000" height="842.00000000">
<background type="pdf" domain="absolute" filename="/home/benjamin/Desktop/bens_folder/school/ens/asp/aria/internship/work/articles/Frequency response - Wikipedia/Frequency response - Wikipedia.pdf" pageno="1"/>
<layer>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">47.96362305 88.21359253 270.79116367 88.21359253</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">56.55502319 122.35174561 219.85731707 122.35174561</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">418.24908447 116.58233643 546.71540835 116.58233643</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">44.68548584 132.57958984 403.24447628 132.57958984</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">45.73159790 154.51879883 300.72215898 154.51879883</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">45.37765503 171.75515747 551.49413456 171.75515747</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">309.27398682 153.46777344 485.72969130 153.46777344</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">158.27801514 188.23989868 547.61744673 188.23989868</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">45.70263672 202.55548096 551.01927293 202.55548096</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">44.71191406 219.63018799 193.39350439 219.63018799</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">215.48699951 218.28588867 452.74743395 218.28588867</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">43.45098877 234.60818481 334.62326027 234.60818481</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">341.83496094 228.11029053 550.38823679 228.11029053</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">45.87033081 244.89083862 269.56525172 244.89083862</stroke>
</layer>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="2"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="3"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="4"/>
<layer/>
</page>
</xournal>

View File

@@ -0,0 +1 @@
https://en.wikipedia.org/w/index.php?title=Linear_time-invariant_system&oldid=1185568040

View File

@@ -0,0 +1,79 @@
<?xml version="1.0" standalone="no"?>
<xournal creator="Xournal++ 1.1.3" fileversion="4">
<title>Xournal++ document - see https://github.com/xournalpp/xournalpp</title>
<page width="596.00000000" height="842.00000000">
<background type="pdf" domain="absolute" filename="/home/benjamin/Desktop/bens_folder/school/ens/asp/aria/internship/work/articles/Linear time-invariant system - Wikipedia/Linear time-invariant system - Wikipedia.pdf" pageno="1"/>
<layer>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">43.43161216 70.58819865 259.29150326 70.58819865</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">52.43170547 90.28720856 101.66214454 90.28720856</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">107.27342987 95.15140533 197.32146806 95.15140533</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">340.13943481 91.31665802 373.47004423 91.31665802</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">42.62287521 99.72575378 372.83014059 99.72575378</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">41.91165924 111.53308105 72.84796710 111.53308105</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">100.71840668 115.66114807 118.61946106 116.65730286</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">134.40634155 115.48451233 204.02774243 115.48451233</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">210.29487610 115.82257080 376.18370619 115.82257080</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">42.64285660 126.98767090 159.76776188 126.98767090</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">230.34490967 127.07556152 275.85735297 127.07556152</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">40.38971329 138.51959229 72.95423889 139.90950012</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">178.16612244 138.06468201 288.69952185 138.06468201</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">316.65380859 138.02700806 332.48845244 138.02700806</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">42.25002289 148.04623413 129.17920234 148.04623413</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">148.02426147 148.77415466 153.33493042 149.56503296</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">193.30421448 149.18115234 370.05151966 149.18115234</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">87.39996338 161.02540588 343.88763628 161.02540588</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">70.28941345 170.75175476 376.66149301 170.75175476</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">162.02500916 181.10310364 375.29631159 181.10310364</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">41.67623901 192.29855347 110.07754883 192.29855347</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">42.76291275 206.67984009 264.43819852 206.67984009</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">310.50381470 207.31286621 373.93981536 207.31286621</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">41.53540421 217.94181824 248.44139398 217.94181824</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">306.24810791 218.09150696 372.62471816 218.09150696</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">42.69669342 228.46926880 128.23895112 228.46926880</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">134.21945190 232.70111084 294.85942110 232.70111084</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">44.19964218 240.63583374 328.38888341 240.63583374</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">303.94384766 228.60203552 370.74873182 228.60203552</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">390.83282471 219.06901550 540.86652906 219.06901550</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">391.42202759 228.63166809 419.77081299 228.63166809</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">110.67398834 254.72361755 178.73787772 254.72361755</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">241.79754639 255.47842407 375.26054853 255.47842407</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">41.51829147 266.11231995 349.66949241 266.11231995</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">351.74423218 264.77754211 377.07174573 264.77754211</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">41.15766525 276.46942139 76.34716634 276.46942139</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">78.67637634 275.99771118 378.01656022 275.99771118</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">40.54477310 287.94104004 318.62269350 287.94104004</stroke>
</layer>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="2"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="3"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="4"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="5"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="6"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="7"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="8"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="9"/>
<layer/>
</page>
</xournal>

View File

@@ -699,26 +699,23 @@ and considered here?</text>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">234.01365124 56.90404704 298.47858791 56.90404704</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">48.39965160 68.06617103 292.04445111 68.06617103</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">48.80500548 78.49465807 63.32163914 79.14757222</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">94.00552071 80.22668418 213.89141267 80.22668418</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">240.42370680 80.50878333 294.98619459 80.50878333</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">49.91912143 91.68787530 109.00987130 91.68787530</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">124.66186592 101.93477910 124.66186592 117.71048868 234.42102061 117.71048868 234.42102061 101.93477910 124.66186592 101.93477910</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">94.00552071 80.22668418 213.89141267 80.22668418</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">240.42370680 80.50878333 294.98619459 80.50878333</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">49.91912143 91.68787530 109.00987130 91.68787530</stroke>
<stroke tool="highlighter" color="#ff00007f" width="8.50000000" fill="128">124.66186592 101.93477910 124.66186592 117.71048868 234.42102061 117.71048868 234.42102061 101.93477910 124.66186592 101.93477910</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">68.47389354 129.24359993 187.07496247 129.24359993</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">200.54845048 129.63017707 204.79511423 126.67785163</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">239.35741128 127.06747783 270.20461967 127.06747783</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">47.90201170 138.03103337 65.97986726 139.76853746</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">105.20931531 138.45301071 162.92163797 138.45301071</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">181.47051328 139.65138087 238.59035193 139.65138087</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">47.45419049 151.33026173 73.89024898 151.33026173</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">142.72968280 151.18164977 297.64924626 151.18164977</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">48.52801825 161.95356187 265.31657741 161.95356187</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">117.99112359 174.92225050 291.80041063 174.92225050</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">47.90409179 185.51778172 106.48776344 185.51778172</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">135.37302059 186.22120361 289.07569919 186.22120361</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">79.84740241 197.12191732 180.26366418 197.12191732</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">200.54845048 129.63017707 204.79511423 126.67785163</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">239.35741128 127.06747783 270.20461967 127.06747783</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">47.90201170 138.03103337 65.97986726 139.76853746</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">105.20931531 138.45301071 162.92163797 138.45301071</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">181.47051328 139.65138087 238.59035193 139.65138087</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">47.45419049 151.33026173 73.89024898 151.33026173</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">117.99112359 174.92225050 291.80041063 174.92225050</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">47.90409179 185.51778172 106.48776344 185.51778172</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">79.84740241 197.12191732 180.26366418 197.12191732</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">91.25706084 205.78669895 91.25706084 233.33486307 257.24161221 233.33486307 257.24161221 205.78669895 91.25706084 205.78669895</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">74.52609696 243.52963985 94.17824960 241.75708008</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">124.26769196 243.44950274 264.89012007 243.44950274</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">74.52609696 243.52963985 94.17824960 241.75708008</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">124.26769196 243.44950274 264.89012007 243.44950274</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">45.89230932 257.64400315 82.97993299 254.67293541</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">122.83964251 257.92927196 169.60141510 257.92927196</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">208.12297469 255.97655874 294.58478097 255.97655874</stroke>
@@ -831,11 +828,11 @@ that way keep edge but smooth otherwise</text>
what happens if apply many times the filter? Get a single color image or only edges?</text>
<text font="Sans" size="11.00000000" x="105.08740424" y="713.39660615" color="#00c0ffff" ts="0" fn="">?</text>
<text font="Sans" size="11.00000000" x="47.17761239" y="172.22262609" color="#00c0ffff" ts="0" fn="">Independent and identically distributed random variables</text>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">360.62404437 56.50215566 412.62421835 56.50215566</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">503.93888999 56.74246362 563.85102495 56.74246362</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">314.16312679 67.89352828 377.15982828 67.89352828</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">326.73579824 79.29706273 566.05358802 79.29706273</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">314.14872554 92.91554753 396.99601563 92.91554753</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">360.62404437 56.50215566 412.62421835 56.50215566</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">503.93888999 56.74246362 563.85102495 56.74246362</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">314.16312679 67.89352828 377.15982828 67.89352828</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">326.73579824 79.29706273 566.05358802 79.29706273</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">314.14872554 92.91554753 396.99601563 92.91554753</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">385.42358496 72.64296108 503.46352239 72.64296108</stroke>
<text font="Sans" size="11.00000000" x="359.07074194" y="37.69319842" color="#00c0ffff" ts="0" fn="">why this value and what does it mean?</text>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">331.12401113 122.99908986 558.38174858 122.99908986</stroke>
@@ -953,6 +950,14 @@ values, is it?</text>
<text font="Sans" size="11.00000000" x="50.19647041" y="370.38735939" color="#00c0ffff" ts="0" fn="">2</text>
<text font="Sans" size="11.00000000" x="411.02119390" y="102.60461263" color="#00c0ffff" ts="0" fn="">3</text>
<text font="Sans" size="11.00000000" x="468.67129924" y="568.50241754" color="#00c0ffff" ts="0" fn="">4</text>
<text font="Sans" size="11.00000000" x="256.64285278" y="715.37469482" color="#00c0ffff" ts="0" fn="">?</text>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">135.37302059 186.22120361 289.07569919 186.22120361</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">141.05700684 150.30480957 234.35293524 150.30480957</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">104.65768433 161.09030151 263.06051594 161.09030151</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">240.77893066 150.39559937 297.05985950 150.39559937</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">50.38613892 162.83441162 91.31531997 162.83441162</stroke>
<text font="Sans" size="11.00000000" x="320.14147949" y="16.07629395" color="#00c0ffff" ts="0" fn="">guess that no Wavelet coefficients are involved here
but only the image itself</text>
</layer>
</page>
<page width="612.00000000" height="792.00000000">

View File

@@ -0,0 +1 @@
https://en.wikipedia.org/w/index.php?title=Stationary_process&oldid=1182329269

View File

@@ -0,0 +1,39 @@
<?xml version="1.0" standalone="no"?>
<xournal creator="Xournal++ 1.1.3" fileversion="4">
<title>Xournal++ document - see https://github.com/xournalpp/xournalpp</title>
<page width="596.00000000" height="842.00000000">
<background type="pdf" domain="absolute" filename="/home/benjamin/Desktop/bens_folder/school/ens/asp/aria/internship/work/articles/Stationary process - Wikipedia/Stationary process - Wikipedia.pdf" pageno="1"/>
<layer>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">41.53612340 55.58784376 121.76637572 55.58784376</stroke>
<stroke tool="highlighter" color="#ffff007f" width="2.83000000" fill="128">46.23368992 68.55882037 97.07645095 68.55882037</stroke>
<stroke tool="highlighter" color="#ffff007f" width="2.83000000" fill="128">149.96093856 68.01827231 546.67830406 68.01827231</stroke>
<stroke tool="highlighter" color="#ffff007f" width="2.83000000" fill="128">39.50689922 74.76654900 65.98397635 74.76654900</stroke>
<stroke tool="highlighter" color="#ffff007f" width="2.83000000" fill="128">108.79656039 75.38618179 200.37020581 75.38618179</stroke>
<stroke tool="highlighter" color="#ffff007f" width="2.83000000" fill="128">370.91321857 74.58163167 552.76219400 74.58163167</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="1.41000000" fill="255">205.63933043 78.10057337 367.88448437 78.10057337</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="2.83000000" fill="128">85.66338365 86.18721429 369.86613860 86.18721429</stroke>
<stroke tool="highlighter" color="#ffff007f" width="2.83000000" fill="128">381.37392050 86.50007662 519.87845111 86.50007662</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">522.69595615 89.76527379 556.52749619 89.76527379</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">39.88840084 95.82935010 162.95541887 95.82935010</stroke>
<text font="Sans" size="11.00000000" x="94.94414138" y="89.50047409" color="#00c0ffff" ts="0" fn="">?</text>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">179.19635586 95.64621804 202.83193965 95.64621804</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">409.46243692 95.72940579 429.94260330 95.72940579</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="1.41000000" fill="255">393.76582460 96.20429003 233.64525183 96.20429003</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="1.41000000" fill="255">480.65404283 96.37880889 558.13270558 96.37880889</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="1.41000000" fill="255">38.41383077 101.90882052 325.70932308 101.90882052</stroke>
<text font="Sans" size="11.00000000" x="257.27298457" y="81.73344511" color="#00c0ffff" ts="0" fn="">?</text>
<stroke tool="highlighter" color="#00c0ff7f" width="2.83000000" fill="128">40.04798756 110.30022737 321.51688137 110.30022737</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="1.41000000" fill="255">325.32163795 113.38592569 413.37353139 113.38592569</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">416.46567965 114.20074899 557.01660261 114.20074899</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">38.31188586 120.63766674 63.10099726 120.63766674</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">64.91650648 120.24592326 413.31386633 120.24592326</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="2.83000000" fill="128">40.42377707 127.98313495 554.98013725 127.98313495</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="2.83000000" fill="128">38.66530065 134.24841534 53.10377826 134.24841534</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">56.97145464 137.81421279 100.64650418 137.81421279</stroke>
</layer>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="2"/>
<layer/>
</page>
</xournal>

View File

@@ -0,0 +1 @@
https://en.wikipedia.org/w/index.php?title=Stochastic_process&oldid=1194369849

View File

@@ -0,0 +1,200 @@
<?xml version="1.0" standalone="no"?>
<xournal creator="Xournal++ 1.1.3" fileversion="4">
<title>Xournal++ document - see https://github.com/xournalpp/xournalpp</title>
<page width="596.00000000" height="842.00000000">
<background type="pdf" domain="absolute" filename="/home/benjamin/Desktop/bens_folder/school/ens/asp/aria/internship/work/articles/Stochastic process - Wikipedia/Stochastic process - Wikipedia.pdf" pageno="1"/>
<layer>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">46.68212891 85.53733826 245.76046213 85.53733826</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">396.49957275 288.34011841 493.00421112 288.34011841</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">465.68060303 300.17306519 512.71154785 303.94537354</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">388.44812012 316.11822510 469.20993462 316.11822510</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">518.44897461 316.42333984 545.93414307 315.14233398</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">386.72003174 329.83593750 480.01797503 329.83593750</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">514.38378906 331.10241699 538.37799213 331.10241699</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">387.23968506 346.13442993 420.11517750 346.13442993</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">477.81872559 343.29266357 540.59222412 346.31185913</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">389.55206299 357.86224365 506.13070570 357.86224365</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">390.87713623 373.21392822 542.91199101 373.21392822</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">388.29162598 385.13153076 418.74040517 385.13153076</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">69.55459595 116.42871094 159.29585400 116.42871094</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">292.57507324 115.42108154 360.98214417 115.42108154</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">117.35314941 131.99594116 360.81956116 131.99594116</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">45.81384277 147.73959351 368.20724766 147.73959351</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">44.22827148 167.64532471 361.30977998 167.64532471</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">45.44189453 179.28054810 148.79212708 179.28054810</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">290.41400146 181.99700928 359.93851031 181.99700928</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">42.13558960 195.66055298 359.82269893 195.66055298</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">50.60610962 213.41128540 172.64354560 213.41128540</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">188.35113525 218.19049072 232.02343206 218.19049072</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">44.46865845 233.08044434 143.49495581 233.08044434</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">227.19909668 234.84033203 323.81034715 234.84033203</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="2.26000000" fill="255">168.84082031 251.19631958 273.95061693 251.19631958</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">179.34121704 268.20642090 333.29245585 268.20642090</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="2.26000000" fill="255">63.91516113 298.84884644 152.38663419 298.84884644</stroke>
</layer>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="2"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="3"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="4"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="5"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="6"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="7"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="8"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="9"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="10"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="11"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="12"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="13"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="14"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="15"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="16"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="17"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="18"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="19"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="20"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="21"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="22"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="23"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="24"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="25"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="26"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="27"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="28"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="29"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="30"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="31"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="32"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="33"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="34"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="35"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="36"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="37"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="38"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="39"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="40"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="41"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="42"/>
<layer/>
</page>
</xournal>

View File

@@ -0,0 +1 @@
https://en.wikipedia.org/w/index.php?title=Transfer_function&oldid=1201177670

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" standalone="no"?>
<xournal creator="Xournal++ 1.1.3" fileversion="4">
<title>Xournal++ document - see https://github.com/xournalpp/xournalpp</title>
<page width="596.00000000" height="842.00000000">
<background type="pdf" domain="absolute" filename="/home/benjamin/Desktop/bens_folder/school/ens/asp/aria/internship/work/articles/Transfer function - Wikipedia/Transfer function - Wikipedia.pdf" pageno="1"/>
<layer>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">49.39389038 84.43911743 242.62412206 84.43911743</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">58.36187744 118.04278564 113.62524414 115.04522705</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">237.11975098 115.88031006 550.18459754 115.88031006</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">44.15441895 132.40258789 548.96504051 132.40258789</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">46.98767090 150.09262085 115.35123959 150.09262085</stroke>
</layer>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="2"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="3"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="4"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="5"/>
<layer/>
</page>
<page width="596.00000000" height="842.00000000">
<background type="pdf" pageno="6"/>
<layer/>
</page>
</xournal>

View File

@@ -0,0 +1 @@
https://web.archive.org/web/20240320105334/https://web.stanford.edu/class/ee368/Handouts/Lectures/2014_Spring/8-Linear-Image-Processing/Wiener_Filtering.pdf

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" standalone="no"?>
<xournal creator="Xournal++ 1.1.3" fileversion="4">
<title>Xournal++ document - see https://github.com/xournalpp/xournalpp</title>
<page width="959.76000000" height="540.00000000">
<background type="pdf" domain="absolute" filename="/home/benjamin/Desktop/bens_folder/school/ens/asp/aria/internship/work/articles/Wiener_Filtering/Wiener_Filtering.pdf" pageno="1"/>
<layer/>
</page>
<page width="959.76000000" height="540.00000000">
<background type="pdf" pageno="2"/>
<layer/>
</page>
<page width="959.76000000" height="540.00000000">
<background type="pdf" pageno="3"/>
<layer/>
</page>
<page width="959.76000000" height="540.00000000">
<background type="pdf" pageno="4"/>
<layer/>
</page>
<page width="959.76000000" height="540.00000000">
<background type="pdf" pageno="5"/>
<layer/>
</page>
<page width="959.76000000" height="540.00000000">
<background type="pdf" pageno="6"/>
<layer/>
</page>
<page width="959.00000000" height="540.00000000">
<background type="pdf" pageno="7"/>
<layer>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">840.80999756 215.64407349 847.74066162 225.16799927</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">847.74066162 225.16799927 868.79437256 193.89343262</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">308.97750854 475.46148682 321.98715210 493.16235352</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">321.98715210 493.16235352 344.15380859 459.24389648</stroke>
</layer>
</page>
</xournal>

View File

@@ -0,0 +1 @@
https://web.archive.org/web/20220709214220/http://sig.umd.edu/publications/Wu_ICIP_2012.pdf

View File

@@ -0,0 +1,82 @@
<?xml version="1.0" standalone="no"?>
<xournal creator="Xournal++ 1.1.3" fileversion="4">
<title>Xournal++ document - see https://github.com/xournalpp/xournalpp</title>
<page width="612.00000000" height="792.00000000">
<background type="pdf" domain="absolute" filename="/home/benjamin/Desktop/bens_folder/school/ens/asp/aria/internship/work/articles/Wu_ICIP_2012/Wu_ICIP_2012.pdf" pageno="1"/>
<layer>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">189.86619681 100.34185993 471.59663745 100.34185993</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">120.55679195 76.98175099 511.06617071 76.98175099</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">138.76572286 98.20363699 179.89327241 98.20363699</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">77.41941258 191.18816635 176.69579401 191.18816635</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">459.62811852 572.05461786 536.40914164 572.05461786</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">317.65695169 582.93401670 532.98492755 582.93401670</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">318.11393371 592.53780953 387.53102537 592.53780953</stroke>
<stroke tool="highlighter" color="#ff00007f" width="8.50000000" fill="128">416.26214183 593.68105666 535.59895730 593.68105666</stroke>
<stroke tool="highlighter" color="#ff00007f" width="8.50000000" fill="128">315.63638411 603.43834410 376.18976816 603.43834410</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">139.45716122 378.70050804 208.05241843 378.70050804</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">238.08555064 378.74488474 297.87494090 378.74488474</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">78.93345214 390.08937388 297.08516010 390.08937388</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">78.17899617 400.72696244 242.72783939 400.72696244</stroke>
<stroke tool="highlighter" color="#ff00007f" width="8.50000000" fill="128">252.20626186 400.18370744 298.78562791 400.18370744</stroke>
<stroke tool="highlighter" color="#ff00007f" width="8.50000000" fill="128">78.66667086 411.37732832 172.83413256 411.37732832</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">182.94980638 411.63570950 294.96144099 411.63570950</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">78.08589681 419.59506323 154.70364562 419.59506323</stroke>
</layer>
</page>
<page width="612.00000000" height="792.00000000">
<background type="pdf" pageno="2"/>
<layer>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">113.05686107 672.66922409 296.44277736 672.66922409</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">68.34184527 684.77824724 258.51710426 684.77824724</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">68.65223203 695.80774312 251.55692143 695.80774312</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">265.11010524 694.69722094 300.10903449 694.69722094</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">69.92480524 705.80446462 296.15811274 705.80446462</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">318.78699653 78.11439441 546.53326986 78.11439441</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">319.41066029 90.02207601 377.41961748 90.02207601</stroke>
<stroke tool="pen" ts="0" fn="" color="#000000ff" width="1.41000000" fill="255">552.10787178 85.59945343 552.10787178 126.11819116</stroke>
<text font="Sans" size="11.00000000" x="556.68595380" y="95.00859413" color="#000000ff" ts="0" fn="">repeating</text>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">397.41758794 131.64524977 543.52425391 131.64524977</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">319.44638779 143.33844575 544.00302913 143.33844575</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">317.17219592 154.11187377 380.89626753 154.11187377</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">381.80490880 164.49886246 381.80490880 188.35804957 489.83885903 188.35804957 489.83885903 164.49886246 381.80490880 164.49886246</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">348.99269109 201.41457550 348.99269109 201.41457550</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">388.18232038 201.93517385 546.06093760 201.93517385</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">319.37134969 220.11630584 378.22128431 220.11630584</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">412.37380430 220.97571258 412.37380430 220.97571258</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">457.79604024 220.16517707 544.99387050 220.16517707</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">319.80731485 233.35482844 447.33989804 233.35482844</stroke>
<text font="Sans" size="11.00000000" x="325.95857855" y="232.00175549" color="#00c0ffff" ts="0" fn="">?</text>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">319.62726476 245.41541137 547.50943859 245.41541137</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">320.65995162 255.84081489 426.42661319 255.84081489</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">460.62299210 255.14965818 545.51262246 255.14965818</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">317.55386354 266.63303688 543.52005731 266.63303688</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">318.81349069 276.95931983 344.64999234 276.95931983</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">351.98632538 288.04530323 351.98632538 311.85561911 521.50559156 311.85561911 521.50559156 288.04530323 351.98632538 288.04530323</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">347.10946908 326.05904278 347.10946908 326.05904278</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">381.87150597 326.28160757 542.83764148 326.28160757</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">375.30918646 343.68874121 389.86257172 343.68874121</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">421.06640653 342.80204789 545.51093442 342.80204789</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">318.14104183 356.92187196 367.54199113 356.92187196</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">498.40787923 356.59210742 547.53351612 356.59210742</stroke>
<stroke tool="highlighter" color="#ffff007f" width="8.50000000" fill="128">320.38333045 373.41431942 457.43886341 373.41431942</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">468.04976568 376.74471216 548.60279193 376.74471216</stroke>
<stroke tool="pen" ts="0" fn="" color="#00c0ffff" width="1.41000000" fill="255">317.06105133 391.69800003 447.08294363 391.69800003</stroke>
<stroke tool="highlighter" color="#00c0ff7f" width="8.50000000" fill="128">318.71726415 422.41714400 341.09904824 421.28413071</stroke>
<text font="Sans" size="11.00000000" x="496.83511099" y="426.93788671" color="#00c0ffff" ts="0" fn="">a bit unclear</text>
<text font="Sans" size="11.00000000" x="551.03425504" y="385.12907290" color="#00c0ffff" ts="0" fn="">a bit unclear</text>
<stroke tool="highlighter" color="#ff00007f" width="8.50000000" fill="128">376.61315431 446.50303023 543.67687816 446.50303023</stroke>
<stroke tool="highlighter" color="#ff00007f" width="8.50000000" fill="128">320.00841558 458.41942838 544.00912156 458.41942838</stroke>
<stroke tool="highlighter" color="#ff00007f" width="8.50000000" fill="128">320.17024017 470.35877206 361.63802376 470.35877206</stroke>
<text font="Sans" size="11.00000000" x="370.49258802" y="710.75351140" color="#00c0ffff" ts="0" fn="">for a single image it seems</text>
<stroke tool="highlighter" color="#ff00007f" width="8.50000000" fill="128">481.89488071 701.82269553 492.75675922 701.82269553</stroke>
</layer>
</page>
<page width="612.00000000" height="792.00000000">
<background type="pdf" pageno="3"/>
<layer/>
</page>
<page width="612.00000000" height="792.00000000">
<background type="pdf" pageno="4"/>
<layer/>
</page>
</xournal>

View File

@@ -0,0 +1,143 @@
import numpy as np
from matplotlib import pyplot as plt
from PIL import Image
import sys
sys.path.insert(0, '../../algorithms/distance/')
from rms_diff import rmsDiffPil, rmsDiffNumpy
sys.path.insert(0, '../../algorithms/context_adaptive_interpolator/')
from context_adaptive_interpolator import contextAdaptiveInterpolator
from tqdm import tqdm
IMAGE_SIZE = 64
NUMBER_OF_PHONES = 1#0
NUMBER_OF_IMAGES_PER_PHONE = 10_000
# Compared to images being 1.
PRNU_FACTOR = 0.1
# Generate PRNUs and images of phones.
# Is such `np.maximum` probabilistically correct with our theoretical method? See #19.
def randomImage(scale):
return np.random.normal(loc = 0, scale = scale, size = (IMAGE_SIZE, IMAGE_SIZE))
imagesWithoutPrnu = [[randomImage(scale = 1) for _ in range(NUMBER_OF_IMAGES_PER_PHONE)] for phoneIndex in range(NUMBER_OF_PHONES)]
prnus = [np.array(Image.open('prnu.png').convert('F')) * PRNU_FACTOR / 255]
imagesWithPrnu = [[imageWithoutPrnu + prnus[phoneIndex] for imageWithoutPrnu in imagesWithoutPrnu[phoneIndex]] for phoneIndex in range(NUMBER_OF_PHONES)]
allImages = np.max([np.max(imagesWithoutPrnu) + np.max(prnus) + np.max(imagesWithPrnu)])
def toPilImage(npArray):
return Image.fromarray(npArray)
def showImageWithPil(npArray):
npArray -= npArray.min()
npArray = (npArray / npArray.max()) * 255
Image.fromarray(npArray).show()
def showImageWithMatplotlib(npArray):
plt.imshow(npArray)
plt.show()
NUMBER_OF_ROWS = 5
NUMBER_OF_COLUMNS = 3
fig, axes = plt.subplots(NUMBER_OF_ROWS, NUMBER_OF_COLUMNS)
fig.suptitle('Single PRNU estimation with images being Gaussian noise')
prnusPil = [toPilImage(prnu) for prnu in prnus]
MAIN_AXIS_ROW_INDEX = 1
mainAxis = axes[MAIN_AXIS_ROW_INDEX]
mainAxis[0].set_title('Actual PRNU')
mainAxis[0].imshow(prnus[0])
mainAxis[1].set_title('First image without PRNU')
mainAxis[1].imshow(imagesWithoutPrnu[0][0])
assert NUMBER_OF_IMAGES_PER_PHONE >= 10 ** (NUMBER_OF_ROWS - 1), 'Try to use more images than generated!'
for rowIndex, numberOfImages in enumerate([10 ** power for power in range(NUMBER_OF_ROWS)]):
imagesWithPrnuPil0Mean = np.array(imagesWithPrnu[0][:numberOfImages]).mean(axis = 0)
title = (f'Mean of first $N$ images with PRNU\ni.e. estimated PRNU\nRMS with actual PRNU\n\n' if rowIndex == 0 else '') + f'$N$ = {numberOfImages:,}, $RMS$ = {round(rmsDiffNumpy(imagesWithPrnuPil0Mean, prnus[0]), 4)}'
axes[rowIndex][2].set_title(title)
axes[rowIndex][2].imshow(imagesWithPrnuPil0Mean)
for columnIndex in range(NUMBER_OF_COLUMNS):
for axisIndex in range(NUMBER_OF_ROWS):
if axisIndex != MAIN_AXIS_ROW_INDEX:
axes[axisIndex][columnIndex].axis('off')
plt.tight_layout()
plt.show()
##
def toFileName(title):
return title.lower().replace(' ', '_').replace(',', '_')
for title, image in zip(['Actual PRNU', 'First image without PRNU'], [prnus[0], imagesWithoutPrnu[0][0]]):
plt.title(title)
plt.imshow(image)
plt.savefig(title.lower().replace(' ', '_') + '.svg')
for numberOfImages in [10 ** power for power in range(NUMBER_OF_ROWS)]:
title = 'First image with PRNU' if numberOfImages == 1 else f'Mean of first {numberOfImages:,} images with PRNU'
image = np.array(imagesWithPrnu[0][:numberOfImages]).mean(axis = 0)
plt.title(f'{title}\ni.e. estimated PRNU\nRMS with actual PRNU = {round(rmsDiffNumpy(image, prnus[0]), 4)}')
plt.imshow(image)
plt.savefig(f'{toFileName(title)}.svg')
##
# Compute CAI of phone images.
caiImages = [[contextAdaptiveInterpolator(image.load(), image) for image in imagesWithPrnuPil[phoneIndex]] for phoneIndex in tqdm(range(NUMBER_OF_PHONES))]
#caiImages[0][0].show()
# Guess the phone by consider the one reaching the lowest RMS difference between the estimated PRNU and the actual one.
def getPhoneIndexByNearestPrnu(estimatedPrnu):
nearestPrnuRmsDiff = None
nearestPrnuPhoneIndex = None
for phoneIndex, prnu in enumerate(prnusPil):
prnuRmsDiff = rmsDiffPil(estimatedPrnu, prnu)
if nearestPrnuRmsDiff is None or prnuRmsDiff < nearestPrnuRmsDiff:
nearestPrnuRmsDiff = prnuRmsDiff
nearestPrnuPhoneIndex = phoneIndex
return nearestPrnuPhoneIndex
# Predict the phones based on the estimated PRNUs and compute each method accuracy.
# What about CAI on `phoneImagesMean`? See https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/issues/9#issuecomment-1369.
correctGuessesByMeanImages = 0
correctGuessesByMeanCAIImages = 0
# Maybe make sense only because Gaussian images here.
correctGuessesByCAIImagesMean = 0
for phoneIndex in range(NUMBER_OF_PHONES):
phoneImages = imagesWithPrnuPil[phoneIndex]
phoneCaiImages = caiImages[phoneIndex]
phoneImagesMean = toPilImage(np.array(phoneImages).mean(axis = 0))
caiImagesMean = toPilImage(np.array(phoneCaiImages).mean(axis = 0))
caiOverPhoneImagesMean = contextAdaptiveInterpolator(phoneImagesMean.load(), phoneImagesMean)
phonePrnu = prnusPil[phoneIndex]
print('RMS diff with mean image =', rmsDiffPil(phoneImagesMean, phonePrnu))
print('RMS diff with mean CAI images =', rmsDiffPil(caiImagesMean, phonePrnu))
print('RMS diff with CAI images mean =', rmsDiffPil(caiOverPhoneImagesMean, phonePrnu))
guessedPhoneIndexByMeanImages = getPhoneIndexByNearestPrnu(phoneImagesMean)
guessedPhoneIndexByMeanCAIImages = getPhoneIndexByNearestPrnu(caiImagesMean)
guessedPhoneIndexByCAIImagesMean = getPhoneIndexByNearestPrnu(caiOverPhoneImagesMean)
print(f'Actual phone index {phoneIndex}, guessed phone index {guessedPhoneIndexByMeanImages} by mean images, {guessedPhoneIndexByMeanCAIImages} by mean CAI images and {guessedPhoneIndexByCAIImagesMean} by CAI images mean')
correctGuessesByMeanImages += 1 if phoneIndex == guessedPhoneIndexByMeanImages else 0
correctGuessesByMeanCAIImages += 1 if phoneIndex == guessedPhoneIndexByMeanCAIImages else 0
correctGuessesByCAIImagesMean += 1 if phoneIndex == guessedPhoneIndexByCAIImagesMean else 0
print(f'{correctGuessesByMeanImages / NUMBER_OF_PHONES=}')
print(f'{correctGuessesByMeanCAIImages / NUMBER_OF_PHONES=}')
print(f'{correctGuessesByCAIImagesMean / NUMBER_OF_PHONES=}')

View File

@@ -0,0 +1 @@
https://lesc.dinfo.unifi.it/VISION/dataset/

View File

@@ -0,0 +1,46 @@
import requests
from lxml import html
import os
DOWNLOAD = True
# An alternative for downloading would be something like:
# ```bash
# wget --reject 'index.html*' -l inf -nH --cut-dirs=2 --recursive --no-parent https://lesc.dinfo.unifi.it/VISION/dataset/
# ```
# but this would not only download `flat` images.
url = 'https://lesc.dinfo.unifi.it/VISION/dataset/'
def getFolderEntries(url):
text = requests.get(url).text
tree = html.fromstring(text)
# Remove legend, deisgn and `Parent Directory` entries.
entriesLines = tree.xpath('//tr')[3:-1]
entries = []
for entryLine in entriesLines:
entryColumns = entryLine.xpath('td')
entryName = entryColumns[1].text_content()
entrySize = entryColumns[3].text_content().strip()
if entrySize != '-':
sizeUnit = entrySize[-1]
sizeValue = float(entrySize[:-1])
entrySize = int(sizeValue * {
'K': 1_000,
'M': 1_000_000,
}[sizeUnit])
entries += [[entryName, entrySize]]
return entries
os.mkdir('dataset')
totalPhotoSizes = 0
phoneFolders = getFolderEntries(url)
for phoneFolder, _ in phoneFolders:
phoneName = phoneFolder[:-1]
print(phoneName)
phonePhotos = getFolderEntries(f'{url}/{phoneName}/images/flat/')
for phonePhotoName, phonePhotoSize in phonePhotos:
print(phonePhotoName, phonePhotoSize)
totalPhotoSizes += phonePhotoSize
print(totalPhotoSizes)