applying the dft & idft on image

3
Applying the DFT and IDFT on the image matrix DFT Discrete Fourier transform [ From Wikipedia, the free encyclopedia] The DFT is the most important discrete transform, used to perform Fourier analysis in many practical applications. In digital signal processing, the function is any quantity or signal that varies over time, such as the pressure of a sound wave, a radio signal, or daily temperature readings, sampled over a finite time interval (often defined by a window function). In image processing, the samples can be the values of pixels along a row or column of a raster image. The DFT is also used to efficiently solve partial differential equations, and to perform other operations such as convolutions or multiplying large integers. IDFT Inverse Discrete Fourier transform The inverse Fourier transform maps the signal back from the frequency domain into the time domain. MATLAB Code: clc; close all; sum=0;

Upload: preethi-sj

Post on 15-Jan-2016

219 views

Category:

Documents


0 download

DESCRIPTION

tms320c6713

TRANSCRIPT

Page 1: Applying the DFT & IDFT on Image

03/05/2015 Applying the DFT & IDFT on image

http://trackdcode.com/applying­the­dft­idft­on­the­image­matrix/ 2/5

Applying the DFT and IDFT on the image matrix

DFT – Discrete Fourier transform [ From Wikipedia, the free encyclopedia]

The DFT is the most important discrete transform, used to perform Fourier analysis in many practical applications.In digital signal processing, the function is any quantity or signal that varies over time, such as the pressureof a sound wave, a radio signal, or daily temperature readings, sampled over a finite time interval (oftendefined by a window function). In image processing, the samples can be the values of pixels along a row orcolumn of a raster image. The DFT is also used to efficiently solve partial differential equations, and to performother operations such as convolutions or multiplying large integers.

IDFT – Inverse Discrete Fourier transform

The inverse Fourier transform maps the signal back from the frequency domain into the time domain.

MATLAB Code:

clc;close all;sum=0;

Page 2: Applying the DFT & IDFT on Image

03/05/2015 Applying the DFT & IDFT on image

http://trackdcode.com/applying­the­dft­idft­on­the­image­matrix/ 3/5

a=imread(‘D:\msc\dip\img1.jpg’);

b=a;M=50;N=50;

for x=1:50for y=1:50b(x,y)=a(x,y);endendc=double(b);

for u=1:Mfor v=1:Ns=0;for x=1:Mfor y=1:Ns=s+c(x,y)*exp(1*j*2*pi*(((u*x)/M)+((v*y)/N)));endend

F(u,v)=s;endend

for x=1:Mfor y=1:Ns=0;for u=1:Mfor v=1:Ns=s+F(u,v)*exp(-1*j*2*pi*(((u*x)/M)+((v*y)/N)));endend

inf(x,y)=s/(M*N);endend

subplot(2,2,1);imshow(uint8(c));title(‘ORIGINAL IMAGE’);

subplot(2,2,2);imshow(uint8(F));title(‘DFT IMAGE’);

Page 3: Applying the DFT & IDFT on Image

03/05/2015 Applying the DFT & IDFT on image

http://trackdcode.com/applying­the­dft­idft­on­the­image­matrix/ 4/5

PREVIOUS NEXT

subplot(2,1,2);imshow(uint8(inf));title(‘IDFT IMAGE’);

 

Output of DFT and IDFT on image matrix

 

 

1