Investigate circles in Fourier domain of the estimated PRNU #76

Open
opened 2024-05-16 01:34:23 +02:00 by Benjamin_Loison · 5 comments

In Fourier domain

image

leads to

ifft1

in the image domain, so as shown for instance in the estimated PRNU using the non-local means denoiser (see issues/69#issuecomment-1884) we notice a radial gradient so all the circles we notice in the FFT are equivalent to this smooth radial gradient.

With wavelet and bilateral especially denoisers, and to some extent initial images we also significantly notice circles in the estimated PRNU, see issues/59#issuecomment-1721.

Related to #70 and #74.

In Fourier domain ![image](/attachments/f3a013b8-bac5-4346-80c2-e5a4c8c6e1f3) leads to ![ifft1](/attachments/a4efa76e-8090-4b19-a879-c964cc94b447) in the image domain, so as shown for instance in the estimated PRNU using the non-local means denoiser (see [issues/69#issuecomment-1884](https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/issues/69#issuecomment-1884)) we notice a radial gradient so all the circles we notice in the FFT are equivalent to this smooth radial gradient. With wavelet and bilateral especially denoisers, and to some extent initial images we also significantly notice circles in the estimated PRNU, see [issues/59#issuecomment-1721](https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/issues/59#issuecomment-1721). Related to #70 and #74.
Benjamin_Loison added the
enhancement
label 2024-05-16 01:34:23 +02:00
Author
Owner

Let us consider the FFT considering a centered crop of 800x800 of the estimated PRNU.

RESOLUTION = 800
padHeight, padWidth = [(dimension - RESOLUTION) // 2 for dimension in image.shape]
image = image[padHeight:-padHeight, padWidth:-padWidth]

Cropped PRNU:

prnu

FFT:

prnu_fft

Zoom 100x100:

image

We still notice circles in the FFT but less significant it seems than without cropping, see issues/70#issuecomment-1886.

As it seems we were able to guess the sizes of circles when considering the whole image, do we find the same sizes for this crop?

Let us consider the FFT considering a centered crop of 800x800 of the estimated PRNU. ```python RESOLUTION = 800 padHeight, padWidth = [(dimension - RESOLUTION) // 2 for dimension in image.shape] image = image[padHeight:-padHeight, padWidth:-padWidth] ``` Cropped PRNU: ![prnu](/attachments/d0b3626a-95a3-4dc0-85e1-db222845ec94) FFT: ![prnu_fft](/attachments/244b25fd-caa3-43d0-8905-b8329cf28857) Zoom 100x100: ![image](/attachments/c96c7cf7-147d-44e5-a675-a443601377e3) We still notice circles in the FFT but less significant it seems than without cropping, see [issues/70#issuecomment-1886](https://gitea.lemnoslife.com/Benjamin_Loison/Robust_image_source_identification_on_modern_smartphones/issues/70#issuecomment-1886). As it seems we were able to guess the sizes of circles when considering the whole image, do we find the same sizes for this crop?
Author
Owner

Should generare a white image with vignetting and see how the FFT looks like, see #69.

Let us consider a 2D degree 2 polynomial y(r) = ar^2 + br + c matching the center and corner conditions of Rafael 23/04/24 first image being DSC03294:

DSC03294

After GIMP Image > Mode > Grayscale:

Untitled

Top left pixel: 31,8
Center pixel: 42,0

Distance both of these pixels: d = \sqrt{3000^2 + 2000^2} = 3605.55.

We have y(0) = c = 42 and y(d) = ad^2 + bd = 31.8

So c = 42. Is not there an infinity of possibilities of pairs of a and b?

ad + b = 31.8 / d does not help much and seems to confirm the infinity of solutions.

Maybe could force b = 0.

FFT from artificial vignetting using 3 points to establish a degree 2 polynomial.

image

image

image

Resolution issue leading to significant axes in the Fourier domain when we consider artificial vignetting.

It indeed seems that if we consider an odd resolution artificial vignetting we get a far more consistent Fourier transform:

vignetting_odd vignetting_odd_fft

Resolution issue leading to significant axes in the Fourier domain when we consider artificial vignetting. The axes are still significant but the overall Fourier transform looks consistent. Well in fact I am unable to reproduce the inconsistent previous result.

Should generare a white image with vignetting and see how the FFT looks like, see #69. Let us consider a 2D degree 2 polynomial $y(r) = ar^2 + br + c$ matching the center and corner conditions of Rafael 23/04/24 first image being `DSC03294`: ![DSC03294](/attachments/e47e3ab9-0357-46f0-8cb6-e4c7af072994) After GIMP `Image` > `Mode` > `Grayscale`: ![Untitled](/attachments/16394e63-dd8f-4ee1-bdb3-f188b4085b89) Top left pixel: 31,8 Center pixel: 42,0 Distance both of these pixels: $d = \sqrt{3000^2 + 2000^2} = 3605.55$. We have $y(0) = c = 42$ and $y(d) = ad^2 + bd = 31.8$ So $c = 42$. Is not there an infinity of possibilities of pairs of $a$ and $b$? $ad + b = 31.8 / d$ does not help much and seems to confirm the infinity of solutions. Maybe could force $b = 0$. FFT from artificial vignetting using 3 points to establish a degree 2 polynomial. ![image](/attachments/5d37a63d-73a5-4b1e-a2c5-294e3a1fc561) ![image](/attachments/d1d5b194-c1c8-4915-9e6d-95b828d9774b) ![image](/attachments/9f367069-2a30-4664-865c-1810bb6fa5c9) Resolution issue leading to significant axes in the Fourier domain when we consider artificial vignetting. It indeed seems that if we consider an odd resolution artificial vignetting we get a far more consistent Fourier transform: <img width="4321" alt="vignetting_odd" src="/attachments/b4a41686-e516-4b53-9b6f-e9b96735ddad"> <img width="4321" alt="vignetting_odd_fft" src="/attachments/5401d5ca-dade-4664-b8c1-e622c2c846ff"> Resolution issue leading to significant axes in the Fourier domain when we consider artificial vignetting. The axes are still significant but the overall Fourier transform looks consistent. Well in fact I am unable to reproduce the inconsistent previous result.
Author
Owner

Crop (of above crop) without small circles:

image

Crop (of above crop) without small circles: ![image](/attachments/9cab9362-6adf-49c1-bece-410928bd9173)
223 KiB
Author
Owner

Could check what circle in image domain results in in Fourier domain and for circle in FFT what it results back in FFT if shifts the image in the image domain.

Could check what circle in image domain results in in Fourier domain and for circle in FFT what it results back in FFT if shifts the image in the image domain.
Author
Owner

How to remove circles? Related to #70.

How to remove circles? Related to #70.
Sign in to join this conversation.
No description provided.