ECEN 670 MINI-CONFERENCE PROJECT BRANDON CARROLL LAITH SAHAWNEH ECEN 670 CLASS STOCHASTIC PROCESSES Stochastic Image Denoising using Minimum Mean Squared Error (Wiener) Filtering 05/07/2022 1 BYU-ECE Department
Feb 11, 2016
ECEN 670 MINI-CONFERENCE PROJECT
BRANDON CARROLLLAITH SAHAWNEH
ECEN 670 CLASSSTOCHASTIC PROCESSES
Stochastic Image Denoising using Minimum Mean
Squared Error (Wiener) Filtering
04/22/2023
1
BYU-ECE Department
Outline
IntroductionTheory: Wiener Filter DerivationResults & AnalysisConclusion
04/22/2023
2
BYU-ECE Department
04/22/2023BYU-ECE Department
3
Introduction
o A digital image is generally encoded as a matrix of gray-level or color values.o An image may be defined as a two-dimensional function, x[u,v], where u, v
are spatial (plane) coordinates.o In the case of color images, x[u,v] is a triplet of values for the red, green, and
blue components
Digital Images (Very brief introduction):
04/22/2023
4
Example: This is how images represented in computer
Color Images
Introduction
BYU-ECE Department
04/22/2023BYU-ECE Department
5
1. Image denoising is one of the fundamental challenges in the field of image processing.
2. Employed using variety of configurations in a wide variety of applications: namely: Object recognition, photo enhancement, and image restoration.
3. The objective of image restoration is to improve a given image in some predefined sense. Image restoration attempts to reconstruct or recover a degraded image by using a priori knowledge of the degradation phenomenon.
Introduction
Image Denoising and Restoration:
04/22/2023BYU-ECE Department
6
Introduction
o The purpose of image restoration is to restore a degraded/distorted image to its original content and quality.
o Image restoration assumes a degradation model that is known or can be estimated.
],[],[],[],[),(),(),(],[
vvvv ffNffHffXffYvunvuhvuxvuy
uuuu
Linear, space-invariant degradation model: Apply the inverse process to recover the original image ??
Degradation Function h ∑
Restoration Filter (Wiener
Filter)
y(u, v)x(u, v) x(u, v)
Degradation Process with additive noise Denoising and Restoration Process
Noise n(u, v)
04/22/2023
7
Introduction
BYU-ECE Department
hfg ,
What h will give us g = f ?Dirac Delta Function (Unit Impulse)
x2
1
0
Convolution Kernel – Impulse Response
Point spread function (PSF) :
f gh
04/22/2023
8
BYU-ECE Department
Introduction
OpticalSystemscene image
• An ideal optical system that does not degrade the image at all would have a Dirac delta function as its PSF
x xPSFOpticalSystem
point source point spread function
• However, optical systems are never ideal.
Point spread function (PSF) :
• The PSF is the response of the system to a Dirac delta function input.
04/22/2023
9
Introduction
BYU-ECE Department
Point spread function (PSF) : The impulse is a point (or pixel) of light The impulse response is commonly referred to as the
PSF
),( vuH
Impulse of Light Image (degraded) impulse
04/22/2023BYU-ECE Department
10
Introduction
Noise modelso Most types of noise are modeled as probability density
functions (PDFs)o Noise model is decided based on understanding of the
physics of the sources of noise. Gaussian: poor illumination Rayleigh: range image Gamma, exp: laser imaging Impulse: faulty switch during imaging, Uniform: quantization.
o Parameters can be estimated based on histogram on small flat area of an image.
De-noising o Spatial filtering (Mean filters, Median, Max, Min …)o Frequency domain filtering ( Inverse Filter, Wiener Filter,
…)
04/22/2023
11
BYU-ECE Department
Introduction
Estimation of noise parameters:
1. Gaussian Noise
2. Uniform Noise
3. Impulse (Salt& Pepper) Noise
04/22/2023
12
Introduction
BYU-ECE Department
o The parameters of noise in the spatial domain may be known from the sensors specification or a priori-knowledge of noise distribution.
o In most cases it is necessary to estimate these parameters to specify the corresponding noise PDF from sample images being denoised.
Estimation of noise parameters:
How to estimate the noise parameters?1. The common approach is to select a region of interest (ROI) in an
image with as featureless a background as possible, so that the variability of intensity values in the region will be due primarily to noise!
{ Let zi be a discrete random variable that denotes intensity levels in an image, and p(zi), i = 1, 2, . . .,L - 1 be the corresponding normalized histogram, where, L is thenumber of possible intensity values. The histogram component p(zi) is an estimate of the probability of occurrence of intensity value zi.}
04/22/2023
13
Estimation of noise parameters:
2. Find the histogram of ROI.
3. Normalized histogram of (ROI) which can be viewed as an approximation of the intensity PDF!
4. Describe the shape of noise PDF via its central moments (estimate the mean and variance and then compute a and b variables if needed).
Introduction
BYU-ECE Department
04/22/2023
14
Introduction
BYU-ECE Department
Estimation of noise parameters (Example – Our Matlab Code Simulation):The original Image
The original image with additive Gaussian noise N(0.01,0.009
0 50 100 150 200 250 3000
5
10
15
20
25
30
35
40
45Histogram of ROI
intensity levels
num
ber o
f pix
els
0 50 100 150 200 250 3000
0.002
0.004
0.006
0.008
0.01
0.012
0.014
0.016
0.018
0.02Normalized Histogram-approxmiated PDF of ROI
intensity levelsp(
z) p
roba
bilit
y of
occ
uran
ce o
f int
ensi
ty v
alue
s zi
Original Image
Image with Gaussian Noise
Histogram of ROI Normalized histogram of ROI
04/22/2023
15
Introduction
BYU-ECE Department
0 50 100 150 200 250 3000
5
10
15
20
25
30
35
40
45Histogram of ROI
intensity levels
num
ber o
f pix
els
Uniform Noise Histogram
0 50 100 150 200 250 3000
0.005
0.01
0.015
0.02
0.025
0.03Normalized Histogram-approxmiated PDF of ROI
intensity levels
p(z)
pro
babi
lity
of o
ccur
ance
of i
nten
sity
val
ues
zi
Impulse Noise Histogram
0 50 100 150 200 250 3000
0.02
0.04
0.06
0.08
0.1
0.12
0.14Normalized Histogram-approxmiated PDF of ROI
intensity levels
p(z)
pro
babi
lity
of o
ccur
ance
of i
nten
sity
val
ues
zi
0 50 100 150 200 250 3000
50
100
150
200
250Histogram of ROI
intensity levels
num
ber o
f pix
els
04/22/2023
16
Wiener Filter
Image Restoration Approaches
Classical approaches
Inverse filter
Weiner filter
Algebraic approaches
The regularization theory
BYU-ECE Department
Unconstrained optimization
Constrained optimization
04/22/2023
17
Wiener Filter
BYU-ECE Department
],[],[],[
],[],[],[ˆ
vu
vuvu
vu
vuvu
ffHffNffX
ffHffYffX
Inverse Filter:
],[],[],[],[),(),(),(],[
vvvv ffNffHffXffYvunvuhvuxvuy
uuuu
Degradation Function h ∑
Restoration Filter (Wiener
Filter)
y(u, v)x(u, v) x(u, v)
Degradation Process with additive noise Denoising and Restoration Process
Noise n(u, v)
04/22/2023
18
Wiener Filter
Most neighboring pixels are highly correlated, while widely separated pixels are only loosely correlated.
Therefore, the autocorrelation function of typical images generally decreases away from the origin.
Power spectrum = Fourier transform of autocorrelation, therefore the power spectrum of an image generally decreases with frequency.
Typical noise sources have either a flat power spectrum or one that decreases with frequency more slowly than typical image power spectrum.
Therefore, the signal should dominate at low frequencies, while the noise dominates at high frequencies.
Wiener Filter:
BYU-ECE Department
04/22/2023
19
Wiener Filter:Assumptions:1. The noise and the image are uncorrelated.2. Either the noise or the image is zero-mean, and that the
intensities in the estimate are a linear function of the intensities in the noisy image.
3. It also assumes that the power spectrum of both the noise and the original image are known
BYU-ECE Department
Wiener Filter
Degradation model
Theory (Derivation)
],[],[],[],[),(),(),(],[
vvvv ffNffHffXffYvunvuhvuxvuy
uuuu
04/22/2023
20
Wiener Filter
The Goal We wish to find an LTI filter with impulse response g[u, v] that gives us the MMSE estimate of x[u, v]:
The MSE is given by:
BYU-ECE Department
Parseval’s theorem states:
Since they are directly proportional, we can minimize the spatial domain mean squared error by minimizing the frequency domain mean squared error:
Using property of the Fourier transform:
Substitute in Y then rearrange the terms
04/22/2023
21
Wiener Filter
BYU-ECE Department
Using the definition of an absolute square, we get:
Multiplying out theterms and distributing the expected value across the sums
We assume that the noise is independent of the originalimage and that either the noiseor the image is zero-mean:
Where the power spectral densities are defined as:
BYU-ECE Department 04/22/2023
22
Wiener Filter
To find the G that minimizes the MSE, we take the derivative with respect to G(fu, fv):
Solving for G* gives:HH* = │H│2
Finally, we write the equationin terms of the signal-to-noiseRatio:
04/22/2023
23
BYU-ECE Department
Wiener Filter
Wiener Filter Equation:
Arranged intuitively:
04/22/2023
24
Results & Analysis
BYU-ECE Department
Original image 20 pixel motion blur
04/22/2023
25
Results & Analysis
BYU-ECE Department
Original image 20 pixel motion blur, inverse filtered
04/22/2023
26
Results & Analysis
BYU-ECE Department
Original image 5 pixel motion blur, imperceptible Gaussian noise
04/22/2023
27
Results & Analysis
BYU-ECE Department
Original image 5 pixel motion blur, imperceptible Gaussian noise, inverse filtered
04/22/2023
28
Results & Analysis
BYU-ECE Department
Original image 5 pixel motion blur, imperceptible Gaussian noise, Wiener filtered
04/22/2023
29
Results & Analysis
BYU-ECE Department
Original image 15 pixel motion blur, Gaussian noise
04/22/2023
30
Results & Analysis
BYU-ECE Department
15 pixel motion blur, Gaussian noise
15 pixel motion blur, Gaussian noise, inverse filtered
04/22/2023
31
Results & Analysis
BYU-ECE Department
15 pixel motion blur, Gaussian noise
15 pixel motion blur, Gaussian noise, Wiener filtered
04/22/2023
32
Results & Analysis
BYU-ECE Department
3 pixel motion blur, salt and pepper noise
3 pixel motion blur, salt and pepper noise, inverse filtered
04/22/2023
33
Results & Analysis
BYU-ECE Department
3 pixel motion blur, salt and pepper noise
3 pixel motion blur, salt and pepper noise, Wiener filtered
04/22/2023
34
Results & Analysis
BYU-ECE Department
Wiener filter using estimated noise spectrum
Wiener filter using actual noise spectrum
Region of Interest
Conclusions
Inverse filter works well with no noiseWiener filter performs much better in the presence
of noise Assumes knowledge of degradation function (a common
requirement for image restoration algorithms) Assumes knowledge of the power spectra of the noise and
original image (less common, makes it less useful)The noise power spectrum can be effectively
estimated by analyzing the histogram of an ROI in the noisy image
Forms the basis of other more robust restoration approaches
04/22/2023
35
BYU-ECE Department
04/22/2023
36
Thank you
BYU-ECE Department