# An Effective Directional Residual Interpolation Algorithm for Color Image Demosaicking
## 4 Experimental Results  
In this section, 18 images in the MCMaster dataset [29] are used to evaluate the effectiveness of the proposed algorithm. These images have a resolution of 500 \(\times\) 500 as shown in Figure 6. The MCMaster dataset images are more in line with the characteristics of digital color images. The proposed algorithm is compared with DLMMSE [9], LDI-NAT [29], LDI-NLM [29], VDI [18], RI [19], and MLRI [21]. Especially, the guided filter is applied in the proposed algorithm, RI, and MLRI. Figure 6: _Cont._  
To simulate the proposed algorithm, we use MATLAB R2015b with Inter Core i7-5500U and 2.4 GHz CPU processors. Each calculation excludes the boundary of 10 pixels around the interpolated image in order to avoid the boundary effect. Two indexes, peak signal-to-noise ratio (PSNR) and composite PSNR (CPSNR), are used to calculate the quality of the reconstructed demosaicking images, which are defined as:  
\[\text{PSNR}=10\log_{10}\left[\frac{255^{2}}{\frac{1}{MN}\sum\limits_{i=1}^{M} \sum\limits_{j=1}^{N}\left[I_{\text{in}}(i,j)-I_{\text{out}}(i,j)\right]^{2}} \right](\text{dB}), \tag{17}\]  
and  
\[\text{CPSNR}=10\log_{10}\left[\frac{255^{2}}{\frac{1}{3 MN}\sum\limits_{k=1}^{3 }\sum\limits_{i=1}^{M}\sum\limits_{j=1}^{N}\left[I_{\text{in}}(i,j,k)-I_{\text {out}}(i,j,k)\right]^{2}}\right](\text{dB}), \tag{18}\]  
where \(M\) and \(N\) are the row and column sizes of image; \(I_{\text{in}}\) and \(I_{\text{out}}\) are the input image and the output image, respectively; \(i\) and \(j\) are the locations of pixels in the color plane, and \(k\) represents the color plane. Table 2 shows the PSNR of different algorithms to G components, since G components are the peak sensitivity of HVS. The highest PSNR of each image is marked in bold. Table 3 shows the CPSNR of different algorithms. The highest CPSNR of each image is marked in bold. Figure 6: The MCMaster dataset images. As shown in Table 2, the proposed algorithm performs better than the other six algorithms on 10 out of 18 images. The average PSNR of G components in the proposed algorithm is higher than MLRI and RI by 0.31 dB and 0.20 dB, respectively. Moreover, as for CPSNR in Table 3, the proposed algorithm performs better than the other six algorithms on 11 out of 18 images. The average CPSNR of the proposed algorithm is higher than that of MLRI and RI by 0.35 dB and 0.25 dB, respectively. In brief, among the three methods, RI [19], MLRI [21], and the proposed algorithm, those use the guided filter, the proposed algorithm is superior to MLRI and RI. This demonstrates that the proposed algorithm is effective for image demosaicking. artifacts than other subfigures. In Figure 8, the Figure 8i reconstructs the dots more exactly than other subfigures. We use CPU processing time to compare computational complexity. The original source codes of [9; 19; 21; 29] are used to record the CPU processing time under the same test conditions. The average computation time for each method is shown in Table 4. For each image, the proposed algorithm takes 1.50 s while MLRI takes 1.57 s. The proposed algorithm reduces two directional-weight calculation processes. Therefore, it shows lower complexity. LDI-NAT and LDI-NLM take more than 60 s in the same condition because of the nonlocal mean method that is used to refine the interpolation. To sum up, the proposed algorithm provides a relatively low computational complexity. \begin{table}
\begin{tabular}{c c c c c c} \hline
**DLMMSE [9]** & **LDI-NAT [29]** & **LDI-NLM [29]** & **VDI [18]** & **RI [19]** & **MLRI [21]** & **Proposed** \\ \hline
6.68 & 397.94 & 66.90 & 1.96 & 1.20 & 1.57 & 1.50 \\ \hline \end{tabular}
\end{table} 
Table 4: Average computation time (s) on MCMaster images. Figure 7: The processing results of image Figure 6a: (**a**) the original image marked with the yellow rectangular frame; (**b**) the enlarged area of the yellow rectangular frame; (**c**) DLMMSE [9]; (**d**) LDI-NAT [29]; (**e**) LDI-NLM [29]; (**f**) VDI [18]; (**g**) RI [19]; (**h**) MLRI [21]; (**i**) the proposed algorithm.