Inter Channel Correlation based Demosaicking Algorithm for Enhanced Bayer Color Filter Array

Demosaicking is a process of obtaining a full color image by interpolating the missing colors of an image captured from a digital still and video cameras that use a single-sensor array. In this study a new Color Filter Array (CFA) is proposed. Which is based on the actual weight of the Human Visual System. It is developed based on the sensitivity level of the human eye to red as 29.9%, green as 58.7% and blue as 11.4%. This study also provides an effective iterative demosaicing algorithm applying a weighted-edge interpolation to handle green pixels followed by a series of color difference interpolation to update red, blue and green pixels. Before applying demosaicking algorithm Gaussian filter is applied to remove noise of the sensor applied image and also enhance the image quality. Experimental results show that the proposed method performs much better than other latest demosaicing techniques in terms of image quality and PSNR value.


INTRODUCTION
Color Filter Array (CFA) is one of the most distinctive hardware elements in a single-sensor imaging pipeline (Parulski and Spaulding, 2002).The CFA is placed on top of the monochrome image sensor, usually a Charge-Coupled Device (CCD) (Dillon et al., 1978) or Complementary Metal Oxide Semiconductor (CMOS) (Lule et al., 2000) sensor, to acquire the lowresolution color information of the image scene.Each sensor cell has its own spectrally selective filter and thus, the acquired CFA data constitutes a mosaic-like monochrome image (Lukac and Plataniotis, 2005b).Since the information about the arrangement of the color filters in the CFA is known from the camera manufacturers or it can be obtained using the Tagged Image File Format for Electronic Photography (TIFF-EP), the grayscale CFA image can be re-arranged as a low-resolution color image.This is the initial operation in the demosaicking process (Lukac and Plataniotis, 2005a;Wu and Zhang, 2004;Jayachandran and Dhanasekeran, 2012;Gunturk et al., 2005) which uses the concept of spectral interpolation to estimate the missing color components and to produce a full-color image (Lukac and Plataniotis, 2005b).The arrangement of the color filters in the CFA varies depending on the manufacturer (Bayer, 1976;Parmar and Reeves, 2004).Consumer electronic devices, such as various digital still and video cameras, image-enabled mobile phones and wireless Personal Digital Assistants (PDAs) thus naturally differ on the employed demosaicking solution.Different cost and implementation constraints are expected for a camera which stores the image in the CFA format and uses a companion personal computer to demosaick the acquired image data, than for a camera which directly produces the demosaicked image.Other construction differences may result from the intended application (e.g., Consumer photography, surveillance, astronomy).Among the various suggested CFAs in Fig. 1, the Bayer CFA pattern (Fig. 1a) is the most prevalent one, where G pixels occupy half of all and R and B pixels share the others.A representation of a full-color image needs all the information from the three colors at each pixel location.As a result, the missing two colors on each pixel location have to be interpolated back to get a full-color image.The process of interpolating the missing colors is called as demosaicing or color interpolation whose main objective aims to reconstruct the missing colors as closely to the original ones as possible while keeping the computational complexity as low as possible.
A demosaicing algorithm can be either heuristic or non-heuristic.A heuristic approach does not try to solve a mathematically defined optimization problem while a non-heuristic approach does.Most existing demosaicing algorithms are heuristic algorithms.It can be found that a number of heuristic algorithms were developed based on the framework of the Adaptive  (Kakarala and Baharav, 2002), (c) vertical stripe HVS-based CFA (Lule et al., 2000), (d) vertical stripe CFA (Longère et al., 2002), (e) modified Bayer CFA (Longère et al., 2002); (f-g) pseudo-random CFA (Longère et al., 2002); (j) exiting HVS-based CFA (Longère et al., 2002) Color Plane Interpolation algorithm (ACPI) proposed in Chung and Chan (2006).In this study, based on the framework of ACPI, a new heuristic demosaicing algorithm is proposed.This algorithm uses the variance of pixel color differences to determine the interpolation direction for interpolating the missing green samples.Simulation results showed more noises in the border of the image, so the border of the image is enhanced using some adaptive techniques (Kakarala and Baharav, 2002;Longère et al., 2002).Now Simulation results show that the proposed algorithm is superior to the latest demosaicing algorithms in terms of increased PSNR value.

METHODOLOGY
Proposed CFA pattern: The design and performance characteristics of the CFA are essentially determined by the type of a color system and the arrangements of the color filters in the CFA.The visual effect of an RGB color image is based on the weight given to the RGB components.The Proposed pattern is based on the actual weight of the Human visual system as shown in Fig. 2. In proposed Pattern we have given more weightage to the green samples, red samples weightage is same to the Bayer CFA pattern but small weighted to the blue samples.The visual effect of an RGB color image is based on the weight given to the RGB components.It is estimated that the sensitivity level of human eye (Longère et al., 2002;Alleysson et al., 2005) to read as 29.9%, green as 58.7% and blue as 11.4%.According to the well known Bayer's pattern, the red gives 25%, green is given 50% and blue gives 25%.Which is not close to the actual weights?We propose here a pattern which is close to the actual weight.It is proposed to give 25% to red, 62.5% for green and 12.5% for blue.
The main contributions of our proposed technique are: The following Fig. 3 describes the proposed Method performance step by step.

