SlideShare a Scribd company logo
1 of 90
Download to read offline
Image filtering in the frequency domain
Václav Hlaváč
Czech Technical University in Prague
Czech Institute of Informatics, Robotics and Cybernetics
160 00 Prague 6, Jugoslávských partyzánů 1580/3, Czech Republic
http://people.ciirc.cvut.cz/hlavac, vaclav.hlavac@cvut.cz
also Center for Machine Perception, http://cmp.felk.cvut.cz
Outline of the talk:

Convolution as filtration in frequency domain.

Low pass filtering examples, sharp cut off, smooth Gaussian.

High pass filtering examples, sharp cut off, smooth Gaussian.

Butterworth filter.

Homomorphic filter separating
illumination and reflectance.

Systematic design of 2D FIR filters.
2/25
Filtration in the frequency domain
1. F(u, v) = F{f(x, y)}
2. G(u, v) = H(u, v) . ∗ F(u, v),
where .∗ denotes element-wise multiplication of matrices.
3. g(x, y) = F−1
{G(u, v)}
Note for lab exercises: We usually use ln kF(u, v)k for visualization purposes. The original
spectrum F(u, v) has to be used in the actual filtration.
3/25
Convolution as Fourier spectrum frequency filtration

Matrix element by element multiplication.

The speed of operations is determined by the (high) speed of FFT.
Consider a matrix a with dimensions M × N and a matrix b with dimensions P × Q.
The convolution c = a ∗ b can be calculated as follows:
1. Fill in matrices a, b by zeroes to have dimensions M + P − 1, N + Q − 1 (usually up to the
order of 2 to ease FFT).
2. Calculate 2D FFT matic of matrices a, b (in MATLAB, using fft2). The outcome are
matrices A, B.
3. Multiply complex Fourier spectra element-wise, C = A . ∗ B.
4. The result of the convolution c is obtained by the inverse Fourier transformation (in MATLAB
using ifft2).
4/25
2D convolution in frequency domain in MATLAB
A = magic(3);
B = ones(3);
A(8,8) = 0; % zero–pad A to be 8–by–8
B(8,8) = 0; % zero–pad B to be 8–by–8
C = ifft2(fft2(A).*fft2(B));
C = C(1:5,1:5); % extract the nonzero portion
C = real(C) % remove imaginary part caused by roundoff error
C =







8.0000 9.0000 15.0000 7.0000 6.0000
11.0000 17.0000 30.0000 19.0000 13.0000
15.0000 30.0000 45.0000 30.0000 15.0000
7.0000 21.0000 30.0000 23.0000 9.0000
4.0000 13.0000 15.0000 11.0000 2.0000







Note: the convolution calculated via spectra is faster in MATLAB for large matrices. The calculation via conv2,
filt2 is faster for small matrices.
5/25
Low pass filter, circle sharp cut-off, r=5, 15, 50
original filter output in gray output in pseudocolor
6/25
Low pass Gaussian filter, σ = 10, 30
original filter output in gray output in pseudocolor
7/25
High pass circle sharp cut-off, r=5, 15
original filter output in gray output in pseudocolor
8/25
High pass Gaussian filter, σ=10, 30
original filter output in gray output in pseudocolor
9/25
Example, Fourier filtration, Gaussian filter
10/25
Example, Fourier filtration, Sobel filter
11/25
Example, Fourier filtration, Abs(Sobel filter)
12/25
Low pass filter, Butterworth (1)
Butterworth filter has the frequency spectrum with the smallest rippling, which converges to zero
for maximal frequences (S. Buttherworth, 1930).
Shifted log(abs(FFT)) of the original image
200 400 600 800 1000
100
200
300
400
500
600
700
−2
0
2
4
6
8
10
12
Input image Its frequency spectrum
13/25
Low pass filter, Butterworth (2)
Shifted log(abs(FFT)) of the filtered image
200 400 600 800 1000
100
200
300
400
500
600
700
−6
−4
−2
0
2
4
6
8
10
12
Butterworth low pass filter FFT of the filtered image
H(u, v) = 1
1+

