# Changed Detection Based on Patch Robust Principal Component Analysis
## 3 Methodology
### Algorithm and Flow Chart  
This section illustrates the steps by Figure 3 and presents the basic algorithm procedure of change detection proposed in this paper, as shown in Algorithm 1. Figure 2: Procedure of obtaining the image patches sequence. The image here is divided into four patches with \(N\) frames. These images are concatenated to obtain a new image sequence with \(T\times N\) frames. **Input:** A registered pair of fundus image \(I_{1}\) and \(I_{2}\);  
**Output:** Change detection of \(I_{2}\) according to \(I_{1}\)  
```
1:Correct the intra-image intensity of \(I_{1}\) and \(I_{2}\) to get \(\bar{I}_{1}\) and \(\bar{I}_{2}\);
2:Normalize the intensity of \(\bar{I}_{1}\) and \(\bar{I}_{2}\) according to (1) and (2) to obtain \(\hat{I}_{12}\) and \(\hat{I}_{21}\);
3:Interpolate \(p_{1}\) frame between \(\bar{I}_{1}\) and \(\hat{I}_{12}\) according (3), interpolate \(p_{2}\) frame between \(\bar{I}_{2}\) and \(\hat{I}_{21}\) according (4);
4:Vectorize \(\hat{I}_{1k}\) and \(\hat{I}_{2l}\), \(k=1,2,\cdots,p_{1}\), \(l=1,2,\cdots,p_{2}\), divide the image sequence into patch image sequences and concatenate them into \(D^{\prime}\);
5:Do low-rank decomposition on \(D^{\prime}\) to get low-rank background matrix \(A^{\prime}\) and sparse foreground matrix \(E^{\prime}\);
6:Convert the columns of \(E^{\prime}\) back to images, and they are recovered to the size of the original image according to the original stacking order, the final image sequence can be represented as \(I_{E}\), \(I_{E}=\{I_{E1},I_{E2},\cdots,I_{EN}\}\), and take the frames from \(I_{E}\) as the change component. Figure 3: Flow chart of P-RPCA. ## 4 Experiments and Discussion

In this experiment, \(\lambda\) is the reciprocal of the size of a single image block after dividing, \(\mu\) is set to 1.25 times the reciprocal of the maximum singular value of \(D\). The registration in this paper is based on the local partial intensity invariant feature descriptor (PIIFD) [32]. In the modeling of a low-rank image sequence, there are 20 interpolated background images and 3 foreground images. ### Data

The experiments validated the effectiveness of the proposed method from two pairs of fundus images with different lesion sizes. Figure 4 shows these two pairs of fundus images. Figure 4a,b are the fundus image pair from the public dataset DRIVE [25]. Figure 4a is the original image taken as the reference image of the image pair, and Figure 4b is one attached with the red noise patch regarded as small lesions on Figure 4a, which is seen as the current image. Figure 4c,d are the images corrected by IRHF and illumination models are presented in Figure 4e,f separately. Figure 4g,h are the fundus image pair from Xinhua Hospital in Shanghai. The original image pair is of high resolution and is under-sampled to 403 \(\times\) 384. Figure 4g is the reference image with a slight random spot on the low-right corner. Figure 4h is the current image involved with a big bright lesion. The image pair is also enhanced and corrected by IRHF. Their corrected images are presented in Figure 4i,j separately, and their illumination models are shown in Figure 4k,l, respectively. ### Validation Measurement

The proposed method was validated by ROC curve and PR curve. The AUC designed to evaluate the comprehensive performance of the classifier is calculated through the ROC curve where TPR and FPR denote the vertical and horizontal coordinates separately. MAP is used to calculate the average accuracy value through the PR curve where precision and recall denote the vertical and horizontal coordinates, respectively. The four indexes are given by the following formulas:

\[TPR =\frac{TP}{TP+FN} \tag{12}\] \[FPR =\frac{FP}{TN+FP}\] (13) \[Precision =\frac{TP}{TP+FP} \tag{14}\]

Figure 4: Fundus image pairs with a different size of lesions.