noise reduction dr. kaaren may memorial university › ~kmay › courses › eng7854 › noise...
TRANSCRIPT
Noise Reduction
Dr. Kaaren May Memorial University
June 2012
Example 1: Temporal Noise Reduction • Suppose an image f(x,y) has been corrupted
by additive noise η(x,y):
• Assume that at every pair of coordinates the noise is uncorrelated and has zero mean
• If we have a series of noisy images of the same scene taken at different time instants, then by averaging these images together we can reduce the noise
2
g(x, y) = f (x, y)+!(x, y)
Temporal Noise Reduction
• Let
• Then
• And
• Note that the assumption is that underlying scene is the same at each time instant
• If there is any motion in the scene, then averaging frames introduces motion blur
3
g(x, y) = 1K
gii=1
K
! (x, y)
E{g(x, y)} = f (x, y)
! g (x,y)2 =
1K!"(x,y)2
Temporal Noise Reduction
4
• Series of 5 images in low light on high ISO setting (3200)
• Average the 5 images • Assumes noise is zero mean and
uncorrelated
Noise in averaged frame is significantly reduced
Single input frame Temporal average
5
Spatial Domain Processing
• The previous example showed how noise reduction can be accomplished via temporal filtering v Taking the average of images recorded at different time instants
• This assumes that the only difference between the input images is the noise that has been added to them
• If there is any motion, this has to be taken into account before filtering
• In most cases, need to rely on spatial rather than temporal filtering for noise removal
6
Neighborhood Operators
7
Origin
x
y
Image f
Spatial domain
(x,y)
3 x 3 neighborhood of (x,y)
Origin
x
y
Image f
Spatial domain
Neighborhood is moved from pixel to pixel to generate output image
A neighborhood operator can be linear or nonlinear
Linear operators • (Weighted) average • Other linear spatial
filters:
Nonlinear operators • Median • Minimum • Maximum • Thresholding
8
g(x, y) = w(s, t) f (x + s, y+ t)t=!b
b
"s=!a
a
"
w(!1,0) w(!1,1)w(!1,!1)
w(0,!1) w(0, 0) w(0,1)
w(1,!1) w(1, 0) w(1,1)
f (x !1, y) f (x !1, y+1)f (x !1, y!1)
f (x, y!1) f (x, y) f (x, y+1)
f (x +1, y!1) f (x +1, y) f (x +1, y+1)
g(x, y)
What distinguishes linear from nonlinear operators?
9
• Consider a general operator H that takes input image f(x,y) and produces output g(x,y)
• H is a linear operator if H f (x, y)[ ] = g(x, y)
H a1 f1(x, y)+ a2 f2 (x, y)[ ] = a1H f1(x, y)[ ]+ a2H f2 (x, y)[ ]= a1g1(x, y)+ a2g2 (x, y)
Example 2: Spatial Noise Reduction
10
RGB = imread(filename); I = rgb2gray(RGB);
7 x 7 Box Filter (Linear)
11
h = ones(7)/49; A = imfilter(I, h, 'replicate');
7 x 7 Gaussian Filter (Linear)
12
hsize = 7; sigma = 1.5; h = fspecial('gaussian',hsize,sigma); C = imfilter(I, h, 'replicate');
7 x 7 Median Filter (Nonlinear)
13 B = medfilt2(I, [7 7], 'symmetric');
Smoothing/Filtering
• Course notes and demo of salt and pepper noise removal
14
Median Filtering
• Course notes, example plus demo
15
Course Notes
• See http://www.engr.mun.ca/~kmay/courses.html
16