D(u,v)
D0
2
n
, where D(u, v) =
√
u2 + v2. n is the filter degree.
D0 is the frequency corresponding to the decrease of intensity by 3dB.
14/25
Low pass filter, Butterworth (3)
Input image Its frequency spectrum
15/25
Homomorphic filter (1)
The aim: to normalize the intensity across the entire image and to increase contrast.
The method is based on the following assumptions:

Illumination i changes in the image very slowly (low frequencies),

Reflectance r changes in a more fast fashion, because the scene is usually rather diverse.

The image can be decomposed (factorized) in each pixel into a product of two components –
illumination i and reflectance r: f(x, y) = i(x, y) r(x, y).
The key idea: the logarithm function can be used to separate the illumination and the reflectance
components.
16/25
Homomorphic filter (2)
z(x, y) = ln f(x, y) = ln i(x, y) + ln r(x, y)
Fourier spectrum Z(u, v) = I(u, v) + R(u, v)
Filtering in the frequency domain
S(u, v) = H(u, v)Z(u, v) = H(u, v)I(u, v) + H(u, v)R(u, v)
Inverse transformation back into spatial coordinates s(x, y) = F−1
{S(u, v)} and return to
original gray scale from the logarithmic one
g(x, y) = exp (s(x, y))
The outcome is the suppression in the illumination changes in the scene and the improvement of
the reflectance component.
17/25
Homomorphic filters
50 100 150 200
0
0.2
0.4
0.6
0.8
1
1.2
1.4
homomorphic filter
Standard high−pass filter
Note: The filter is used to modify Z(u, v), not the original spectrum F(u, v)!
18/25
Outcome of homomorphic filtration
Original image. Filtered image.
19/25
Design of 2D FIR filters

The 2D Infinite Impulse Response (IIR) filters are not used because of their instability.
(causality is not secured).

Finite Impulse Response (FIR) filters can be easily represented as a matrix of coefficients. The
implementation is easy.

2D FIR filters are natural generalization of 1D FIR filters.

FIR filters can be designed to have linear phase, which reduces distortions.

Three design methods are usually used:
1. Frequency transformation method transforms a 1D filter into 2D.
2. Frequency sampling method creates the filter according to the desired frequency
response.
3. Windowing method composes the filter from the ideal impulse response and the
smoothing window.
20/25
Frequency transformation method
The established methods for designing 1D filters can be used. The 1D filter is converted into 2D
by making the filter center symmetric. A good method.
A MATLAB example (Parks-McClellan optimal design):
b = remez(10,[0 0.4 0.6 1],[1 1 0 0]);
h = ftrans2(b);
[H,w] = freqz(b,1,64,’whole’);
colormap(jet(64))
plot(w/pi–1,fftshift(abs(H))) figure, freqz2(h,[32 32])
21/25
2D Parks-McClellan Filter
Example continuation
22/25
Frequency sampling method
The desired frequency response is given. The filter is created in the matrix form securing that the
response passes given frequency response points. The behavior can be arbitrary outside the given
points. Oscillations are common.
MATLAB example (design of the 11 × 11 filter)
Hd = zeros(11,11); Hd(4:8,4:8) = 1;
[f1,f2] = freqspace(11,’meshgrid’);
mesh(f1,f2,Hd), axis([-1 1 -1 1 0 1.2]), colormap(jet(64))
h = fsamp2(Hd);
figure, freqz2(h,[32 32]), axis([-1 1 –1 1 0 1.2])
23/25
Frequency sampling method
Example continuation
24/25
Windowing method
The ideal response of the filter smoothes the coefficients in the windos. The ideal filter is
approximated.
The results are usually better than the results of the Frequency Sampling Method.
Hd = zeros(11,11); Hd(4:8,4:8) = 1;
[f1,f2] = freqspace(11,’meshgrid’);
mesh(f1,f2,Hd), axis([–1 1 –1 1 0 1.2]), colormap(jet(64))
h = fwind1(Hd,hamming(11));
figure, freqz2(h,[32 32]), axis([–1 1 –1 1 0 1.2])
25/25
Windowing method
Example continuation
Shifted log(abs(FFT)) of the original image
200 400 600 800 1000
100
200
300
400
500
600
700
−2
0
2
4
6
8
10
12
Shifted log(abs(FFT)) of the filtered image
200 400 600 800 1000
100
200
300
400
500
600
700
−6
−4
−2
0
2
4
6
8
10
12
50 100 150 200
0
0.2
0.4
0.6
0.8
1
1.2
1.4
homomorphic filter
Standard high−pass filter
13 fourierfiltrationen
13 fourierfiltrationen
13 fourierfiltrationen
13 fourierfiltrationen
13 fourierfiltrationen
13 fourierfiltrationen
13 fourierfiltrationen
13 fourierfiltrationen

