Linear Filtering – Part II Selim Aksoy Department of Computer Engineering Bilkent University

Slides:



Advertisements
Similar presentations
Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
Advertisements

Content-Based Image Retrieval Selim Aksoy Department of Computer Engineering Bilkent University
Binary Image Analysis Selim Aksoy Department of Computer Engineering Bilkent University
Department of Computer Engineering
Linear Filtering – Part II Selim Aksoy Department of Computer Engineering Bilkent University
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean Hall 5409 T-R 10:30am – 11:50am.
Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
Binary Image Analysis Selim Aksoy Department of Computer Engineering Bilkent University
Content-Based Image Retrieval Selim Aksoy Department of Computer Engineering Bilkent University
Linear Filtering – Part II Selim Aksoy Department of Computer Engineering Bilkent University
Edge Detection Selim Aksoy Department of Computer Engineering Bilkent University
Digital Image Fundamentals Selim Aksoy Department of Computer Engineering Bilkent University
Digital Image Fundamentals Selim Aksoy Department of Computer Engineering Bilkent University
Linear Filtering – Part II Selim Aksoy Department of Computer Engineering Bilkent University
3-D Computational Vision CSc Image Processing II - Fourier Transform.
Edge Detection Selim Aksoy Department of Computer Engineering Bilkent University
Binary Image Analysis Selim Aksoy Department of Computer Engineering Bilkent University
Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
Ted Adelson’s checkerboard illusion. Motion illusion, rotating snakes.
Pyramids and Texture. Scaled representations Big bars and little bars are both interesting Spots and hands vs. stripes and hairs Inefficient to detect.
Thinking in Frequency Computer Vision Brown James Hays Slides: Hoiem, Efros, and others.
Computer Vision University of Illinois Derek Hoiem
Image Processing and Analysis (ImagePandA) 5 – Image Restoration and Reconstruction Christoph Lampert / Chris Wojtan Based on slides by Selim Aksoy, Bilkent.
Linear Filtering – Part II Selim Aksoy Department of Computer Engineering Bilkent University
Convolution, Edge Detection, Sampling : Computational Photography Alexei Efros, CMU, Fall 2006 Some slides from Steve Seitz.
Immagini e filtri lineari. Image Filtering Modifying the pixels in an image based on some function of a local neighborhood of the pixels
CSCE 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Fourier Analysis Without Tears : Computational Photography Alexei Efros, CMU, Fall 2005 Somewhere in Cinque Terre, May 2005.
CPSC 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Computer Vision - A Modern Approach Set: Pyramids and Texture Slides by D.A. Forsyth Scaled representations Big bars (resp. spots, hands, etc.) and little.
The Frequency Domain : Computational Photography Alexei Efros, CMU, Fall 2008 Somewhere in Cinque Terre, May 2005 Many slides borrowed from Steve.
Computational Photography: Fourier Transform Jinxiang Chai.
Fourier Analysis : Rendering and Image Processing Alexei Efros.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
CSC589 Introduction to Computer Vision Lecture 9 Sampling, Gaussian Pyramid Bei Xiao.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
CSE 185 Introduction to Computer Vision Image Filtering: Frequency Domain.
Applications of Image Filters Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/04/10.
CSC589 Introduction to Computer Vision Lecture 7 Thinking in Frequency Bei Xiao.
Image Processing © 2002 R. C. Gonzalez & R. E. Woods Lecture 4 Image Enhancement in the Frequency Domain Lecture 4 Image Enhancement.
Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos VC 14/15 – TP6 Frequency Space Miguel Tavares Coimbra.
Thinking in Frequency Computational Photography University of Illinois Derek Hoiem 09/01/15.
Lecture 7: Sampling Review of 2D Fourier Theory We view f(x,y) as a linear combination of complex exponentials that represent plane waves. F(u,v) describes.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
Recap of Monday linear Filtering convolution differential filters filter types boundary conditions.
Image as a linear combination of basis images
Lecture 5: Fourier and Pyramids
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
Frequency domain analysis and Fourier Transform
Jean Baptiste Joseph Fourier
The Frequency Domain, without tears
Image Resampling & Interpolation
Computer Vision Brown James Hays 09/16/11 Thinking in Frequency Computer Vision Brown James Hays Slides: Hoiem, Efros, and others.
Sampling, Template Matching and Pyramids
Linear Filtering – Part II
Lecture 1.26 Spectral analysis of periodic and non-periodic signals.
Department of Computer Engineering
Image Enhancement in the
Filtering – Part I Gokberk Cinbis Department of Computer Engineering
Miguel Tavares Coimbra
Frequency domain analysis and Fourier Transform
CSCE 643 Computer Vision: Thinking in Frequency
Instructor: S. Narasimhan
Oh, no, wait, sorry, I meant, welcome to the implementation of 20th-century science fiction literature, or a small part of it, where we will learn about.
Fourier Analysis Without Tears
Department of Computer Engineering
Image Resampling & Interpolation
Department of Computer Engineering
Thinking in Frequency Computational Photography University of Illinois
Presentation transcript:

Linear Filtering – Part II Selim Aksoy Department of Computer Engineering Bilkent University

CS 484, Spring 2010©2010, Selim Aksoy2 Fourier theory Jean Baptiste Joseph Fourier had a crazy idea: Any periodic function can be written as a weighted sum of sines and cosines of different frequencies (1807). Don’t believe it? Neither did Lagrange, Laplace, Poisson, … But it is true!  Fourier series Even functions that are not periodic (but whose area under the curve is finite) can be expressed as the integral of sines and cosines multiplied by a weighing function.  Fourier transform

CS 484, Spring 2010©2010, Selim Aksoy3 Fourier theory The Fourier theory shows how most real functions can be represented in terms of a basis of sinusoids. The building block: A sin( ωx + Φ ) Add enough of them to get any signal you want. Adapted from Alexei Efros, CMU

CS 484, Spring 2010©2010, Selim Aksoy4 Fourier transform

CS 484, Spring 2010©2010, Selim Aksoy5 Fourier transform

CS 484, Spring 2010©2010, Selim Aksoy6 Fourier transform

CS 484, Spring 2010©2010, Selim Aksoy7 Fourier transform

CS 484, Spring 2010©2010, Selim Aksoy8 Fourier transform

CS 484, Spring 2010©2010, Selim Aksoy9 Fourier transform

CS 484, Spring 2010©2010, Selim Aksoy10 Fourier transform Adapted from Alexei Efros, CMU

CS 484, Spring 2010©2010, Selim Aksoy11 Fourier transform Adapted from Gonzales and Woods

CS 484, Spring 2010©2010, Selim Aksoy12 Fourier transform Adapted from Gonzales and Woods

CS 484, Spring 2010©2010, Selim Aksoy13 Fourier transform

CS 484, Spring 2010©2010, Selim Aksoy14 Fourier transform

CS 484, Spring 2010©2010, Selim Aksoy15 Fourier transform Adapted from Shapiro and Stockman

CS 484, Spring 2010©2010, Selim Aksoy16 Fourier transform Example building patterns in a satellite image and their Fourier spectrum.

CS 484, Spring 2010©2010, Selim Aksoy17 Convolution theorem

CS 484, Spring 2010©2010, Selim Aksoy18 Frequency domain filtering Adapted from Shapiro and Stockman, and Gonzales and Woods

CS 484, Spring 2010©2010, Selim Aksoy19 Frequency domain filtering Since the discrete Fourier transform is periodic, padding is needed in the implementation to avoid aliasing (see section 4.6 in the Gonzales-Woods book for implementation details).

CS 484, Spring 2010©2010, Selim Aksoy20 Frequency domain filtering f(x,y) h(x,y) g(x,y)   |F(u,v)| |H(u,v)| |G(u,v)|   Adapted from Alexei Efros, CMU

