Professional Documents
Culture Documents
Nonlinear Filters: Image Noise
Nonlinear Filters: Image Noise
Image Noise
Physical effects (dust, raindrops)
Electrical noise
Lecture 4:
Caused by fluctuations in electric circuit.
Thermal noise
Nonlinear Filters
Impulse noise
Quantization noise
Poor illumination
Math 490
Prof. Todd Wittman
The Citadel
Source: http://photographylife.com/what-is-iso-in-photography
much.
100 100
The most common type of noise
is Gaussian (white noise). 150 150
200 200
A = imread('cameraman.tif');
B = imnoise(A, 'gaussian', 0, 0.3); 250
50 100 150 200 250
250
50 100 150 200 250
A=imread('cameraman.tif'); A=imread('cameraman.tif');
Variance B=imnoise(uint8(A),'gaussian',0,0.02); B=imnoise(uint8(A),'poisson');
Distribution of noise Mean imagesc(B); imagesc(B);
1
Lecture 4: Nonlinear Filters
110
50
150 150 111
100 112
100 100
150 150
200
250
50 100 150 200 250
200
250
50 100 150 200 250
- =
Can also use the command medfilt2.
2
Lecture 4: Nonlinear Filters
Thought Exercise
Quantifying Noise
A noisy brain MRI is segmented into 4 classes using
There are two major statistics used to determine the amount K-means clustering.
of noise in an image. K = kmeans(A(:),4);
Both statistics compare the noisy image f to an ideal noise- B = reshape(K, size(A));
free image fideal. The image B takes on integer values 1-4.
Both statistics are easier to write using the Frobenius norm: 50
= ! ! , "
100
150
$ #
200
250
350
%& = − $)*+,
400
500
123456
Mean and median filters are not appropriate for this
% = 20 log Larger SNR = Less Noise type of data. Can you explain why?
17123456
Thought Exercise
Beyond Local
The data is qualitative. The values 1,2,3,4 are just labels
Suppose Lena’s left eye was obscured by noise.
and the order is irrelevant.
A neighborhood around the eye will not tell us the eye’s true
We could run a ___________ filter on the data. color.
C = nlfilter(B,[3,3], @(x)________(x(:)) );
50 50
100 100
150 150
200 200
250 250
300 300
350 350
400 400
450 450
500
50 100 150 200 250 300 350 400 450 500
500
50 100 150 200 250 300 350 400 450 500
Solution: Look at the other eye!
3
Lecture 4: Nonlinear Filters
9 − ;
9, ; = >9? −
ℎ
The parameter h controls the similarity.
Generally choose square neighborhood, e.g. 5x5.
Can add Gaussian weights to norm to emphasize center.
NL-Means NL-Means
Many consider NL-Means and its variants to be NL-Means performs best on images with
the best denoising method for natural images. repeating patterns.
4
Lecture 4: Nonlinear Filters
Noisy NL-Means
3D NL-Means Ultrasound
Nonlocal methods are good at removing the speckle
NL-Means extends to 3D for surface denoising (Dong- noise in Ultrasound images (Sawatzky, 2011).
Ye-Osher-Dinov, 2007).
NL-Means recovers corners and flattens smooth regions
better than many denoising methods.