More Related Content

What's hot

Lecture 12 (Image transformation)
Lecture 12 (Image transformation)Lecture 12 (Image transformation)
Lecture 12 (Image transformation)VARUN KUMAR
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier TransformAbhishek Choksi
 
Chapter 4 Image Processing: Image Transformation
Chapter 4 Image Processing: Image TransformationChapter 4 Image Processing: Image Transformation
Chapter 4 Image Processing: Image TransformationVarun Ojha
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transformop205
 
Chapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier TransformationChapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier TransformationVarun Ojha
 
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier TransformAmr E. Mohamed
 
02 2d systems matrix
02 2d systems matrix02 2d systems matrix
02 2d systems matrixRumah Belajar
 
Dsp U Lec10 DFT And FFT
Dsp U   Lec10  DFT And  FFTDsp U   Lec10  DFT And  FFT
Dsp U Lec10 DFT And FFTtaha25
 
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier AnalysisDSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier AnalysisAmr E. Mohamed
 
Fourier transformation
Fourier transformationFourier transformation
Fourier transformationzertux
 
Chapter 3 Image Processing: Basic Transformation
Chapter 3 Image Processing:  Basic TransformationChapter 3 Image Processing:  Basic Transformation
Chapter 3 Image Processing: Basic TransformationVarun Ojha
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformAmr E. Mohamed
 
Decimation in time and frequency
Decimation in time and frequencyDecimation in time and frequency
Decimation in time and frequencySARITHA REDDY
 
Discrete fourier transform
Discrete fourier transformDiscrete fourier transform
Discrete fourier transformMOHAMMAD AKRAM
 
Dcs lec02 - z-transform
Dcs   lec02 - z-transformDcs   lec02 - z-transform
Dcs lec02 - z-transformAmr E. Mohamed
 
Chapter5 - The Discrete-Time Fourier Transform
Chapter5 - The Discrete-Time Fourier TransformChapter5 - The Discrete-Time Fourier Transform
Chapter5 - The Discrete-Time Fourier TransformAttaporn Ninsuwan
 
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)Amr E. Mohamed
 

What's hot (20)

Nabaa
NabaaNabaa
Nabaa
 
Lecture 12 (Image transformation)
Lecture 12 (Image transformation)Lecture 12 (Image transformation)
Lecture 12 (Image transformation)
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
 
Chapter 4 Image Processing: Image Transformation
Chapter 4 Image Processing: Image TransformationChapter 4 Image Processing: Image Transformation
Chapter 4 Image Processing: Image Transformation
 
Fast Fourier Transform
Fast Fourier TransformFast Fourier Transform
Fast Fourier Transform
 
Lecture 9
Lecture 9Lecture 9
Lecture 9
 
Chapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier TransformationChapter 5 Image Processing: Fourier Transformation
Chapter 5 Image Processing: Fourier Transformation
 
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_FOEHU - Lec 08 - The Discrete Fourier Transform
 
02 2d systems matrix
02 2d systems matrix02 2d systems matrix
02 2d systems matrix
 
Dsp U Lec10 DFT And FFT
Dsp U   Lec10  DFT And  FFTDsp U   Lec10  DFT And  FFT
Dsp U Lec10 DFT And FFT
 
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier AnalysisDSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
DSP_FOEHU - MATLAB 02 - The Discrete-time Fourier Analysis
 
Fourier transformation
Fourier transformationFourier transformation
Fourier transformation
 
Chapter 3 Image Processing: Basic Transformation
Chapter 3 Image Processing:  Basic TransformationChapter 3 Image Processing:  Basic Transformation
Chapter 3 Image Processing: Basic Transformation
 
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
 
Decimation in time and frequency
Decimation in time and frequencyDecimation in time and frequency
Decimation in time and frequency
 
Discrete fourier transform
Discrete fourier transformDiscrete fourier transform
Discrete fourier transform
 
Dcs lec02 - z-transform
Dcs   lec02 - z-transformDcs   lec02 - z-transform
Dcs lec02 - z-transform
 
Properties of dft
Properties of dftProperties of dft
Properties of dft
 
Chapter5 - The Discrete-Time Fourier Transform
Chapter5 - The Discrete-Time Fourier TransformChapter5 - The Discrete-Time Fourier Transform
Chapter5 - The Discrete-Time Fourier Transform
 
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
DSP_FOEHU - MATLAB 04 - The Discrete Fourier Transform (DFT)
 

Similar to 13 fourierfiltrationen

Paper id 252014114
Paper id 252014114Paper id 252014114
Paper id 252014114IJRAT
 
D ESIGN A ND I MPLEMENTATION OF D IGITAL F ILTER B ANK T O R EDUCE N O...
D ESIGN  A ND  I MPLEMENTATION OF  D IGITAL F ILTER  B ANK  T O  R EDUCE  N O...D ESIGN  A ND  I MPLEMENTATION OF  D IGITAL F ILTER  B ANK  T O  R EDUCE  N O...
D ESIGN A ND I MPLEMENTATION OF D IGITAL F ILTER B ANK T O R EDUCE N O...sipij
 
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)Shajun Nisha
 
DESIGN OF QUATERNARY LOGICAL CIRCUIT USING VOLTAGE AND CURRENT MODE LOGIC
DESIGN OF QUATERNARY LOGICAL CIRCUIT USING VOLTAGE AND CURRENT MODE LOGICDESIGN OF QUATERNARY LOGICAL CIRCUIT USING VOLTAGE AND CURRENT MODE LOGIC
DESIGN OF QUATERNARY LOGICAL CIRCUIT USING VOLTAGE AND CURRENT MODE LOGICVLSICS Design
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIPbabak danyal
 
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processingDsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processingAmr E. Mohamed
 
Digital signal and image processing FAQ
Digital signal and image processing FAQDigital signal and image processing FAQ
Digital signal and image processing FAQMukesh Tekwani
 
VTC-location based channel estimation for massive full-dimensional MIMO systems
VTC-location based channel estimation for massive full-dimensional MIMO systemsVTC-location based channel estimation for massive full-dimensional MIMO systems
VTC-location based channel estimation for massive full-dimensional MIMO systemsQian Han
 
H0255065070
H0255065070H0255065070
H0255065070theijes
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing ssuser2797e4
 
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignAmr E. Mohamed
 
Filtering an image is to apply a convolution
Filtering an image is to apply a convolutionFiltering an image is to apply a convolution
Filtering an image is to apply a convolutionAbhishek Mukherjee
 
Seismic presentation for Dip correction for convolution modelling
Seismic presentation for Dip correction for convolution modellingSeismic presentation for Dip correction for convolution modelling
Seismic presentation for Dip correction for convolution modellingHarshal Pende
 

