5. 1 Model of Image degradation and restoration g(x,y)=h(x,y)
f(x,y)+ (x,y) Note: H is a linear, position-invariant process.
Slide 2
Spatial and frequency property of noise Spatial and frequency
property of noise White noise (random noise) A sequence of random
positive/negative numbers whose mean is zero. A sequence of random
positive/negative numbers whose mean is zero. Independent of
spatial coordinates and the image itself. In the frequency domain,
all the frequencies are the same. In the frequency domain, all the
frequencies are the same. All the frequencies are corrupted by an
additional constant frequency. Periodic noise
Slide 3
Gaussian noise Gaussian noise : mean; : variance 70% [( - ), (
+ )] 95 % [( -2 ), ( +2 )] Because of its tractability, Gaussian
(normal) noise model is often applicable at best.
Slide 4
The problem of adding noise to an image is identical to that of
adding a random number to the gray level of each pixel. The problem
of adding noise to an image is identical to that of adding a random
number to the gray level of each pixel. Noise models describe the
distribution (probability density function, PDF) of these random
numbers. How to match the PDF of a group of random numbers to a
specific noise model? Histogram matching. Histogram matching.
Exponential noise Exponential noise =1/a; =1/a 2 =1/a; =1/a 2 A
special case Erlang noise model when b = 1.A special case Erlang
noise model when b = 1.
Impulse noise (salt and pepper noise) Impulse noise (salt and
pepper noise)
Slide 10
Example
Slide 11
Results of adding noise
Slide 12
Slide 13
Gaussian noise: Gaussian noise: electronic circuit noise and
sensor noise due to poor illumination or high temperature. Rayleigh
noise: Rayleigh noise: Noise in range imaging. Erlang noise: Erlang
noise: Noise in laser imaging. Impulse noise: Impulse noise: Quick
transients take place during imaging. Uniform noise: Uniform noise:
Used in simulations.
Slide 14
Slide 15
Impulse noise is caused by Malfunctioning pixels in camera
sensors Fault memory locations in hardware Transmisison in a noisy
channel Two types: Salt-and-pepper Noise Uniformly-Distrubuted
Random Noise
Slide 16
Slide 17
Slide 18
Slide 19
Slide 20
Slide 21
Slide 22
Slide 23
How do we know which noise model adaptive to the currently
available imaging tool? How do we know which noise model adaptive
to the currently available imaging tool? Image a solid gray board
that is illuminated uniformly. Crop a small patch of constant grey
level and analyze its histogram to see which model matches.
Slide 24
Gaussian n: Gaussian n: Find the mean and standard deviation of
the histogram (Gaussian noise). Rayleigh, Erlang, and uniform
noise: Rayleigh, Erlang, and uniform noise: Calculate the a and b
from and . Impulse noise: Impulse noise: Compute the height of
peaks at gray levels 0 and 255 to find P a and P b.
Slide 25
Estimation of Noise Parameters
Slide 26
Slide 27
Slide 28
Slide 29
Slide 30
Slide 31
Slide 32
Slide 33
Slide 34
Slide 35
The recently proposed Nonlocal Means Algorithm (NLmeans) has
offered remarkably promising results. Unlike previous denoising
methods that rely on the local regularity assumption, the NL-means
exploits spatial correlation in the entire image for noise removal.
It adjusts each pixel value with a weighted average of other pixels
whose neighborhood has a similar geometrical configuration. Since
image pixels are highly correlated while noise is typically
independently and identically distributed (i.i.d.), averaging of
these pixels results in noise cancellation and yields a pixel that
is similar to its original value. Non-Local Means Algorithm (Buades
2005)
Slide 36
New Idea: NL-Means Filter (Buades 2005) Same goals: Smooth
within Similar Regions Same goals: Smooth within Similar Regions
KEY INSIGHT: Generalize, extend Similarity KEY INSIGHT: Generalize,
extend Similarity Bilateral: Averages neighbors with similar
intensities; NL-Means: Averages neighbors with similar
neighborhoods!
Slide 37
NL-Means Method: Buades (2005) For each and For each and every
pixel p: every pixel p:
Slide 38
NL-Means Method: Buades (2005) For each and For each and every
pixel p: every pixel p: Define a small, simple fixed size
neighborhood;
Slide 39
NL-Means Method: Buades (2005) For each and For each and every
pixel p: every pixel p: Define a small, simple fixed size
neighborhood; Define vector V p : a list of neighboring pixel
values. V p = 0.74 0.32 0.41 0.55
Slide 40
NL-Means Method: Buades (2005) Similar pixels p, q SMALL vector
distance; || V p V q || 2 p q
Slide 41
NL-Means Method: Buades (2005) Dissimilar pixels p, q LARGE
vector distance; || V p V q || 2 p q q
Slide 42
NL-Means Method: Buades (2005) Dissimilar pixels p, q LARGE
vector distance; Filter with this! || V p V q || 2 p q
Slide 43
NL-Means Method: Buades (2005) p, q neighbors define p, q
neighbors define a vector distance; Filter with this: No spatial
term! || V p V q || 2 p q
Slide 44
NL-Means Method: Buades (2005) pixels p, q neighbors Set a
vector distance; Vector Distance to p sets weight for each pixel q
|| V p V q || 2 p q
NL-Means Filter (Buades 2005) Bilateral Filter Bilateral Filter
(better, but similar stairsteps:
Slide 49
NL-Means Filter (Buades 2005) NL-Means: NL-Means:Sharp, Low
noise, Few artifacts.
Slide 50
Median filter Median filter Max filter: find the brightest
points to reduce the pepper noise Max filter: find the brightest
points to reduce the pepper noise Min filter: find the darkest
point to reduce the salt noise Min filter: find the darkest point
to reduce the salt noise Midpoint filter: combining statistics and
averaging. Midpoint filter: combining statistics and
averaging.
Slide 51
Median filter
Slide 52
The median filter is used for removing noise. It can remove
isolated impulsive noise and at the same time it preserves the
edges and other structures in the image. Contrary to average
filtering it does not smooth the edges.
Slide 53
Unlike the mean filter, the median filter is non- linear. This
means that for two images A(x) and B(x):mean filter
Slide 54
Slide 55
Slide 56
Slide 57
Slide 58
Removal of Line Artifacts by Median Filtering
Slide 59
The original image. b) Original image corrupted by salt and
pepper noise (p=5 % that a bit is flipped. c) After smoothing with
a 3 x 3 filter most of the noise has been eliminated.
Slide 60
d) If we smooth the image with a larger median filter, e.g. 7 x
7, all the noise pixels disappear. e) Alternatively, we can pass a
3 x 3 filter over the image 3 times in order to remove the noise
with less loss of detail.
Slide 61
Salt and pepper noise (5 %)Salt and pepper noise (20 %)
Smoothed by 3 x 3 window
Slide 62
Salt and pepper noise (5 %)Salt and pepper noise (20 %) Median
filtered by 3 x 3 window
Slide 63
Example 5.3 Iteratively applying median filter to an image
corrupted by impulse noise.
Slide 64
Alpha-trimmed mean filter is windowed filter of nonlinear
class, by its nature is hybrid of the mean and median filters. The
basic idea behind filter is for any element of the signal (image)
look at its neighborhood, discard the most atypical elements and
calculate mean value using the rest of them.
Slide 65
Combining the advantages of mean filter and order-statistics
filter. Combining the advantages of mean filter and
order-statistics filter. Suppose delete d/2 lowest and d/2 highest
gray-level value in the neighborhood of S xy and average the
remaining mn-d pixel, denoted by g r (s, t). where d=0 ~ mn-1
Slide 66
Slide 67
Slide 68
Filters whose behavior changes based on statistical
characteristics of the image. Filters whose behavior changes based
on statistical characteristics of the image. Two adaptive filters
are considered: Two adaptive filters are considered: (1)Adaptive,
local noise reduction filter. (2)Adaptive median filter.
Slide 69
Two parameters are considered: Two parameters are considered:
Mean: measure of average gray level. Variance: measure of average
contrast. Four measurements: Four measurements: (1)noisy image at
(x, y ): g(x, y ) (2)The variance of noise 2 (3)The local mean m L
in S xy (4)The local variance 2 L
Slide 70
Given the corrupted image g(x, y), find f(x, y). Conditions:
(a) 2 is zero (Zero-noise case) Simply return the value of g(x, y).
(b)If 2 L is higher than 2 Could be edge and should be preserved.
Return value close to g(x, y). (c)If 2 L = 2 when the local area
has similar properties with the overall image. Return arithmetic
mean value of the pixels in S xy. General expression:
Slide 71
Slide 72
Adaptive, Local Noise Reduction Filter
Slide 73
Slide 74
Adaptive median filter can handle impulse noise with larger
probability (P a and P b are large). Adaptive median filter can
handle impulse noise with larger probability (P a and P b are
large). This approach changes window size during operation
(according to certain criteria). This approach changes window size
during operation (according to certain criteria). First, define the
following notations: First, define the following notations: z min
=minimum gray-level value in S xy z max =maximum gray-level value
in S xy z med =median gray-level value in S xy z xy = gray-level at
(x,y) S max =maximum allowed size of S xy
Slide 75
The adaptive median filter algorithm works in two levels: A and
B The adaptive median filter algorithm works in two levels: A and B
Level A: A1=z med -z min Level A: A1=z med -z min A2=z med -z max
If A1>0 and A2 0 and A20 AND B2 0 AND B2