PCA Based CFA Denoising and Demosaicking For Digital Image
PCA Based CFA Denoising and Demosaicking For Digital Image
PCA Based CFA Denoising and Demosaicking For Digital Image
Vijay K.Patil
Head of Department
Department of Electronics & Telecommunication
D N Patel College of Engineering-Shahada
Abstract
Principal component analysis (PCA) is an orthogonal transformation that seeks the directions of maximum variance in the data and is
commonly used to reduce the dimensionality of the data. In image denoising, a compromise has to be found between noise reduction
and preserving significant image details. PCA is a statistical technique for simplifying a dataset by reducing datasets to lower
dimensions. It is a standard technique commonly used for data reduction in statistical pattern recognition and signal processing. This
paper proposes a denoising technique by using a new statistical approach, principal component analysis with spatial adaptive
technique This procedure is iterated second time to further improve the denoising performance, and the noise level is adaptively
adjusted in the second stage. Single-sensor digital color cameras use a process called color demosaicking to produce full color images
from the data captured by a color filter array (CFA). The quality of demosaicked images is degraded due to the sensor noise
introduced during the image acquisition process. The conventional solution to combating CFA sensor noise is demosaicking first,
followed by a separate denoising processing. This paper presents a principle component analysis (PCA) based spatiall-adaptive
denoising algorithm, which works directly on the CFA data using a supporting window to analyze the local image statistics. By
exploiting the spatial and spectral correlations existed in the CFA image, the proposed method can effectively suppress noise while
preserving color edges and details. Experiments using both simulated and real CFA images indicate that the proposed scheme
outperforms many existing approaches, including those sophisticated demosaicking and denoising schemes, in terms of both
objective measurement and visual evaluation.
Keywords: Adaptive Denoising, Bayer Pattern, Color Filter Array (CFA), Demosaicking, Principle Component Analysis
(PCA).
_________________________________________________________________________________________________________
I.
INTRODUCTION
In the time of embedded system, the digital cameras are one of the popular consumer electronic product. The personal digital
assistance (PDAs), mobile cell phones, iPods are embedded with the expansive digital cameras instead of film cameras for
capturing or recording of the activities of everyday life. The removing of noise or providing a correction of non-linearitys of sensor
of cameras non uniformities, adjusting the white balance and many more needs a significant processing for users viewable image
[3]. These cameras are generally uses a sensor with CFA (color Filter Array) which is a very important part of processing chain. Any
color image is consisting of three basic primary color R, G, B. the only one third or single color is to be measured at each pixel by
CFA and the remaining missing true color image is estimated by camera and this estimated process by the camera is known as
demosaking [1-5].
PCA is a statistical procedure that uses an orthogonal property to transform to convert a set of observations of possibly correlated
variables into a set of values of uncorrelated variables. The denoising phenomenon goal is to remove the noise while retaining the
maximum possible the important signal or image features. At the time of acquisition and transmission the images are often corrupted
by additive noise. The main aim of a denoising algorithm is to reduce the noise level, while preserving the image features. To achieve
a good performance in this respect, a denoising algorithm has to adapt to image discontinuities. Generally the quality of image can be
measured by the peak signal-to-noise ratio (PSNR). However, sometimes a denoised image with a high PSNR value does not have
satisfactory visual quality [12].
PCA is a pre-processing transformation technique that creates new images from the uncorrelated values of different images [13].
This is accomplished by a linear transformation of variables that corresponds to a rotation and translation of the original coordinate
system. PCA is used to find out principal components in accordance with maximum variance of a data matrix. Based on the principle
components a new technique, based on maximization of SNR was also proposed in [3]. The grouping procedure guarantees that only
the sample blocks with similar contents are used in the local statistics calculation for PCA transform estimation, so that the image
local features can be well preserved after coefficient shrinkage in the PCA domain to remove the noise. Experimental results shows
this method gives better performance, especially in image fine structure preservation, compared with general denoising algorithms
[4-9].
The sample matrics of x, Where xi^j,j=1,2.,n is the discrete sample of variable xi, i=1,2,m. th ith row of sample matrix x,
A. PROPOSED ALGORITHM
The proposed CFA denoising algorithm is summarized as follows.
(1) Estimate the noise standard deviations r ,g and b of the red, green and blue channels.
(2) Decompose the noisy CFA image I into Il and Ih.Apply the following denoising steps 3 and 4 to Ih.
(3) Set the sizes of variable block and training block. The noise co-variance matrix Cm can then be determined.
(4) 4. For each training block:
Perform the training sample selection procedure.
(1) Denote by X the selected training dataset.
(2) Calculate the co-variance matrix Cm ;
(3) Estimate the co-variance matrix of signal as : Cs = Cm - Cv .
(4) Factorize Cm =Fx*Ax*Ft and set the transformation matrix Px= Ft .;
(5) Transform the dataset to domain: Y = Px * X .;
(6) By resetting the last several rows of Y to zeros, reduce Y to (dimension reduction);
(7) Shrink each row of Yd as Ydi = Ci * Ydi.
(8) Transform back Yd to time domain as X = Px* Yd.;
(9) Reformat X to get the denoised CFA block.
End.
(5) Denote I by the denoised output of Idh, the final denoised image is Idi= Il+Idh.
The proposed denoising algorithm will use a local training block to estimate the transformation matrix. All the possible samples in
the training block are used in the calculation. However, sample structures may change within a block, especially if the block contains
object boundaries with smooth background. Involving such samples in the training may lead to much bias in the estimation of
transformation matrix and consequently reduce the denoising performance, e.g., generating many phantom artifacts.
To overcome the above two problems, we propose two preprocessing steps before applying the PCA-based denoising. First, we
decompose the noisy CFA image into two parts: the low-pass smooth image and the high-pass image. Denote by Iv the noisy CFA
image. We use a 2-D Gaussian low-pass filter
G(x,y) = 1/2s exp(-x2+y2/2s2) to smooth Iv.
Ivl= Iv*G .(1)
The high pass image is then obtained as
Ivh = Iv Ivl ..(2)
Assuming that n training samples are available for each element of x , the covariance matrix of x can be estimated using maximal
likelihood estimation (MLE).
Cx= E[( x-E[x] ) * (x-E[x])T] .(3)
With a suitable scale parameter s in the Gaussian filter, the low-pass image Ilv will be almost noiseless and most of the noise is
contained in the high-pass output Ivh, which also contains the image edge structures to be preserved. Since I vl is almost noiseless, we
do not make further processing on it. The proposed CFA denoising scheme will be applied to the high-pass image Ivh, where the noise
will be dominant in the smooth areas and they can then be better suppressed by LMMSE filtering in the PCA domain. Denote by I di
the denoised image of Ivh , the final denoised CFA image is obtained as Idi= Il+Idh. It can be validated that in a local window of I vh, the
All rights reserved by www.ijste.org
10
mean value of red, green or blue variable will be nearly zero for smooth areas. In some sense, the Gaussian smoothing operation can
be viewed as a procedure to better estimate the mean values of red, green and blue variables so that the noise residual in smooth areas
can be reduced effectively. Now lets focus on how to reduce the phantom artifacts around edge boundaries with smooth background.
As mentioned before, such artifacts are caused by the inappropriate training samples in the training block. Intuitively, one solution to
this problem is to select the similar blocks to the underlying variable block and use them only but not all the blocks for training. Such
a training sample selection procedure can better estimate the co-variance matrix of the variable block and, hence, lead to a more
accurate transformation matrix. Finally, image local edge structures can be better preserved by removing the phantom artifacts.
III. BACKGROUND OF CFA
The digital cameras uses a very precious part i.e., single sensor with a colour filter array (CFA) for capturing the visual scene in color
form as shown in fig.1.
As we have discussed in the last section the sensor cell can record only one colour value.The other two missingcolour components
at each position need to be interpolated from the available CFA sensor readings to reconstruct the full colour image. The colour
interpolation process is usually called colour demosaicing (CDM). There are many patterns out of which a CFA can have any pattern.
The most commonly used CFA pattern is Bayer pattern shown in fig. 2. A Bayer filter mosaic is a color filter array (CFA) for
arranging RGB color filters on a square grid of photo sensors. Its particular arrangement of color filters is used in most single-chip
digital image sensors used in digital cameras, camcorders, and scanners to create a color image. The filter pattern is 50% green, 25%
red and 25% blue, hence is also called RGBG, GRGB, or RGGB. The Bayer array measures the G image on a quincunx grid an the R
& B images on rectangular grids. The G image is measured at higher sampling rate because sensitivity of human eyelie in medium
wavelengths, corresponding to the G portion of the spectrum. There are number of applications where noise is present in the CFA.
The presence of noise in CFA data not only deteriorates the visual quality of captured images but also often cause serious demos
icing artifacts which can be extremely difficult to remove using a subsequent denoising process.
IV. METHODOLOGY FOR DENOISING
Many CDM algorithm [1]-[8] proposed in the past are based on unrealistic assumptions of noise free CFA data.To suppress the effect
ofnoise on the demosaicked image, three strategies are possible.
11
filtering exploits the similarity in both spatial and intensity spaces, this scheme can handle light noise corrupted in the CFA image.
Hirakawa and Parks [4] developed a joint demosaicking-denoising algorithm by using the total least square (TLS) technique where
both demosaicking and denoising are treated as an estimation problem with the estimates being produced from the available
neighboring pixels. The filter used for joint demosaicking-denoising is determined adaptively using the TLS technique under some
constraints of the CFA pattern. The joint demosaickingdenoising scheme developed by Zhang et al. [13] first performs
demosaicking-denoising on the green channel. The restored green channel is then used to estimate the noise statistics in order to
restore the red and blue channels. In implementing the algorithm, Zhang etal.estimated the redgreen and blue-green color difference
images rather than directly recovering the missing color samples by using a linear model of the color difference signals. Inspired by
the directional linear minimum mean square-error estimation (DLMMSE) based CDM scheme in proposed an effective nonlinear and
spatially adaptive filter by using local polynomial approximation to remove the demosaicking noise generated in the CDM process
and then adapted this scheme to noisy CFA inputs for joint demosaicking denoising.
B. Denoising after demosaicking:
A convenient strategy to remove noise is to denoise the demosaicked images. Algorithms developed for gray-scale imaging, for
example [12][15], can be applied to each channel of the demosaicked color image separately whereas some color image filtering
techniques [11] process color pixels as vectors. The problem of this strategy is that noisy sensor readings are roots of many color
artifacts in demosaicked images and those artifacts are difficult to remove by denoising the demosaicked full-color data. In general
the CFA readings corresponding to different color components have different noise statistics. The CDM process blends the noise
contributions across channels, thus producing compoundnoise that is difficult to characterize. This makes the design of denoising
algorithms for single-sensor color imaging very difficult as demonstrated below.
12
V. DEMOSAICKING
A representation of a full color image requires all the primary colors red, green, and blue at each pixel location. The output image of
SSAC is monochromatic mosaic image, which consists of any one of the three primary color component values at each pixel
location. As a result, the missing two other colors at each pixel location have to be interpolated to get a full color image The process
of interpolating the missing colors is called as demosaicing or CFA interpolation. The aim of demosaicing is to reconstruct the
missing colors as close as possible by keeping the computational complexity very low. Color CFA interpolation process to
reconstruct the full RGB images collected from a single- sensor digital camera images. The single - sensor camera of the color
information of the image obtained through the color filter array (CFA) , but the collected images at each pixel location only one of
the original color component , in order to recover the other two components to obtain a full-color image , it must be interpolated this
process is also called color demosaicking .
In Single-sensor digital camera, a mosaic image with any one of the primary color component is resulted because of the color filter
array. A representation of a full color image requires reconstruction of the other two primary colors at each pixel location. A
demosaicing algorithm is a digital image process used to reproduce the complete color image from the partial color image data
received from a SSAC. The SSDCI consists of any one color component value at each pixel location. The missing other two color
information at each pixel location in the SSDCI is interpolated (Demosaicing) from the adjacent pixels as close as possible by
keeping the computational complexity very low. The demosaicing algorithms can be classified as adaptive and non-adaptive
algorithms.
Non-adaptive Demosaicing
Non-adaptive algorithms perform interpolation in a fixed pattern for every pixel i.e. by averaging neighboring pixels
indiscriminately. This causes an artifact, the zipper effect in the interpolated image. Nearest Neighborhood Interpolation, Bilinear
Interpolation, Smooth Hue Transition, Median Based Interpolation are examples of non adaptive algorithm.
D. Adaptive Demosaicing
Adaptive algorithms use both spectral and spatial features present in the pixel neighborhood, to interpolate the missed pixel as close
to the original as possible. Like other color image processing problems, modeling the correlation among three color channels (planes)
plays the critical role in demosaicing. All color channels have very similar characteristics such as texture and edge location. Ignoring
such inter-plane dependency (e.g., straightforward intra-plane linear interpolation) often renders the demosaiced image suffering
from annoying artifacts caused by incorrect interpolation. To restore more accurate and visually pleasing results, many sophisticated
demosaicing methods have been proposed by exploiting image spatial or spectral correlation, or both. Various techniques have been
proposed to obtain a more faithful and higher quality reproduction of color images by exploiting the inter-plane correlation. The
grand challenge is to find the best tradeoff between image quality and computational cost.
VI. EXPERIMENT RESULTS
We performed simulations in an attempt to confirm the theoretical results above. 512768 image is taken to examine the result. We
examine the signal-noise ratio (SNR) The SNR is defined as:
SNR 10log (Ps / Pn ) (dB)
All rights reserved by www.ijste.org
13
(a)
(b)
(c)
(d)
(e)
Fig.2 Cropped images of the re constructed fence image. (a) Original image; (b) CFA noisy image (c) CFA noiseless image (d)
PCA based denoised image (e) is reconstructed by the proposed PCA-based CFA denoising method followed by demosaicking.
PSNR result of the reconstructed FENCE Images by r= 13 b= 10 g=12
All rights reserved by www.ijste.org
14
Fig. 3: Cropped Images of The Re Constructed Fence Image. (A) Original Image; (B) CFA Noisy Image (C) CFA Noiseless Image (D) PCA Based
Denoised Image (E) Is Reconstructed By The Proposed PCA-Based CFA Denoising Method Followed By Demosaicking.
(a)
(b)
15
(C)
(D)
(e)
Fig. 4: Cropped Images Of The Re Constructed Flower Image. (A) Original Image; (B) CFA Noisy Image (C) CFA Noiseless Image (D) PCA
Based Denoised Image (E) Is Reconstructed By The Proposed PCA-Based CFA Denoising Method Followed By Demosaicking.
Table - I.
PSNR (dB) Results of The Reconstructed Fence Images By Different Demosaicking and Denoising Methods.
PSNR RESULT(dB)
Demosaicking Method
DenoisingMethod
R
[5]
28.0
30.3
28.8
28.4
30.3
28.6
[6]
28.1
30.6
28.3
27.9
30.6
28.6
[5]
30.5
31.3
30.8
30.3
31.3
31.2
[6]
30.5
31.3
30.9
30.3
31.3
31.2
[5]
29.9
30.7
30.1
29.7
30.7
30.3
[6]
30.2
31.1
30.6
30
31.2
30.9
[5]
30.4
31.5
30.7
30.2
31.5
31.1
[6]
30.4
31.5
31.0
30.2
31.6
31.3
27.1
28.6
28.2
27.1
28.8
28.5
30.7
31.5
31.2
30.5
31.6
31.5
29.6
31.4
30.2
29.5
31.4
30.3
30.90
31.6
31.6
30.8
31.7
31.6
30.8
31.5
31.4
30.7
31.5
31.5
30.7
31.5
31.5
30.7
31.6
31.7
[1]
[2]
[3]
[4]
16
Table - II
PSNR (dB) Results of The Reconstructed FLOWER Images By Different Demosaicking And Denoising Methods.
PSNR Result(DB)
Demosaicking Method
Denoising Method
R
G
B
[2]
[6]
32.1
33.1
32.9
[3]
[6]
32.8
33.20
32.4
[4]
[6]
32.1
33.6
32.88
30.16
31.13
30.15
31.45
29.67
31.81
Joint Demosaicking-Denoising[7]
PCA Based CFA Denoising +Demosaicking
VII. CONCLUSION
In this paper an efficient ways new method of removing the noises in the CFA data by providing the joint denoising and
demoiscking. The complete information of noise produced in the Bayer filter has been explained. The new proposed method of joint
denoising demoiscking is also a better option and efficient option for the color improvement which is proposed in this paper. This
proposed method is also a better option in the field of image processing.
Performance of denoising algorithms is measured using quantitative performance measures such signal-to-noise ratio(SNR) as
well as in terms of visual quality of the images. In reality, this assumption may not always hold true due to the varied nature and
sources of noise. An ideal denoising procedure requires a priori knowledge of the noise, whereas a practical procedure may not have
the required information about the variance of the noise or the noise variance of the noise and the noise model to compare the
performance with different algorithms. Noise with different variance values is added in the natural images to test the performance of
the algorithm. The performance of different denoising methods can be evaluated by using signal-to-noise ratio (SNR) with respect to
the original images. The PCA based CFA denoising method achieves highest SNR values. While suppressing noise, the proposed
scheme preserves very well the fine structures in the image, which are often smoothed by other denoising schemes and the result of
colour demosaicing in terms of red, green, blue are analyzed.
REFERENCES
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
17
18