Upload
doanhuong
View
215
Download
3
Embed Size (px)
Citation preview
EE 5359
TOPICS IN SIGNAL PROCESSING
PROJECT REPORT
TWO STAGE IMAGE DENOISING USING LOCAL PIXEL GROUPING WITH PRINCIPAL COMPONENT
ANALYSIS
Under the guidance of
DR. K. R. RAODETARTMENT OF ELECTRICAL ENGINEERING
UNIVERSITY OF TEXAS AT ARLINGTON
Submitted By:
RAMSANJEEV THOTA(1001051651)[email protected]
List of Acronyms:
CFA Color filter array
DCT Discrete cosine transform
DWI Diffusion weighted images
EKI Edge keeping index
HARDI High angular resolution diffusion imaging
LPG Local pixel grouping
LMSE Least mean square error
MAD Minimum absolute difference
MPC Maximum matching pixel count
NLM Non local mean
MSE Mean square error
ODF Orientation distribution function
PCA Principal component analysis
PSNR Peak signal to noise ratio
SSIM Structural similarity index metric
SSD Sum of squares differences
SD Standard deviation
SVD Singular value decomposition
TVF Total variation filter
ABSTRACT:
An efficient scheme with principal component analysis (PCA) using local pixel grouping
(LPG) is proposed for denoising images [19]. For a better preservation of image local structures,
a pixel and its nearest neighbors are modeled as a vector variable, whose training samples are
selected from the local window by using block matching based local pixel grouping (LPG). LPG
makes sure 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. The LPG-PCA denoising
procedure is iterated one more time to further improve the denoising performance, and the
noise level is adaptively adjusted in the second stage. It will be practically proved with examples
that the LPG-PCA method achieves very competitive denoising performance, especially in image
structure preservation, compared with other denoising methods.
OVERVIEW OF LPG - PCA TECHNIQUE:
The proposed method that is ‘Two Stage Image denoising using LPG with PCA’ which is shown
in the figure 1 is a novel approach towards image denoising [19]. PCA is the statistical technique
and depends mostly on the mathematical analysis of the signal such as calculating the
eigenvalues and eigenvectors for the covariance matrix and diagonalizing the covariance
matrix . The pixels of an image are grouped into a vector by using the block matching method,
where the LMSE operator is applied to each and every pixel in the image and compared with
that of the central pixel. Only those pixels which give the result similar to that of the central
pixel are considered and grouped into a vector on which the PCA transformation is applied.
Once the image is transformed using PCA, the inverse PCA transform will be applied to obtain
the denoised version of the image. The same process is repeated to further denoise the image
so as to remove any noise residual present in the image. The test images which have gone
through both the stages of LPG-PCA algorithm are displayed in figure 3. MATLAB is the tool
used in this project to simulate this technique [12].
TYPES OF NOISE: [23]
Noise actually is undesired information that reduces the quality of the image. For the image
denoising process, knowing the type of noise and information about that noise present in the
original image plays a significant role.
Noise is present in an image in two forms [23]
1. Additive noise
2. Multiplicative noise
An additive noise follows the rule
w(x, y) = s(x, y) + n(x, y) (2.1)
while the multiplicative noise satisfies
w(x, y) = s(x, y)×n(x, y) (2.2)
where s(x, y) is the original signal, n(x, y) denotes the noise introduced into the signal to
produce the corrupted image w(x, y). (x, y) represents the pixel location. Additive noise finds its
applications in image morphing [23].
The various types of noise are discussed below,
1. Gaussian Noise: [23]
In this case each pixel in the noisy image is the sum of the true pixel value and a random
Gaussian distributed noise value. Hence Gaussian noise is evenly distributed over the signal.
f (g )=¿¿ (1.1)
f(g) in the equation (1.1) represents the probability density function of the Gaussian
random variable. In the equation (1.1), m represents the mean, σ represents the standard
deviation respectively.
2. Salt and Pepper Noise: [23]
Salt and pepper noise is an impulse type of noise, which is also referred to as intensity spikes.
This is caused generally due to errors in data transmission. It has only two possible values a and
b. The probability of each is typically less than 0.1. The corrupted pixels are set alternatively to
the minimum or to the maximum value, giving the image a “salt and pepper” like appearance.
The salt and pepper noise is generally caused by malfunctioning of pixel elements in the camera
sensors, fault memory locations, or timing errors in the digitization process.
3. Speckle Noise [23]
Speckle noise is a multiplicative noise. This type of noise occurs in almost all coherent imaging
systems such as laser, acoustics and Synthetic Aperture Radar imagery. Fully developed speckle
noise has the characteristic of multiplicative noise.
4. Brownian Noise: [23]
Brownian noise comes under the category of fractal or 1/f noises. The mathematical model for
1/f noise is fractional Brownian motion. Fractal Brownian motion is a non-stationary stochastic
process that follows a normal distribution. Brownian noise is a special case of 1/f noise. It is
obtained by integrating white noise.
5. Quantum Noise: [23]
In all imaging procedures using x-ray or gamma photons, most of the image noise is produced
by the random manner in which the photons are distributed within the image. This is generally
called as “Quantum Noise”. It is the quantum structure of an x-ray beam that creates quantum
noise. Quantum noise is inversely proportional to the square root of the exposure to the
receptor. Quantum noise is sometimes more significant in intensified radiography done with
fluoroscopic systems (both video and spot films) than in screen-film radiography because of
generally higher receptor sensitivity values (i.e., lower receptor exposures).
6. Electronic Noise: [23]
Video images often contain noise that comes from various electronic sources. Video (TV) image
noise is often referred to as snow. Some of the electronic components that make up a video
system can be sources of electronic noise. The noise is in the form of random electrical currents
often produced by thermal activity within the device. The presence of noise in a video system
becomes especially noticeable when the image signal is weak. Most video receivers have an
automatic gain (amplification) circuit that increases the amount of amplification in the presence
of a weak signal. This amplifies the noise and causes it to become quite apparent within the
image. This effect can be easily observed by tuning a TV (video) receiver to a vacant channel or
a channel with a weak signal.
Each type of noise studied above has its own characteristics. Hence study of each type of noise
helps to find out which type of noise is present in the image, thereby according to the type of
noise in the image, various techniques for denoising the image can be implemented on the
image for the removal of noise in the image. Hence the study of types of noises is of a great
importance in denoising an image.
IMAGE DENOISING TECHNIQUES: [26]
Various image denoising or image restoration techniques had been proposed for denoising an
image.
Linear and Non-Linear Filtering: [26]
Filters play a major role in the image restoration process [26]. Linear filtering uses mean filter
and Least Mean Square (LMS) adaptive filter and Non-linear filtering is based on median filter
[26]. The basic concept behind image restoration using linear filters is digital convolution and
moving window principle. [26]
Mean filter: [26]
A mean filter acts on an image by smoothing it, that is, it reduces the intensity variation
between adjacent pixels [26]. The mean filter is nothing but a simple sliding window spatial
filter that replaces the centre value in the window with the average of all the neighbouring pixel
values including itself. By doing this, it replaces pixels, that are unrepresentative of their
surroundings. [26]
LMS Adaptive filters: [26]
An adaptive filter does a better job of denoising images compared to the averaging filter.
Adaptive filters are capable of denoising non-stationary images i.e. the images that have abrupt
changes in intensity [26]. Compared to other adaptive filters, the Least Mean Square (LMS)
adaptive filter is known for its simplicity in computation and implementation. The basic model
is a linear combination of a stationary low-pass image and a non-stationary high-pass
component through a weighting function. Thus, the function provides a compromise between
resolution of genuine features and suppression of noise.
Median Filter: [26]
A median filter belongs to the class of nonlinear filters unlike the mean filter. The median filter
also follows the moving window principle similar to the mean filter. A 3×3, 5×5, or 7×7 kernel of
pixels is scanned over pixel matrix of the entire image. The median of the pixel values in the
window is computed, and the centre pixel of the window is replaced with the computed
median. Median filtering is done by first sorting all the pixel values from the surrounding
neighborhood into numerical order and then replacing the pixel being considered with the
middle pixel value.
LPG – PCA algorithm for denoising is shown in figure 1.
LPG PCA TECHNIQUE [19]
Figure 1:LPG-PCA Algorithm
LOCAL PIXEL GROUPING (LPG):
Grouping the training samples similar to the central GxG block in the HxH training window as
shown in the figure 2 is indeed a classification problem and thus different grouping methods
such as block matching [19], K-means clustering [21] can be employed.
Block matching will be used in this project as it is simplest and efficient [19]. H x H training block
is selected and various pixels which are to be denoised are grouped into G x G test vectors from
the H x H training vector sample.
Block matching method: [19]
The training block and variable block for block matching method is shown in figure 2
Figure 2: the way in which pixels are grouped to form a training block and the variable block in block matching technique
PRINCIPAL COMPONENT ANAYSIS (PCA):
PCA is a useful statistical technique that has found application in fields such as face recognition and image compression [18], and is a common technique for finding patterns in data of high dimension.
The Algorithm of Principal Component Analysis (PCA) technique: [18]
1. Getting data from the block matching technique.
2. Calculate mean for each test vector and subtract the mean from each pixel of that test vector.
3. Calculation of the covariance matrix.
4. Calculation of the eigenvectors and eigenvalues of the covariance matrix.
5. Choosing components and forming a feature vector.
6. Deriving the new data set.
7. Getting the old data back.
Singular value decomposition or eigenvalue decomposition will be used in the project to obtain the denoised image.
Performance Evaluation Metrics:[2], [20]
The PSNR and SSIM are used to evaluate the performance of the method for various images.
PSNR can measure intensity difference between two images but it may fail to describe the visual perception quality of the image.
SSIM is used for image visual quality assessment.
MSE is defined as [22]
(1.2)
PSNR is defined as [22]
(1.3)
Where x is the original image and y is the distorted image. M and N are the width and height of an image. L is the dynamic range of the pixel values.
Equation (1.2) defines the mean square error and equation (1.3) defines peak signal to noise ratio.
If MSE is small enough, it corresponds to a high quality decompressed image.[22]
Structural similarity index metric:[22]
SSIM is defined as
(1.4)
the average of ;
the average of ;
the variance of ;
the variance of ;
the covariance of and ;
c1=(k1H)2, c2=(k2H)2 two variables to stabilize the division with weak denominator;
the dynamic range of the pixel values (typically this is );
and by default.
The SSIM is designed to improve on traditional metrics like PSNR and MSE, which have proved to be inconsistant with human eye perception. [19]
It is a method for measuring the similarity between two images.
SSIM can reflect the structural similarity between the target image and the reference image. [19]
Step by Step simulation in MATLAB:
Step 1: Obtain the noisy image by adding the white additive Gaussian noise corrupted version
of the image, with zero mean and variance 20, to the original image.
Step 2: Output the original and noisy images by using the MATLAB function figure ( ).
Step 3: Training block of size H=5 and the variable block of size G = 41 are defined and the local
pixel grouping is carried out. Separate function module is written for this Local Pixel Grouping.
Each and every sample vector is tested in each and every possible block using ‘for’ loops in
MATLAB.
Step 4: For every training vector obtained PCA transforms is obtained. The whole process of
PCA transform is coded by using simple MATLAB functions, using arithmetic operators.
Step 5: The processed image is then evaluated for its performance through two tools in
separate modules in MATLAB. The process for calculating the PSNR follows the equation 1.3
and SSIM follows the equation 1.4 respectively.
Step 6: The processed image is then output by using the function figure ( ).
Step 7: For the second stage of refinement, the variance is slightly adjusted as 20*0.36 and the
whole code from step 3 to step 6 is again followed in MATLAB.
Step 8: Finally, the denoised image after the second stage of refinement is output by using figure ( ) MATLAB function.
RESULTS:
In the proposed LPG-PCA denoising algorithm, most of the computational cost spends on LPG
grouping and PCA transformation, and thus the complexity mainly depends on two parameters:
the size G of the variable block and the size H of training block [19]. In LPG grouping, it
requires (2G2-1).(H-G+1)2 additions, G2.(H-G+1)2 multiplications and(H-G+1)2 ‘‘less than ’’
logic operations [19]. Suppose in average S training samples are selected, i.e. the dataset XV is of
dimension G2 × S. Then in the PCA transformation, it requires G2.S+(S2-1). G4 +(G2-1).G2.S
additions, G4.(S+S2) multiplications, and an SVD decomposition of a G2×G2 covariance matrix
[19].
In the implementation of LPG-PCA denoising, actually the complete G×G block centered on the
given pixel will be denoised. Therefore, the finally restored value at a pixel can be set as the
average of all the estimates obtained by all windows containing the pixel.
Although PSNR can measure the intensity difference between two images, it is well-known that
it may fail to describe the visual perception quality of the image. The SSIM index is one of the
most commonly used measures for image visual quality assessment. Compared with PSNR,
SSIM can better reflect the structure similarity between the target image and the reference image.
The table 1.1 presents the PSNR and SSIM index values obtained through proposed method for
the test images considered, for the value of standard deviation as 20. The performance metrics
are measured after the first and second stages, which are presented in the table 1.1, in order to get
the clarity about what actually happens in both the stages and why is the second stage of
refinement required.
Table 1.1. Performance tools measured in the first stage and second stage.
Images Cameraman House
PSNR(dB) SSIM PSNR(dB) SSIM
First Stage:
σ = 10
33.9 0.9261 35.4 0.9003
Second Stage:
σ = 10
34.1 0.9356 35.6 0.9012
First Stage:
σ = 20
29.8 0.8320 31.8 0.8084
Second Stage:
σ = 20
30.1 0.8902 32.5 0.8471
The proposed method simulated in MATLAB on the cameraman and house test images yielded
the results as shown in figures 3.1 and 3.2 respectively.
a) b)
c) d)
figure 3.1: a) Original House image b) Noise corrupted House image c) Denoised House
image after first stage of proposed method d) Denoised House image after the second stage
of refinement.
a) b)
c) d)
Figure 3.2: a) Original cameraman image, b) Noise corrupted image, c) Denoised image after
first stage of proposed method, proposed method and (d) Denoised image after the second
stage of the proposed method.
Comparision of LPG – PCA method with Image denoising using scale mixtures of Gaussians in
the wavelet domain [25]
a) b)
c)
Figure 4.1 : a) Original noiseless image b) Denoised image using scale mixtures of guassians in the wavelet domain [25] c) Denoised image by the proposed two stage LPG – PCA method
Table 1.2. The PSNR (dB) and SSIM results of the denoised images of the girl in figure 4.1 by scale mixtures of Gaussians in the wavelet domain and two stage LPG – PCA schemes
Methods Image denoising using scale mixtures of Gaussians in the wavelet domain[25]
Image denoising using two stage LPG - PCA method
σ = 10
PSNR(dB) SSIM PSNR(dB) SSIM
33.2 0.9160 33.7 0.9243
σ = 20 29.4 0.8514 29.7 0.8605
a) b)
c)
Figure 4.2 : a) Original noiseless image b) Denoised image using scale mixtures of guassians in the wavelet domain[25] c) Denoised image by the proposed two stage LPG – PCA method
Table 1.3. The PSNR (dB) and SSIM results of the denoised images in figure 4.2 by scale mixtures of Gaussians in the wavelet domain[25] and two stage LPG – PCA schemes
Methods Image denoising using scale mixtures of Gaussians in the wavelet domain[25]
Image denoising using two stage LPG - PCA method
σ = 10
PSNR(dB) SSIM PSNR(dB) SSIM
33.6 0.9527 34.2 0.9594
σ = 20 29.5 0.9076 30.0 0.9202
a) b)
c)
Figure 4.3 : a) Original noiseless image b) Denoised image using scale mixtures of guassians in the wavelet domain[25] c) Denoised image by the proposed two stage LPG – PCA method
Table 1.4. The PSNR (dB) and SSIM results of the denoised images in figure 4.3 by scale mixtures of Gaussians in the wavelet domain[25] and two stage LPG – PCA schemes
Methods Image denoising using scale mixtures of Gaussians in the wavelet domain[25]
Image denoising using two stage LPG - PCA method
σ = 10
PSNR(dB) SSIM PSNR(dB) SSIM
33.3 0.8901 33.3 0.8909
σ = 20 30.1 0.8381 30.1 0.8413
a) b)
c)
Figure 4.4 : a) Original noiseless image b) Denoised image using scale mixtures of guassians in the wavelet domain[25] c) Denoised image by the proposed two stage LPG – PCA method
Table 1.5. The PSNR (dB) and SSIM results of the denoised images in figure 4.4 by scale mixtures of Gaussians in the wavelet domain[25] and two stage LPG – PCA schemes
Methods Image denoising using scale mixtures of Gaussians in the wavelet domain[25]
Image denoising using two stage LPG - PCA method
σ = 10
PSNR(dB) SSIM PSNR(dB) SSIM
31.6 0.9246 32.5 0.9378
σ = 20 27.2 0.8316 28.5 0.8716
The test images which are denoised by two stage LPG – PCA method are compared with Image denoising using scale mixtures of guassians in the wavelet domain in the figures 4.1, 4.2, 4.3 and 4.4.
The comparision of the methods, two stage LPG – PCA method and Image denoising using scale mixtures of guassians in the wavelet domain, using PSNR (dB) and SSIM are shown in tables 1.2, 1.3, 1.4 and 1.5
REFERENCES
[1] J. Karhunen, L. Wang and R. Vigario,” Nonlinear PCA type approaches for source separation and independent component analysis”, in proceedings of the IEEE international conference on neural networks, vol. 2, pp 995-1000, November 1995
[2] Z. Wang, A. C. Bovik, H. R. Sheikh and E. P Simoncelli, “Image quality assessment: from error visibility to structural similarity”, IEEE Transactions on Image processing, vol. 13, issue 4, pp 600 – 612, April 2004.
[3]L. Bihan and N.Sangwine, “Quaternion principal component analysis of color images”, in proceedings of the IEEE international conference on Image processing, vol. 1, pp 809 – 812, September 2003
[4] J.S. Taur and C. W. Tao, “Medical image compression using principal component analysis”, in proceedings of the IEEE international conference on Image processing, vol. 2, pp 903 – 906, September 1996.
[5] S. G. Chang, Y.Bin and M. Vetterli, “ Spatially adaptive wavelet thresholding with context modeling for image denoising”, in proceedings of the IEEE international conference on Image processing, vol. 1, pp 535 – 539, October 1998.
[6] J. Portilla, V. Strela, M.J. Wainwright and E.P. Simoncelli, “Image denoising using scale mixtures of Gaussians in the wavelet domain”, IEEE Transactions on Image Processing, vol. 12, issue 11, pp 1338–1351, November 2003.
[7]D.D. Muresan and T.W. Parks, “Adaptive principal components and image denoising” , in proceedings of the IEEE international conference on Image Processing, vol. 1, pp 14–17,September 2003.
[8] A. Pizurica and W. Philips, “Estimating the probability of the presence of a signal of interest in multi resolution single and multiband image denoising”, IEEE Transactions on Image Processing, vol. 15, issue 3, pp 654–665, March 2006.
[9]A. Buades, B. Coll, and J. Morel, “A non-local algorithm for image denoising” , in IEEE Computer Society Conference on Computer Vision and Pattern Recognition, vol. 2, pp 60–65, June 2005. Available: http://bengal.missouri.edu/~kes25c/nl2.pdf
[10]L. Zhang, X. Wu, and D. Zhang, “Color reproduction from noisy CFA data of single sensor digital cameras,” IEEE Transactions on Image processing, vol. 16, issue 9, pp 2184–2197, September 2007.
[11]K. Hirakawa and T. Parks, “Joint demosaicing and denoising”, IEEE Transactions on Image Processing, vol. 15, issue 8, pp 2146–2157, August 2006.
[12] L. Xin and M. T. Orchard, “Spatially adaptive image denoising under over complete expansion”, in proceedings of the IEEE international conference on Image processing, vol. 3, pp 300 – 303, September 2000.
[13] C. Kervrann and J. Boulanger, “Optimal spatial adaptation for patch based image denoising”, IEEE Transactions on Image Processing, vol. 15, issue 10, pp 2866–2878, October 2006.
[14] D. Zhang, P. Bao and W. Xiaolin, “Multiscale LMSE – based image denoising with optimal wavelet selection”, IEEE Transactions on Circuits and Systems for video technology, vol. 15, issue 4, pp 469 – 481, April 2005.
[15] M. Aharon, M. Elad and A.M. Bruckstein, “The K-SVD: an algorithm for designing of over complete dictionaries for sparse representation”, IEEE Transactions on Signal Processing, vol. 54, issue 11, pp 4311–4322, November 2006
[16] R.C. Gonzalez and R.E. Woods, “Digital Image Processing”, second edition, Prentice- Hall, Englewood Cliffs, NJ, 2008
[17] D. L. Donoho, “Denoising by soft thresholding”, IEEE Transactions on Information Theory, vol. 41, issue 3, pp 613 – 627, May 1995.
[18] L. I. Smith, “A tutorial on Principal Components Analysis”, February2002.
Available: http://www.iro.umontreal.ca/~pift6080/H09/documents/papers/pca_tutorial.pdf
[19] L. Zhang, W. Dong and D. Zhang, “The two stage image denoising by principal component analysis with local pixel grouping”, 2010.
Available: http://www4.comp.polyu.edu.hk/~cslzhang/paper/PR_10_x_3.pdf
[20] A. Rajwade, A. Rangarajan and A. Banerjee, “Image denoising using the higher order singular value decomposition”, IEEE Transactions on pattern analysis and machine intelligence, vol. 35, issue 4, pp 849 – 862, June 2012.
Available: www.ijetae.com/files/Volume2Issue6/IJETAE_0612_52.pdf
[21] S. N. Sulaiman and N. A. M. Isa, “Adaptive fuzzy k means clustering algorithm for image segmentation”, IEEE Transactions on consumer electronics, vol. 56, issue 4, pp 2661 - 2668, November 2010.
[22] A. M. Eskicioglu and P. S. Fisher, “Image quality measure and their performance”, IEEE Transactions on communications, vol. 43, issue 12, pp 2959 – 2965, December 1995.
[23] R. Verma and J. Ali, " A comparative study of various types of image noise and efficient noise removal techniques", International journal of advanced research in computer science and software engineering, vol. 3, issue 10, pp 617 - 622, October 2013.
[24] A. Pizurica, W. Philips and M. Acheroy, “A wavelet based image denoising using spatial priors”, in proceedings of the IEEE international conference on image processing, vol. 3, pp 296 – 299, September 2000.
[25] J. Portilla, V. Strela, M. J. Wainwright and E. P. Simoncelli, “Image denoising using scale mixtures of Gaussians in the wavelet domain”, IEEE Transactions on Image Processing, vol. 12, issue 11, pp 1338 – 1551, November 2003.
[26] H. M. Naimi, E. N. Nejad and H. Hassanpour, “New diffusion based image denoising techniques; Evaluations and comparisons”, in proceedings of IEEE international conference on image processing, vol. 1, pp 1 – 5, April 2007.