Similar to 13 fourierfiltrationen (20)

Paper id 252014114
Paper id 252014114Paper id 252014114
Paper id 252014114
 
D ESIGN A ND I MPLEMENTATION OF D IGITAL F ILTER B ANK T O R EDUCE N O...
D ESIGN  A ND  I MPLEMENTATION OF  D IGITAL F ILTER  B ANK  T O  R EDUCE  N O...D ESIGN  A ND  I MPLEMENTATION OF  D IGITAL F ILTER  B ANK  T O  R EDUCE  N O...
D ESIGN A ND I MPLEMENTATION OF D IGITAL F ILTER B ANK T O R EDUCE N O...
 
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
ESTIMATING NOISE PARAMETER & FILTERING (Digital Image Processing)
 
Stability Analysis of Discrete System
Stability Analysis of Discrete SystemStability Analysis of Discrete System
Stability Analysis of Discrete System
 
Multirate sim
Multirate simMultirate sim
Multirate sim
 
DESIGN OF QUATERNARY LOGICAL CIRCUIT USING VOLTAGE AND CURRENT MODE LOGIC
DESIGN OF QUATERNARY LOGICAL CIRCUIT USING VOLTAGE AND CURRENT MODE LOGICDESIGN OF QUATERNARY LOGICAL CIRCUIT USING VOLTAGE AND CURRENT MODE LOGIC
DESIGN OF QUATERNARY LOGICAL CIRCUIT USING VOLTAGE AND CURRENT MODE LOGIC
 
06 spatial filtering DIP
06 spatial filtering DIP06 spatial filtering DIP
06 spatial filtering DIP
 
Lt2419681970
Lt2419681970Lt2419681970
Lt2419681970
 
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processingDsp 2018 foehu - lec 10 - multi-rate digital signal processing
Dsp 2018 foehu - lec 10 - multi-rate digital signal processing
 
Digital signal and image processing FAQ
Digital signal and image processing FAQDigital signal and image processing FAQ
Digital signal and image processing FAQ
 
VTC-location based channel estimation for massive full-dimensional MIMO systems
VTC-location based channel estimation for massive full-dimensional MIMO systemsVTC-location based channel estimation for massive full-dimensional MIMO systems
VTC-location based channel estimation for massive full-dimensional MIMO systems
 
H0255065070
H0255065070H0255065070
H0255065070
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing
 
Signal Processing Assignment Help
Signal Processing Assignment HelpSignal Processing Assignment Help
Signal Processing Assignment Help
 
Assignment 3Fourier.docx
Assignment 3Fourier.docxAssignment 3Fourier.docx
Assignment 3Fourier.docx
 
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter DesignDSP_2018_FOEHU - Lec 07 - IIR Filter Design
DSP_2018_FOEHU - Lec 07 - IIR Filter Design
 
Filtering an image is to apply a convolution
Filtering an image is to apply a convolutionFiltering an image is to apply a convolution
Filtering an image is to apply a convolution
 
Seismic presentation for Dip correction for convolution modelling
Seismic presentation for Dip correction for convolution modellingSeismic presentation for Dip correction for convolution modelling
Seismic presentation for Dip correction for convolution modelling
 
Presentation_Tan
Presentation_TanPresentation_Tan
Presentation_Tan
 
signal and system
signal and system signal and system
signal and system
 

Recently uploaded

办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭o8wvnojp
 
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service DhuleDhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhulesrsj9000
 
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot AndCall Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot AndPooja Nehwal
 
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceanilsa9823
 
Cheap Rate ➥8448380779 ▻Call Girls In Mg Road Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Mg Road GurgaonCheap Rate ➥8448380779 ▻Call Girls In Mg Road Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Mg Road GurgaonDelhi Call girls
 
