EECE253_08_FrequencyFiltering

EECE253_08_FrequencyFiltering - EECE\CS 253 Image...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
EECE\CS 253 Image Processing Richard Alan Peters II Department of Electrical Engineering and Computer Science Fall Semester 2007 Lecture Notes Lecture Notes: Frequency Filtering This work is licensed under the Creative Commons Attribution-Noncommercial 2.5 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc/2.5/ or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
December 6, 2011 2 December 6, 2011 2 1999-2007 by Richard Alan Peters Convolution Property of the Fourier Transform . } { Moreover, . } { Then, ). , ( and ) , ( Transforms Fourier have ) , ( and ) , ( functions Let G F g f G F g f v u G v u F c r g c r f = = F F The Fourier Transform of a  convolution equals the product of the  Fourier Transforms.  Similarly, the  Fourier Transform of a convolution is  the product of the Fourier Transforms The Fourier Transform of a  convolution equals the product of the  Fourier Transforms.  Similarly, the  Fourier Transform of a convolution is  the product of the Fourier Transforms * = convolution · = multiplication
Background image of page 2
December 6, 2011 3 December 6, 2011 3 1999-2007 by Richard Alan Peters Convolution via Fourier Transform Transforms Pixel-wise Product Inverse Transform
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
December 6, 2011 4 December 6, 2011 4 1999-2007 by Richard Alan Peters 1. Read the image from a file into a variable, say I . 2. Read in or create the convolution mask, h . 3. Compute the sum of the mask: s = sum(sum(h)); 4. If s == 0, set s = 1; 5. Create: H = zeros(size(I)) ; 6. Copy h into the middle of H . 7. Shift H into position: H = ifftshift(H); 8. Take the 2D FT of I and H : FI=fft2(I); FH=fft2(H); 9. Pointwise multiply the FTs: FJ=FI.*FH; 10. Compute the inverse FT: J = real(ifft2(FJ)); 11. Normalize the result: J = J/s; How to Convolve via FT in Matlab For color images you may need to  do each step for each band  separately. For color images you may need to  do each step for each band  separately. The mask is usually 1-band The mask is usually 1-band
Background image of page 4
December 6, 2011 5 December 6, 2011 5 1999-2007 by Richard Alan Peters Coordinate Origin of the FFT Center = (floor( R /2)+1, floor( C /2)+1) Center = (floor( R /2)+1, floor( C /2)+1) Even Even Odd Odd Image Origin Weight Matrix Origin Image Origin Weight Matrix Origin After FFT shift After IFFT shift After FFT shift After IFFT shift
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
6 December 6, 2011 6 1999-2007 by Richard Alan Peters 5 6 4 8 9 7 2 3 1 1 2 3 4 5 6 7 8 9 Matlab’s fftshift and ifftshift J = fftshift(I): I ( 1 , 1 ) J ( R /2 + 1 , C /2 + 1 ) I = ifftshift(J): J ( R /2 + 1 , C /2 + 1 ) I ( 1 , 1 ) where x = floor(x) = the largest integer smaller than x . 1
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 46

EECE253_08_FrequencyFiltering - EECE\CS 253 Image...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online