CS 484, Spring 2010©2010, Selim Aksoy21 Smoothing frequency domain filters Adapted from Gonzales and Woods

CS 484, Spring 2010©2010, Selim Aksoy22 Smoothing frequency domain filters

CS 484, Spring 2010©2010, Selim Aksoy23 Smoothing frequency domain filters The blurring and ringing caused by the ideal low- pass filter can be explained using the convolution theorem where the spatial representation of a filter is given below.

CS 484, Spring 2010©2010, Selim Aksoy24 Smoothing frequency domain filters Adapted from Gonzales and Woods

CS 484, Spring 2010©2010, Selim Aksoy25 Smoothing frequency domain filters

CS 484, Spring 2010©2010, Selim Aksoy26 Sharpening frequency domain filters

CS 484, Spring 2010©2010, Selim Aksoy27 Sharpening frequency domain filters Adapted from Gonzales and Woods

CS 484, Spring 2010©2010, Selim Aksoy28 Sharpening frequency domain filters Adapted from Gonzales and Woods

CS 484, Spring 2010©2010, Selim Aksoy29 Sharpening frequency domain filters Adapted from Gonzales and Woods

CS 484, Spring 2010©2010, Selim Aksoy30 Template matching Correlation can also be used for matching. If we want to determine whether an image f contains a particular object, we let h be that object (also called a template) and compute the correlation between f and h. If there is a match, the correlation will be maximum at the location where h finds a correspondence in f. Preprocessing such as scaling and alignment is necessary in most practical applications.

CS 484, Spring 2010©2010, Selim Aksoy31 Template matching Adapted from Gonzales and Woods

CS 484, Spring 2010©2010, Selim Aksoy32 Template matching Face detection using template matching: face templates.

CS 484, Spring 2010©2010, Selim Aksoy33 Template matching Face detection using template matching: detected faces.

CS 484, Spring 2010©2010, Selim Aksoy34 Resizing images How can we generate a half-sized version of a large image? Adapted from Steve Seitz, U of Washington

CS 484, Spring 2010©2010, Selim Aksoy35 Resizing images Throw away every other row and column to create a 1/2 size image (also called sub-sampling). 1/4 1/8 Adapted from Steve Seitz, U of Washington

CS 484, Spring 2010©2010, Selim Aksoy36 Resizing images Does this look nice? 1/4 (2x zoom)1/8 (4x zoom)1/2 Adapted from Steve Seitz, U of Washington

CS 484, Spring 2010©2010, Selim Aksoy37 Resizing images We cannot shrink an image by simply taking every k’th pixel. Solution: smooth the image, then sub-sample. Gaussian 1/4 Gaussian 1/8 Gaussian 1/2 Adapted from Steve Seitz, U of Washington

CS 484, Spring 2010©2010, Selim Aksoy38 Resizing images Gaussian 1/4 (2x zoom) Gaussian 1/8 (4x zoom) Gaussian 1/2 Adapted from Steve Seitz, U of Washington

CS 484, Spring 2010©2010, Selim Aksoy39 Sampling and aliasing Adapted from Steve Seitz, U of Washington

CS 484, Spring 2010©2010, Selim Aksoy40 Sampling and aliasing Errors appear if we do not sample properly. Common phenomenon: High spatial frequency components of the image appear as low spatial frequency components. Examples: Wagon wheels rolling the wrong way in movies. Checkerboards misrepresented in ray tracing. Striped shirts look funny on color television.

CS 484, Spring 2010©2010, Selim Aksoy41 Gaussian pyramids Adapted from Gonzales and Woods

CS 484, Spring 2010©2010, Selim Aksoy42 Gaussian pyramids Adapted from Michael Black, Brown University

CS 484, Spring 2010©2010, Selim Aksoy43 Gaussian pyramids Adapted from Michael Black, Brown University