Postal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utilisePostal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utiliseccsubcollector
 
Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...
Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...
Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...CIOWomenMagazine
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ EscortsDelhi Escorts Service
 
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,dollysharma2066
 
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual serviceanilsa9823
 
Lilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxLilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxABMWeaklings
 
Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666nishakur201
 
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改atducpo
 
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdfREFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdfssusere8ea60
 
The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushShivain97
 
social media chat application main ppt.pptx
social media chat application main ppt.pptxsocial media chat application main ppt.pptx
social media chat application main ppt.pptxsprasad829829
 
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...ur8mqw8e
 
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfBreath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfJess Walker
 
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...anilsa9823
 

Recently uploaded (20)

办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭办理西悉尼大学毕业证成绩单、制作假文凭
办理西悉尼大学毕业证成绩单、制作假文凭
 
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Lado Sarai Delhi reach out to us at 🔝9953056974🔝
 
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service DhuleDhule Call Girls #9907093804 Contact Number Escorts Service Dhule
Dhule Call Girls #9907093804 Contact Number Escorts Service Dhule
 
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot AndCall Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
Call Girls In Andheri East Call US Pooja📞 9892124323 Book Hot And
 
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Adil Nagar Lucknow best Female service
 
Cheap Rate ➥8448380779 ▻Call Girls In Mg Road Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Mg Road GurgaonCheap Rate ➥8448380779 ▻Call Girls In Mg Road Gurgaon
Cheap Rate ➥8448380779 ▻Call Girls In Mg Road Gurgaon
 
Postal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utilisePostal Ballot procedure for employees to utilise
Postal Ballot procedure for employees to utilise
 
Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...
Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...
Understanding Relationship Anarchy: A Guide to Liberating Love | CIO Women Ma...
 
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
(No.1)↠Young Call Girls in Sikanderpur (Gurgaon) ꧁❤ 9711911712 ❤꧂ Escorts
 
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
8377087607 Full Enjoy @24/7-CLEAN-Call Girls In Chhatarpur,
 
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual serviceCALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
CALL ON ➥8923113531 🔝Call Girls Aliganj Lucknow best sexual service
 
Lilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptxLilac Illustrated Social Psychology Presentation.pptx
Lilac Illustrated Social Psychology Presentation.pptx
 
Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666Call Girls Anjuna beach Mariott Resort ₰8588052666
Call Girls Anjuna beach Mariott Resort ₰8588052666
 
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
办理国外毕业证学位证《原版美国montana文凭》蒙大拿州立大学毕业证制作成绩单修改
 
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdfREFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
REFLECTIONS Newsletter Jan-Jul 2024.pdf.pdf
 
The Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by MindbrushThe Selfspace Journal Preview by Mindbrush
The Selfspace Journal Preview by Mindbrush
 
social media chat application main ppt.pptx
social media chat application main ppt.pptxsocial media chat application main ppt.pptx
social media chat application main ppt.pptx
 
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
《塔夫斯大学毕业证成绩单购买》做Tufts文凭毕业证成绩单/伪造美国假文凭假毕业证书图片Q微信741003700《塔夫斯大学毕业证购买》《Tufts毕业文...
 
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdfBreath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
Breath, Brain & Beyond_A Holistic Approach to Peak Performance.pdf
 
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
Lucknow 💋 High Class Call Girls Lucknow 10k @ I'm VIP Independent Escorts Gir...
 

