1 / 11

Frequancy Domain Filtering (FDF)

Frequancy Domain Filtering (FDF). Lab 5. U sing FFT (Fast Fourier Transform ) algorithm DFT (Discrete Fourier Transform) & inverse DFT. Image Operation in Frequency D omain. Fourier Transform. MATLAB provides a collection of functions for computing and working with Fourier transforms .

magar
Download Presentation

Frequancy Domain Filtering (FDF)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Frequancy Domain Filtering (FDF) Lab 5

  2. Using FFT (Fast Fourier Transform ) algorithm • DFT (Discrete Fourier Transform) & inverse DFT

  3. Image Operation in Frequency Domain

  4. Fourier Transform • MATLAB provides a collection of functions for computing and working with Fourier transforms.

  5. fft2 • Y=fft2(X); % X is the spatial image • It Computes and returns a Discrete Fourier transform(DFT) of an image X, computed with Fast Fourier Transform (FFT) algorithm. • Y is the same size of X • The origin of Y(DFT) is at top left, with four quarter meeting at the center of the frequency.

  6. abs • S = abs(Y); • Used to obtain the Fourier spectrum. • It computes the magnitude of each element in the DFT.

  7. fftshift • Yc = fftshift(Y); • Used to move the origin of the DFT to the center(used to compute the centered DFT).

  8. Computing and visualizing the 2D DFT in MATLAB >> X = imread(‘………’); % load in spatial image >> Y = fft2(X); % compute DFT >> S = abs(Y); % compute magnitude for display >> imshow(S,[]); % shows in four corners of display, you can write it as imshow( abs(Y), [] ); >> Yc = fftshift(Y); % shift DFT to center >> imshow(abs(Yc) , [] ); % show magnitude of DFT in center

  9. NOTE • imshow(I,[low high]) displays the grayscale image I • The value low (and any value less than low) displays as black. • the value high (and any value greater than high) displays as white. • Values in between are displayed as intermediate shades of gray. • If you use an empty matrix [] for [low high], imshow uses [min(I(:)) max(I(:))]; that is: • the minimum value in I is displayed as black. • the maximum value in I is displayed as white.

  10. DFT in center can be visually enhanced(increase visual details) by log transformationc*log(1+double(f)) >> Yc2 = log(1 + abs(Yc) ); >> imshow(Yc2, [] ); % or imshow(abs(Yc2), [] );

  11. ifftshift • Y=ifftshift(Yc) • It reverses the centering. • Used to move the origin of the DFT from the center to the top left.

More Related