dream

Download DREAM

If you can't read please download the document

Upload: doli

Post on 10-Jan-2016

37 views

Category:

Documents


2 download

DESCRIPTION

DREAM. IDEA. PLAN. IMPLEMENTATION. Introduction to Image Processing. Present to: Amirkabir University of Technology (Tehran Polytechnic) & Semnan University. Dr. Kourosh Kiani Email: [email protected] Email: [email protected] Email : [email protected] - PowerPoint PPT Presentation

TRANSCRIPT

Slide 1

DREAMPLANIDEAIMPLEMENTATION1

23Introduction to Image ProcessingDr. Kourosh KianiEmail: [email protected]: [email protected]: [email protected]: www.kouroshkiani.com

Present to:Amirkabir University of Technology (Tehran Polytechnic) & Semnan University

Lecture 10 42D Discrete Fourier Transform(DFT) The two-dimensional Fourier transform and its inverseFourier transform (discrete case) DFt

Inverse Fourier transform:

u, v : the transform or frequency variablesx, y : the spatial or image variables

DFT-6.80 + 7.89i 17.8 - 12.76i17.8 -7.89i -6.8 - 7.89i103.00 19.28 + 9.2i 2.05+ 20.34i5.07 - 13.76i -5.09+- 13.76i9.28-10.82i 8.43 + 1.31i9.22 + 14.89i 6.09 + 3.25i-3.55 +13.88i-0.78+ 8i-3.55 13.88i6.09 - 3.25i9.22 - 14.89i8.43 - 1.31i-0.78+ 8i -5.09 + 13.76i5.07 + 2.13i2.05 - 1.83i19.28 - 9.2i9.28-10.82i

103.0010.4121.9021.9010.4114.2614.675.5020.4421.368.0414.336.9017.518.538.048.5317.516.9014.3314.2621.3620.445.5014.67|F|=abs(F)=2.011.021.341.341.021.151.170.741.311.330.911.160.841.240.930.910.931.240.841.161.151.331.310.741.17log10 |F|=log10(abs(F)) =0.00- 2.28-0.620.622.28-0.861.93-0.401.470.45-1.671.820.491.020.151.67-0.15-1.02 -0.49-1.820.86-0.45-1.470.40-1.93angleF = 0.00- 130.76- 5.6435.64130.76-49.39110.30- 2.7484.2625.51- 95.57104.3328.0858.238.8695.57- 8.8658.23--28.08- 04.3349.39 -25.51 - 84.2622.74110.30-radToDegF=

Inverse Fourier transform-6.80 + 7.89i 17.8 - 12.76i17.8 -7.89i -6.8 - 7.89i103.00 19.28 + 9.2i 2.05+ 20.34i5.07 - 13.76i -5.09+- 13.76i9.28-10.82i 8.43 + 1.31i9.22 + 14.89i 6.09 + 3.25i-3.55 +13.88i-0.78+ 8i-3.55 13.88i6.09 - 3.25i9.22 - 14.89i8.43 - 1.31i-0.78+ 8i -5.09 + 13.76i5.07 + 2.13i2.05 - 1.83i19.28 - 9.2i9.28-10.82i

Inverse Fourier transformMagnitude and Phase of DFTWhat is more important?

magnitudephaseMagnitude and Phase of DFT

Reconstructed image using magnitude only

Reconstructed image using phase only

originalamplitudephase

Magnitude and Phase of DFTExample: DFT of 2D rectangle function

Fourier spectrumInput functionSpectrum displayed as an intensity functionExtending DFT to 2D

2D cos/sin functions

2D - DFTBase-functions are waves

uv

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 domainFourier transform works globallyNo direct relationship between a specific components in an image and frequencies

Intuition about frequencyFrequency contentRate of change of gray levels in an imageExample: Removing undesirable frequencies

remove highfrequenciesreconstructedsignalfrequenciesnoisy signalTo remove certain frequencies, set their corresponding F(u) coefficients to zero!

How do frequencies show up in an Signal?Low frequencies correspond to slowly varying information High frequencies correspond to quickly varying informationHow 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)

How do frequencies show up in an image?

How do frequencies show up in an image?

How do frequencies show up in an image?How do frequencies show up in an image?

How do frequencies show up in an image?

How do frequencies show up in an image?

How do frequencies show up in an image?The 2D DFT and its inverseCentered spectrum for display

2-D Fourier transformFrequency axis

xyuvuvFshift0

Low and high frequenciesLowHighLowLowHigh LowLowLowLowLowHigh Frequencies of the 2D DFT Periodicity of 2-D DFTFor 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.We display only in this range

0N2N-N0M2M-M2-D DFT:f(x,y)

Conventional Display for 2-D DFTHigh frequency areaLow frequency areaF(u ,v) has low frequency areasat corners of the image while highfrequency areas are at the centerof the image which is inconvenientto interpret.

2-D FFT Shift : Better Display of 2-D DFT

2D FFTSHIFT2-D FFT Shift is a MATLAB function: Shift the zero frequency of F(u,v) to the center of an image.High frequency areaLow frequency areaOriginal displayof 2D DFT

0N2N-N0M2M-MDisplay of 2D DFTAfter FFT Shift2-D FFT Shift : How it worksExample of 2-D DFT

Original image2D DFT2D FFT ShiftExample of 2-D DFT

Original image2D DFT2D FFT ShiftSpectrum shift

Original imageLog enhancedtransformShifted log enhancedtransform

Computing DFTUse the two-dimensional FFT command E=fft2(A)Puts center of the beam in the cornersUse the fftshift command to put it into the center

A=imread(slit, gif)fft2( A )fftshift( fft2( A ) )DFT Properties: RotationRotating f(x,y) by rotates F(u,v) by

DFTDFTDFT Properties: RotationThe Property of Two-Dimensional DFT Linear CombinationDFTDFT

DFTAB0.25 * A + 0.75 * BTwo-Dimensional DFT with Different FunctionsSine wave Rectangle

Its DFT Its DFT

Two-Dimensional DFT with Different Functions2D Gaussianfunction ImpulsesIts DFT Its DFT

Two-Dimensional DFT with Different Functions2D Gaussianfunction ImpulsesIts DFT Its DFT

Relation Between Spatial and Frequency Resolutions

whereDx = spatial resolution in x directionDy = spatial resolution in y direction

Du = frequency resolution in x directionDv = frequency resolution in y directionN,M = image width and height( Dx and Dy are pixel width and height. )How to Perform 2-D DFT by Using 1-D DFTf(x,y)1-D DFTby rowF(u,y)1-D DFTby columnF(u,v)How to Perform 2-D DFT by Using 1-D DFTf(x,y)1-D DFTby rowF(x,v)1-D DFTby columnF(u,v)Alternative methodFiltering in the Frequency Domain with FFT shiftf(x,y)2D FFTFFT shiftF(u,v)FFT shift2D IFFTXH(u,v)(User defined)G(u,v)g(x,y)In this case, F(u,v) and H(u,v) must have the same size and have the zero frequency at the center.

Smoothing filters: GaussianThe weights are samples of the Gaussian function

mask size: = 1.4Smoothing filters: Gaussian

As increases, more samples must be obtained to represent the Gaussian function accurately.Therefore, controls the amount of smoothing

= 3Smoothing filters: Gaussian

Fourier Low Pass FilteringGaussian Low Pass Filter

Low pass filtering

Low pass filtering

Fourier High Pass FilteringLinear filtering and convolution

DFTIDFTHigh pass filtering

High pass filteringExample of noise reduction using DFT

Questions? Discussion? Suggestions ?

102Thank you