13 fourierfiltrationen

  • 1. Image filtering in the frequency domain Václav Hlaváč Czech Technical University in Prague Czech Institute of Informatics, Robotics and Cybernetics 160 00 Prague 6, Jugoslávských partyzánů 1580/3, Czech Republic http://people.ciirc.cvut.cz/hlavac, vaclav.hlavac@cvut.cz also Center for Machine Perception, http://cmp.felk.cvut.cz Outline of the talk: Convolution as filtration in frequency domain. Low pass filtering examples, sharp cut off, smooth Gaussian. High pass filtering examples, sharp cut off, smooth Gaussian. Butterworth filter. Homomorphic filter separating illumination and reflectance. Systematic design of 2D FIR filters.
  • 2. 2/25 Filtration in the frequency domain 1. F(u, v) = F{f(x, y)} 2. G(u, v) = H(u, v) . ∗ F(u, v), where .∗ denotes element-wise multiplication of matrices. 3. g(x, y) = F−1 {G(u, v)} Note for lab exercises: We usually use ln kF(u, v)k for visualization purposes. The original spectrum F(u, v) has to be used in the actual filtration.
  • 3. 3/25 Convolution as Fourier spectrum frequency filtration Matrix element by element multiplication. The speed of operations is determined by the (high) speed of FFT. Consider a matrix a with dimensions M × N and a matrix b with dimensions P × Q. The convolution c = a ∗ b can be calculated as follows: 1. Fill in matrices a, b by zeroes to have dimensions M + P − 1, N + Q − 1 (usually up to the order of 2 to ease FFT). 2. Calculate 2D FFT matic of matrices a, b (in MATLAB, using fft2). The outcome are matrices A, B. 3. Multiply complex Fourier spectra element-wise, C = A . ∗ B. 4. The result of the convolution c is obtained by the inverse Fourier transformation (in MATLAB using ifft2).
  • 4. 4/25 2D convolution in frequency domain in MATLAB A = magic(3); B = ones(3); A(8,8) = 0; % zero–pad A to be 8–by–8 B(8,8) = 0; % zero–pad B to be 8–by–8 C = ifft2(fft2(A).*fft2(B)); C = C(1:5,1:5); % extract the nonzero portion C = real(C) % remove imaginary part caused by roundoff error C =        8.0000 9.0000 15.0000 7.0000 6.0000 11.0000 17.0000 30.0000 19.0000 13.0000 15.0000 30.0000 45.0000 30.0000 15.0000 7.0000 21.0000 30.0000 23.0000 9.0000 4.0000 13.0000 15.0000 11.0000 2.0000        Note: the convolution calculated via spectra is faster in MATLAB for large matrices. The calculation via conv2, filt2 is faster for small matrices.
  • 5. 5/25 Low pass filter, circle sharp cut-off, r=5, 15, 50 original filter output in gray output in pseudocolor
  • 6. 6/25 Low pass Gaussian filter, σ = 10, 30 original filter output in gray output in pseudocolor
  • 7. 7/25 High pass circle sharp cut-off, r=5, 15 original filter output in gray output in pseudocolor
  • 8. 8/25 High pass Gaussian filter, σ=10, 30 original filter output in gray output in pseudocolor
  • 12. 12/25 Low pass filter, Butterworth (1) Butterworth filter has the frequency spectrum with the smallest rippling, which converges to zero for maximal frequences (S. Buttherworth, 1930). Shifted log(abs(FFT)) of the original image 200 400 600 800 1000 100 200 300 400 500 600 700 −2 0 2 4 6 8 10 12 Input image Its frequency spectrum
  • 13. 13/25 Low pass filter, Butterworth (2) Shifted log(abs(FFT)) of the filtered image 200 400 600 800 1000 100 200 300 400 500 600 700 −6 −4 −2 0 2 4 6 8 10 12 Butterworth low pass filter FFT of the filtered image H(u, v) = 1 1+ D(u,v) D0 2 n , where D(u, v) = √ u2 + v2. n is the filter degree. D0 is the frequency corresponding to the decrease of intensity by 3dB.
  • 14. 14/25 Low pass filter, Butterworth (3) Input image Its frequency spectrum
  • 15. 15/25 Homomorphic filter (1) The aim: to normalize the intensity across the entire image and to increase contrast. The method is based on the following assumptions: Illumination i changes in the image very slowly (low frequencies), Reflectance r changes in a more fast fashion, because the scene is usually rather diverse. The image can be decomposed (factorized) in each pixel into a product of two components – illumination i and reflectance r: f(x, y) = i(x, y) r(x, y). The key idea: the logarithm function can be used to separate the illumination and the reflectance components.
  • 16. 16/25 Homomorphic filter (2) z(x, y) = ln f(x, y) = ln i(x, y) + ln r(x, y) Fourier spectrum Z(u, v) = I(u, v) + R(u, v) Filtering in the frequency domain S(u, v) = H(u, v)Z(u, v) = H(u, v)I(u, v) + H(u, v)R(u, v) Inverse transformation back into spatial coordinates s(x, y) = F−1 {S(u, v)} and return to original gray scale from the logarithmic one g(x, y) = exp (s(x, y)) The outcome is the suppression in the illumination changes in the scene and the improvement of the reflectance component.
  • 17. 17/25 Homomorphic filters 50 100 150 200 0 0.2 0.4 0.6 0.8 1 1.2 1.4 homomorphic filter Standard high−pass filter Note: The filter is used to modify Z(u, v), not the original spectrum F(u, v)!
  • 18. 18/25 Outcome of homomorphic filtration Original image. Filtered image.
  • 19. 19/25 Design of 2D FIR filters The 2D Infinite Impulse Response (IIR) filters are not used because of their instability. (causality is not secured). Finite Impulse Response (FIR) filters can be easily represented as a matrix of coefficients. The implementation is easy. 2D FIR filters are natural generalization of 1D FIR filters. FIR filters can be designed to have linear phase, which reduces distortions. Three design methods are usually used: 1. Frequency transformation method transforms a 1D filter into 2D. 2. Frequency sampling method creates the filter according to the desired frequency response. 3. Windowing method composes the filter from the ideal impulse response and the smoothing window.
  • 20. 20/25 Frequency transformation method The established methods for designing 1D filters can be used. The 1D filter is converted into 2D by making the filter center symmetric. A good method. A MATLAB example (Parks-McClellan optimal design): b = remez(10,[0 0.4 0.6 1],[1 1 0 0]); h = ftrans2(b); [H,w] = freqz(b,1,64,’whole’); colormap(jet(64)) plot(w/pi–1,fftshift(abs(H))) figure, freqz2(h,[32 32])
  • 22. 22/25 Frequency sampling method The desired frequency response is given. The filter is created in the matrix form securing that the response passes given frequency response points. The behavior can be arbitrary outside the given points. Oscillations are common. MATLAB example (design of the 11 × 11 filter) Hd = zeros(11,11); Hd(4:8,4:8) = 1; [f1,f2] = freqspace(11,’meshgrid’); mesh(f1,f2,Hd), axis([-1 1 -1 1 0 1.2]), colormap(jet(64)) h = fsamp2(Hd); figure, freqz2(h,[32 32]), axis([-1 1 –1 1 0 1.2])
  • 24. 24/25 Windowing method The ideal response of the filter smoothes the coefficients in the windos. The ideal filter is approximated. The results are usually better than the results of the Frequency Sampling Method. Hd = zeros(11,11); Hd(4:8,4:8) = 1; [f1,f2] = freqspace(11,’meshgrid’); mesh(f1,f2,Hd), axis([–1 1 –1 1 0 1.2]), colormap(jet(64)) h = fwind1(Hd,hamming(11)); figure, freqz2(h,[32 32]), axis([–1 1 –1 1 0 1.2])
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76. Shifted log(abs(FFT)) of the original image 200 400 600 800 1000 100 200 300 400 500 600 700 −2 0 2 4 6 8 10 12
  • 77.
  • 78. Shifted log(abs(FFT)) of the filtered image 200 400 600 800 1000 100 200 300 400 500 600 700 −6 −4 −2 0 2 4 6 8 10 12
  • 79.
  • 80.
  • 81.
  • 82. 50 100 150 200 0 0.2 0.4 0.6 0.8 1 1.2 1.4 homomorphic filter Standard high−pass filter