# An Effective Directional Residual Interpolation Algorithm for Color Image Demosaicking
## 1 Introduction  
In recent years, many more people choose digital cameras to take pictures. Each digital color image needs at least three color samples at each pixel. To achieve the requirement, cameras have to set three sensors to get red (R), green (G), and blue (B) components at each pixel. However, in view of equipment costs, there is only one signal sensor set at each pixel. The sensors compose a color filter array (CFA). The CFA needs only one color to be observed and the other two missing colors can be estimated at each pixel. The process of estimation is called demosaicking [1]. The method effectively reduces the density of the sensors. Bayer pattern CFA [2] is the most common pattern for CFA, as shown in Figure 1. The G pixels are estimated on a quincunx grid, while R or B pixels are estimated on a rectangular grid in Bayer pattern CFA. The density of G pixels is as twice as that of R or that of B in Bayer pattern CFA, because the peak sensitivity of human visual system (HVS) lies in the wavelength of G light. For the original Bayer pattern CFA, the commonly used demosaicking algorithms include the nearest neighbor interpolation [3], bilinear interpolation [4], and bicubic interpolation [5]. These demosaicking algorithms generate the other two missing colors at each pixel with linear averaging color pixel values. They can be widely applied in a real-time system because of the lower computational complexity. However, they have significant zipper artifacts around line edges in demosaicking images. To solve this problem, several demosaicking algorithms [6; 7; 8] have been proposed. [PERSON] [6] proposed a high-quality linear interpolation algorithm for CFA demosaicking. It presents a simple linear demosaicking filter that has better performance and lower computational complexity. Many previous demosaicking algorithms are based on inter-channel color difference interpolation. For instance, [PERSON] [7] proposed a novel demosaicking algorithm exploiting joint intra-channel color correlation and inter-channel color difference, but it does not perform well enough when images have sharp color transition areas. Normally, G pixel values are first interpolated in most Bayer pattern CFA demosaicking algorithms, since the density of G pixel is as twice as that of R or that of B. On the contrary, [PERSON] et al. [8] proposed a novel demosaicking algorithm that estimated two independent chrominance components (R and B). Then they estimated the luminance component (G). As a result, the demosaicking algorithm can avoid the associated estimation error. Although the above mentioned nonadaptive algorithms [6; 7; 8] have lower computational complexity for the CFA, most of them perform color directional interpolation based on the estimated gradient. However, the gradient estimations of the methods may not be robust in texture areas and edges. Based on the directional linear minimum mean square-error estimation (DLMMSE) framework, [PERSON] and [PERSON] [9] proposed an adaptive algorithm to improve the problem. They assumed that the primary difference signals between G and R or G and B channels are low-pass. In both horizontal and vertical directions, the missing G pixel values are adaptively estimated by DLMMSE. Some demosaicking algorithms provide novel contributions such as square-on-point neighborhood and lattice variables [10]. In [10], a corrective term and localized polling were used to improve the performance of the reconstructed images. However, the corrective term is empirically derived. [PERSON] et al. [11] demonstrated that the input image is divided into two different area types and each type adopts different interpolation respectively. In edge areas, they recovered edge information with weights by using multidirectional components. The demosaicking algorithm has the advantages of region adaptation. [PERSON] and [PERSON] [12] detected edge characteristics by comparing color difference in horizontal and vertical directions.