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. RAO

DETARTMENT OF ELECTRICAL ENGINEERING

UNIVERSITY OF TEXAS AT ARLINGTON

Submitted By:

RAMSANJEEV THOTA(1001051651)

List of Acronyms:

CFAColor filter array

DCTDiscrete cosine transform

DWIDiffusion weighted images

EKI Edge keeping index

HARDI High angular resolution diffusion imaging

LPGLocal pixel grouping

LMSELeast mean square error

MADMinimum absolute difference

MPCMaximum matching pixel count

NLMNon local mean

MSEMean square error

ODF Orientation distribution function

PCA Principal component analysis

PSNRPeak signal to noise ratio

SSIMStructural similarity index metric

SSDSum of squares differences

SDStandard deviation

SVDSingular value decomposition

TVFTotal 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 bepractically proved with examples that the LPG-PCA method achieves very competitive denoising performance, especially in image structure preservation, compared with otherdenoising methods.

OVERVIEW OF LPG - PCA TECHNIQUE:

The proposed method that is ‘Two Stage Image denoising usingLPG 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 istransformed 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 usedin 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.

(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 than0.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 simplesliding 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, thatare 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 figure2 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)2two 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 = 41are 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 theproposedLPG-PCAdenoisingalgorithm,mostofthe computational costspendsonLPGgroupingandPCA transformation, andthusthecomplexitymainlydependsontwo parameters: the size G of thevariableblockandthe size H of trainingblock[19].In LPG grouping,itrequires(2G2-1).(H-G+1)2additions, G2.(H-G+1)2 multiplications and(H-G+1)2 ‘‘less than’’logic operations [19].Supposeinaverage S trainingsamplesareselected,i.e. the dataset XV is ofdimension G2 ×S. TheninthePCA transformation,itrequires G2.S+(S2-1).G4 +(G2-1).G2.S additions, G4.(S+S2) multiplications,andanSVDdecompositionofa G2×G2 covariancematrix [19].

In theimplementationofLPG-PCAdenoising,actually the complete G×G block centeredonthegivenpixelwillbedenoised. Therefore,thefinallyrestoredvalueatapixelcanbesetasthe averageofalltheestimatesobtainedbyallwindows 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