# A Novel PCA-Based Method for PRNU Distillation to the Benefit of Source Camera Identification
## 3 The Proposed Method
### Extracting Interference Noise from the Reference PRNU  
Firstly, in order to apply PCA to estimate the interference noise \(V\) leaking in the reference PRNU noise \(R\), we need to construct a training sample dataset. Each pixel and its neighbourhood in the reference PRNU noise are modelled as a vector variable, scene detail extraction is performed on vectors rather than on individual pixels. Applying PCA directly to the reference PRNU enhancement makes it difficult to capture the intensity of the suppressed interference noise, so the PCA training dataset must be data selected. In other words, the more interference noise contained in the training samples, the more accurately the interference noise is estimated in the PCA domain. If the interference noise leaks into the reference PRNU, it will cause a correlation between neighbouring pixel blocks. In order to more accurately estimate the interference noise in the PCA domain, as many correlated pixel blocks as possible should be sought in the local pixel block. A higher number of pixel blocks with similarity in a local pixel block means that there is more interference noise. Local pixel matching (LPM) has been proven to be an effective method for finding the most similar pixel blocks within image local pixels [13]. The reference PRNU noise is split into multiple \(L\times L\) training blocks, and each training sample has \(K\times K\) pixels. As shown in the following Figure 2, there are \((L-K+1)^{2}\) training samples in the training block. We denote the centre block of the training block as \(x_{target},target=(L\times L+1)/2\). The centre block is converted into a vector called the reference vector, denoted as \(\vec{x_{0}}=[x_{1}\ x_{2}\ \cdots\ x_{m}]^{T},\ m=K^{2}\). Likewise, other moving pixel blocks are called matching vectors, denoted as \(\vec{x_{i}},\ i=1,\ 2,\ \cdots,\ (L-K+1)^{2}-1\), shown in the red area of Figure 2.  
We let \(e_{i}\) denote the correlation between two vectors, calculated from the mean square error (MSE):  
\[e_{i}=\frac{1}{m}\sum_{k=1}^{m}{(x_{0}(K)-x_{i}(K))^{2}}. \tag{6}\]  
Figure 1: Flowchart of the proposed enhanced reference PRNU noise scheme. Figure 2: Illustration of the LPM model. The sample vector \(\vec{x_{0}}\) denotes the pixels contained in the central \(K\times K\) block, and the sample vectors \(\vec{x_{i}}\) denote the pixels corresponding to the other blocks. In order to find the most similar vectors to construct a training dataset, we sort \(e_{i}\)-values from smallest to largest. A smaller value of \(e_{i}\) means that \(\vec{x_{0}}\) has a sufficiently similar image structure to \(\vec{x}_{i}\). The number of vectors in the final sample dataset for PCA training is at least \(c\times K^{2}\), where \(c\) is a constant ranging from 8 to 10. Usually, the training dataset with \(c\times K^{2}\) samples is robust for estimating the image's local features, making it more reliable in computing the PCA transform matrix [19]. Then we use PCA to estimate the interference noise \(V\) in the training dataset \(X\). Suppose we choose \(m\) sample vectors of the training dataset. The centralized training dataset is formed as \(X=[\vec{x_{0}}\ \vec{x_{1}}\ \cdots\ \vec{x}_{m-1}]\), where \(\vec{x_{0}}\) is the central vector, \(\vec{x_{1}},\ \cdots,\ \vec{x}_{m-1}\) denotes other vectors. To make the representation easier, in an \(m\times n\) matrix \(X\), each vector sample \(\vec{x}_{i},\ i=1,\ 2,\ \cdots,\ m\) has \(n\)-component discrete variables \(x_{k}^{i},\ i=1,\ 2,\ \cdots,\ n\). The training dataset \(X\) can be denote as:  
\[X= \begin{bmatrix}x_{1}^{1}&x_{1}^{2}&\cdots&x_{1}^{n}\\ x_{2}^{2}&x_{2}^{2}&\cdots&x_{2}^{n}\\ \vdots&\vdots&\ddots&\vdots\\ x_{m}^{1}&x_{m}^{2}&\cdots&x_{m}^{n}\end{bmatrix}  \tag{7}\]  
The covariance matrix \(\Omega_{X}\) of \(X\) is decomposed using eigenvalue decomposition,  
\[\Omega_{X}=\Phi_{X}\Lambda_{X}\Phi_{X}^{T}, \tag{8}\]  
where \(\Phi_{X}\) is the \(n\times n\) orthonormal eigenvector matrix and \(\Lambda_{X}\) is the diagonal eigenvalue matrix.