Gaussian Noise : Matlab
t_gaus = imnoise (t, ‘gaussian’); imshow(t_gaus);
Salt and Pepper Noise :
MATLAB
t_sp = imnoise (t, ‘salt & pepper’); imshow(t_sp);
Other Additive Noise Models
•
Rayleigh Noise
•
Gamma(Erlang) Noise
•
Exponential Noise
•
Uniform Noise
•
Impulse Noise
Periodic Noise
Noise components
Are generated due to electrical or electromechanical interference during image acquisition
Periodic Noise : MATLAB
tw = imread(filename); t = rgb2gray(tw);
s = size(t);
[x,y] = meshgrid(1:s(1), 1:s(2)); p = sin(x/3+y/5)+1;
t_pn = (im2double(t)+p’/2)/2; imshow(t_pn);
10 13 5
11 20 15
8 0 0
Rank-Order Filter
• Sort the intensities within the mask.
• Choose the intensity at ith position as output.
10 20 10 15 5
Sort intensity
Median filterMin. filter
Rank-Order Filter
Rank-Order Filter :
Max Filter
• Output pixel is the maximum intensity of the pixels within the mask. (find brightest point)
BEFORE AFTER
Rank-Order Filter :
Min Filter
• Output pixel is the minimum intensity of the pixels within the mask. (find darkest point)
BEFORE AFTER
Rank-Order Filter : Median
Filter
-- Repeated passes of median filter tend to blur the image. -- Keep the number of passes
• Output pixel is the
mid-intensity of the pixels within the mask (the median
intensity).
• Adaptive median filter
memiliki tujuan ganda yaitu
menghapus impuls noise
pada gambar dan
mengurangi distorsi pada gambar.
Rank-Order Filter : Median
Filter
BEFORE AFTER
Rank-Order Filtering:
MATLAB
• Command: ordfilt2
• Syntax: ordfilt2(image, order, domain); medfilt2(image);
• image : input image
• order : which order of the sorted intensity (minimum to
maximum value) taken as output
• domain : matrix indicating the neighborhood. 1 : pixels in the neighbor.
0 : pixels not in the neighbor E.g. cmin = ordfilt2(image, 1, ones(3,3));
Mean Filters
Mean Filters
Mean Filter
Good Results of Geometric Mean Filter
BEFORE AFTER
Mean Filter :
Bad Results of Geometric Mean Filter
BEFORE AFTER
Mean Filters
Mean Filters
Mean Filters
Good Results of Contraharmonic Mean Filter
Mean Filters
Bad Results of Contraharmonic Mean Filter
• Arithmetic mean filter and geometric mean filter are well suited for
random noise such as Gaussian noise
• Contraharmonic mean filter is well suited for impulse noise
Order-statistic Filters
Alpha-Trimmed Mean Filter
• Output is the mean of the data after removing the first d/2 and the last d/2 ordered data.
10 13 5 1 from the bottom.)
Order-statistic Filters
Effect of Alpha-Trimmed Mean Filter
BEFORE AFTER
Image corrupted by salt-and-pepper
-High level of noise large filter
-Median and
alpha-trimmed filter performed better
Periodic Noise Reduction
Frequency Domain Filtering
Band Reject Filters
(Selective
Filter)
• Ideal Band-Reject Filters
Periodic Noise Reduction
Frequency Domain Filtering
Band Reject Filters
• Butterworth Band-Reject Filter of Order n
• Gaussian and-Reject Filter
Periodic Noise Reduction
Periodic Noise Reduction
Frequency Domain Filtering
Band Pass Filters
• Opposite operation of a band-reject filter
1
( , )
bp
br
Periodic Noise Reduction
Frequency Domain Filtering
Notch Filters
• Rejects (or passes) frequencies in predefined neighborhoods about a center frequency
Ideal
Butterworth
Gaussian
Must appear in
Periodic Noise Reduction
Frequency Domain Filtering
Notch Filters
• Ideal Notch Filters
1 0 2 0
Horizontal lines of the noise pattern I can be seen
Tugas
• Cari tahu bagaimana cara menghilangkan periodic noise menggunakan band-reject filter, band-pass filter atau notch filter pada MATLAB.