Pre processing:
The mosaic image is subjected to a set of pre-processing steps so that the image gets transformed to be suitable for the further processing.The Pre-processing is used for loading the input color images to the MATLAB Environment and also it removes any kind of noise present in the input images.
Here we make use of two step pre-processing procedures in which first the input image is passed through a Gaussian filter to reduce the noise and get a better image.Passing the image through the Gaussian filter also enhances the image quality.
Gaussian filter: A Gaussian filter (Haddad and Akansu, 1991;Jayachandran and Dhanasekeran, 2013) is a filter whose impulse response is a Gaussian function.Gaussian filters are developed to avoid overshoot of step function input while reducing the rise and fall time.This character is very much linked to the fact that the Gaussian filter has the minimum possible group delay.In mathematical terms, a Gaussian filter changes the input signal by convolution with a Gaussian function; this change is also called the Weierstrass transform.The Gaussian function is nonzero for x ∈ [-∞, ∞] and would supposedly need an infinite window length.The filter function is supposed to be the kernel of an integral transform.The Gaussian kernel is continuous and is not discrete.The cut-off frequency of the filter can be taken as the ratio between the sample rate F s and the standard deviation σ: The 1D Gaussian filter is given by the equation: The impulse response of the 1D Gaussian Filter is given by: Here in the pre-processing step, the input image is passed through a Gaussian filter which results in reduction of noise in the input image and also results in obtaining an image fit for further processing.Passing the image through the Gaussian filter also enhances the image quality.

Proposed EDGE oriented demosaicking algorithm:
Based on the observations in Gunturk et al. (2002) and Hirakawa and Parks (2005), the proposed algorithm put its focus on how to effectively determine the interpolation direction for estimating a missing green component in edge regions and texture regions.In particular, variance of color differences is used in the proposed algorithm as a criterion to determine the interpolation direction for the green components.This proposed algorithm is shown in Fig. 4.

Interpolating missing green components:
The color image has three color plane Red plane, Green plane and Blue Plane The missing green plane is calculate first, the remaining color plane are calculated Based on green plane i.e., the algorithm first calculate the two different planes K R ≡ G -R and K B ≡ G -B.In each missing green samples is first calculated the weighted color difference value around the original pixel then to calculate the average of its neighboring color difference value.Here R, G, B is the original image pixel value, R , Ĝ, B ^ are interpolated pixel value.As shown in Fig. 5, to obtain the G i, j value at the R i, j pixel, first to calculate the weights (α) along the four adjacent direction as follows: Calculate The Four adjacent color difference is calculated as follows: where, r, g, b are missing components and R, G, B are original values.The weights are then assigned to the four adjacent color difference values Kx, as defined In Eq. ( 2), The estimating Kx (i,j) calculated as follows: Then the Missing Green pixel value in red CFA components is calculated as follows: Ĝ i,j = R i,j + Kx (i,j) Similarly The Green pixel value is calculated in Blue CFA components.

Interpolating missing red components at green CFA sample position:
After interpolating all missing green components of the image, the missing red and blue components at green CFA sampling positions are estimated.Figure 6a and b shows the two possible cases where a green CFA sample is located at the center of a 5×5 block.
As for the case in Fig. 5a, the missing components of the red are calculated as Follows: As for the case in Fig. 5b, the missing components of the Red are calculated as Follows: Interpolating blue components at red and green CFA sample positions: Finally, the missing blue components at the red and green sampling positions are interpolated using the proposed algorithm.The blue components can be calculated based on the changing ratio of Green components in the same position.The missing blue sample, b i,j , is interpolated by using the following algorithm: As for the case in Fig. 7, the missing components of the red are calculated as follows: col = i mod 4 row = j mod 2 B ^ i, j = B (i-col+1,j-row+1) ∆H i, j = Ĝ i, j -Ĝ (i-col+1,j-row+1) NWeightage = 1.0*∆H i,j / (Ĝ (i-col+1,j-row+1) ) B ^i, j = B ^i, j + NWeightage* B ^i, j Interpolating missing blue (red) components at red (blue) sampling positions: Finally, the missing blue (red) components at the red (blue) sampling positions are interpolated.The missing blue sample, b i,j is interpolated by: In a similar manner the missing red, r i,j is interpolated by:

SIMULATION RESULTS
Simulation was carried out to evaluate the performance of the proposed algorithm.The 12 digital   Table 1 shows the performance of various algorithms.The proposed algorithm provided the best performance among the evaluated algorithm.The proposed algorithm is developed based on the fact that the interpolation direction for each missing green sample is critical to the final demosaicing result.The following Fig. 9 and 10 shows the experimental results of exiting and our proposed method.

CONCLUSION
In this study, a new color filter array based on HVS and iterative edge based demosaicking algorithm with enhanced border and edge was presented.It makes use of the color difference variance of the pixels located along the horizontal axis and that along the vertical axis in a local region to estimate the interpolation direction for interpolating the missing green samples.The highperformance arises from the introduction of a weighted edge interpolation and the well designed stopping strategy.With them, the proposed algorithm has a good initial condition and can terminate iteration early.Simulation results show that the proposed algorithm is able to produce a subjectively and objectively better results as compared with a number of advanced algorithms.

Fig. 6 :
Fig. 6: Proposed CFA pattern having their centers at green CFA samples

Fig. 8 :
Fig. 8: Images used in the experiments (images are numbered from 1 to 12 in the order of left-to-right and top-to-bottom)