1.03k likes | 1.24k Views
DREAM. IDEA. PLAN. IMPLEMENTATION. Introduction to Image Processing. Present to: Amirkabir University of Technology (Tehran Polytechnic) & Semnan University. Dr. Kourosh Kiani Email: kkiani2004@yahoo.com Email: Kourosh.kiani@aut.ac.ir Email : Kourosh.kiani@semnan.ac.ir
E N D
DREAM IDEA PLAN IMPLEMENTATION
Introduction to Image Processing Present to:Amirkabir University of Technology (Tehran Polytechnic) & Semnan University Dr. Kourosh Kiani Email: kkiani2004@yahoo.com Email: Kourosh.kiani@aut.ac.ir Email: Kourosh.kiani@semnan.ac.ir Web: www.kouroshkiani.com
Lecture 10 2D Discrete Fourier Transform (DFT)
The two-dimensional Fourier transform and its inverse • Fourier transform (discrete case) DFt • Inverse Fourier transform: • u, v : the transform or frequency variables • x, y : the spatial or image variables
|F|=abs(F)= log10 |F|=log10(abs(F)) =
angleF = radToDegF=
Magnitude and Phase of DFT • What is more important? magnitude phase
Magnitude and Phase of DFT Reconstructed image using magnitude only Reconstructed image using phase only
Magnitude and Phase of DFT amplitude phase original
Example: DFT of 2D rectangle function Input function Fourier spectrum Spectrum displayed as an intensity function
Extending DFT to 2D 2D cos/sin functions
2D - DFT Base-functions are waves v u
Why is DFT Useful? • Easier to remove undesirable frequencies. • Faster perform certain operations in the frequency domain than in the spatial domain.
Properties in the frequency domain • Fourier transform works globally • No direct relationship between a specific components in an image and frequencies • Intuition about frequency • Frequency content • Rate of change of gray levels in an image
Example: Removing undesirable frequencies frequencies noisy signal To remove certain frequencies, set their corresponding F(u) coefficients to zero! remove high frequencies reconstructed signal
How do frequencies show up in an Signal? • Low frequencies correspond to slowly varying information • High frequencies correspond to quickly varying information
How do frequencies show up in an image? • Low frequencies correspond to slowly varying information (e.g., continuous surface). • High frequencies correspond to quickly varying information (e.g., edges)
The 2D DFT and its inverse • Centered spectrum for display
2-D Fourier transform • Frequency axis 0 x u u F shift y v v
Low and high frequencies Frequencies of the 2D DFT High Low Low Low Low Low High High Low Low Low
Periodicity of 2-D DFT f(x,y) 2-D DFT: -M For an image of size NxM pixels, its 2-D DFT repeats itself every N points in x-direction and every M points in y-direction. 0 M We display only in this range 2M -N 0 N 2N
Conventional Display for 2-D DFT F(u ,v) has low frequency areas at corners of the image while high frequency areas are at the center of the image which is inconvenient to interpret. High frequency area Low frequency area
2-D FFT Shift : Better Display of 2-D DFT 2-D FFT Shift is a MATLAB function: Shift the zero frequency of F(u,v) to the center of an image. 2D FFTSHIFT High frequency area Low frequency area
2-D FFT Shift : How it works -M 0 Display of 2D DFT After FFT Shift M Original display of 2D DFT 2M -N 0 N 2N