3-D Computational Vision CSc 83020 Image Processing II - Fourier Transform.

Slides:



Advertisements
Similar presentations
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean Hall 5409 T-R 10:30am – 11:50am.
Advertisements

Computer Vision Lecture 7: The Fourier Transform
Image Enhancement in the Frequency Domain (2)
3-D Computer Vision CSc83020 / Ioannis Stamos  Revisit filtering (Gaussian and Median)  Introduction to edge detection 3-D Computater Vision CSc
November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Chap 4 Image Enhancement in the Frequency Domain.
Fourier Transform – Chapter 13. Fourier Transform – continuous function Apply the Fourier Series to complex- valued functions using Euler’s notation to.
Linear Filtering – Part II Selim Aksoy Department of Computer Engineering Bilkent University
Digital Image Processing
Reminder Fourier Basis: t  [0,1] nZnZ Fourier Series: Fourier Coefficient:
Chapter 4 Image Enhancement in the Frequency Domain.
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F(  ) is the spectrum of the function.
Immagini e filtri lineari. Image Filtering Modifying the pixels in an image based on some function of a local neighborhood of the pixels
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
Image Enhancement in the Frequency Domain Part I Image Enhancement in the Frequency Domain Part I Dr. Samir H. Abdul-Jauwad Electrical Engineering Department.
CSCE 641 Computer Graphics: Fourier Transform Jinxiang Chai.
Introduction to Computer Vision CS / ECE 181B  Handout #4 : Available this afternoon  Midterm: May 6, 2004  HW #2 due tomorrow  Ack: Prof. Matthew.
2D Fourier Theory for Image Analysis Mani Thomas CISC 489/689.
1 Images and Transformations Images by Pawan SinhaPawan Sinha.
Chapter 4 Image Enhancement in the Frequency Domain.
Transforms: Basis to Basis Normal Basis Hadamard Basis Basis functions Method to find coefficients (“Transform”) Inverse Transform.
Fourier Transform and Applications
DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 4 Image Enhancement in the Frequency Domain Chapter.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
Frequency Domain Representation of Sinusoids: Continuous Time Consider a sinusoid in continuous time: Frequency Domain Representation: magnitude phase.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5409 T-R 10:30am – 11:50am.
G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Fourier Transform Basic idea.
Topic 7 - Fourier Transforms DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
DTFT And Fourier Transform
CSC589 Introduction to Computer Vision Lecture 8
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.
Filtering Robert Lin April 29, Outline Why filter? Filtering for Graphics Sampling and Reconstruction Convolution The Fourier Transform Overview.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
Digital Image Processing Chapter 4 Image Enhancement in the Frequency Domain Part I.
Digital Image Processing CSC331 Image Enhancement 1.
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.
Digital Image Processing DIGITIZATION. Summery of previous lecture Digital image processing techniques Application areas of the digital image processing.
ENG4BF3 Medical Image Processing Image Enhancement in Frequency Domain.
October 29, 2013Computer Vision Lecture 13: Fourier Transform II 1 The Fourier Transform In the previous lecture, we discussed the Hough transform. There.
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain 22 June 2005 Digital Image Processing Chapter 4: Image Enhancement in the.
7- 1 Chapter 7: Fourier Analysis Fourier analysis = Series + Transform ◎ Fourier Series -- A periodic (T) function f(x) can be written as the sum of sines.
Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos VC 15/16 – TP7 Spatial Filters Miguel Tavares Coimbra.
Lecture 7 Transformations in frequency domain 1.Basic steps in frequency domain transformation 2.Fourier transformation theory in 1-D.
2D Sampling Goal: Represent a 2D function by a finite set of points.
1 Methods in Image Analysis – Lecture 3 Fourier CMU Robotics Institute U. Pitt Bioengineering 2630 Spring Term, 2004 George Stetten, M.D., Ph.D.
Fourier Transform.
Lecture 5: Fourier and Pyramids
2D Fourier Transform.
ENEE 322: Continuous-Time Fourier Transform (Chapter 4)
Fourier transform.
Image Enhancement in the Spatial Domain.
Miguel Tavares Coimbra
Image Enhancement and Restoration
Linear Filters and Edges Chapters 7 and 8
… Sampling … … Filtering … … Reconstruction …
Linear Filtering – Part II
Image Enhancement in the
(C) 2002 University of Wisconsin, CS 559
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F() is the spectrum of the function.
Fourier Transform.
ENG4BF3 Medical Image Processing
CSCE 643 Computer Vision: Thinking in Frequency
4. Image Enhancement in Frequency Domain
Digital Image Processing
Basic Image Processing
Intensity Transformation
Lecture 4 Image Enhancement in Frequency Domain
Presentation transcript:

3-D Computational Vision CSc Image Processing II - Fourier Transform

CSc D Computer Vision / Ioannis Stamos The Fourier Transform Previous lecture: filtering in the spatial domain. A signal (i.e. scanline/audio/image) has equivalent representation in the Frequency Domain. Spatial domain Frequency domain

CSc D Computer Vision / Ioannis Stamos 1-D Continuous Fourier Transform Spatial Domain(x) => Frequency Domain (u) Note that F(u) is generally COMPLEX.

CSc D Computer Vision / Ioannis Stamos Real and imaginary part. Integration with cos/sin waves of different frequencies. Magnitude |F(u)| : Fourier Spectrum. Phase φ(u) : Phase Spectrum.

CSc D Computer Vision / Ioannis Stamos A periodic signal and its spectrum From “Digital Image Warping” by George Wolberg.

CSc D Computer Vision / Ioannis Stamos An aperiodic signal and its spectrum From “Digital Image Warping” by George Wolberg.

CSc D Computer Vision / Ioannis Stamos

Fourier Transformation & Convolution Convolution Fourier Trans. Using y=x-ξ Convolution in Spatial Domain === Multiplication in Frequency Domain.

CSc D Computer Vision / Ioannis Stamos Fourier Transform and Convolution Spatial Domain (x) g=f * h g=f x h Frequency Domain (u) G=F x H G=F * H Alternative Method of finding g(x) g = f * h G = F x H F.T IFT

CSc D Computer Vision / Ioannis Stamos Example: Smoothing f(x) x NOISY SIGNAL We want: g(x) = f(x) * h(x) (SMOOTHED) Let: Then:

Example: Smoothing h(x) x σ H(u) u 1/(2πσ) We know: G(u)=F(u) H(u) H(u) ATTENUATES high frequencies in F(u) (LOW-PASS FILTER)

Sampling Theorem f(x) x CONTINUOUS SIGNAL S(x) x … … SHAH FUNCTION x0x0 Sampled Function:

CSc D Computer Vision / Ioannis Stamos Sampling Theorem … … 1/x 0 F(u)Let: u max S(u) u A

Sampling Theorem u … … 1/x 0 S(u) F(u)Let: u max F s (u) …… Here: u max <= 1/(2*x 0 ) u u A A/x0

CSc D Computer Vision / Ioannis Stamos Sampling Theorem F s (u) …… u What if u max > 1/(2*x 0 ) ? A/x0 1/x 0

CSc D Computer Vision / Ioannis Stamos Sampling Theorem F s (u) …… u What if u max > 1/(2*x 0 ) ? 1/x 0 A/x0 ALIASING Can we recover F(u) from F s (u)?

CSc D Computer Vision / Ioannis Stamos Sampling Theorem F s (u) …… u What if u max > 1/(2*x 0 ) ? 1/x 0 A/x0 Can we recover F(u) from F s (u)? Only if u max <= 1 /(2*x 0 ) (NYQUIST FREQUENCY). ALIASING

CSc D Computer Vision / Ioannis Stamos From Shree Nayar’s notes.

Figure Left: At the top is a 256x256 pixel image showing a grid obtained by multiplying two sinusoids with linearly increasing frequency. one in x and one in y. The other images in the series are obtained by resampling by factors of two, without smoothing (i.e. the next is a 128x128, then a 64x64, etc., all scaled to the same size). Note the substantial aliasing; high spatial frequencies alias down to low spatial frequencies, and the smallest image is an extremely poor representation of the large image. Right: The magnitude of the Fourier transform of each image. displayed as a log, to compress the intensity scale. The constant component is at the center. Notice that the Fourier transform of a resampled image is obtained by scaling the Fourier transform of the original image and then tiling the plane. Interference between copies of the original Fourier transform means that we cannot recover its value at some points. this is the mechanism of aliasing. Original Image 256x256 Resampled 128x128 Resampled 64x64 Corresponding Fourier Transforms ALIASING

2-D Domain - Images Spatial Domain(x,y) => Frequency Domain (u,v) f(x,y) g(x,y) h(x,y) LSIS: δ(x,y) h(x,y) Point Spread Function

From Forsyth & Ponce Table 8.1. A variety of functions of two dimensions, and their Fourier transforms. This table can be used in two directions (with appropriate substitutions for u, v and (x, y), because the Fourier transform of the Fourier transform of a function is the function. Observant readers may suspect that the results on infite sums of δ functions contradict the linearity of Fourier transforms; by careful inspection of limits, it is possible to show that they do not. 2πi

CSc D Computer Vision / Ioannis Stamos Discrete 2-D Fourier Transform Fast Fourier Transform (FFT)!

CSc D Computer Vision / Ioannis Stamos From Shree Nayar’s notes.

CSc D Computer Vision / Ioannis Stamos From Forsyth & Ponce. Image 1 Image 2 Log of Fourier magnitude Phase Spectrum Discussion

CSc D Computer Vision / Ioannis Stamos From Forsyth & Ponce.

CSc D Computer Vision / Ioannis Stamos

Figure Left: At the top is a 256x256 pixel image showing a grid obtained by multiplying two sinusoids with linearly increasing frequency. one in x and one in y. The other images in the series are obtained by resampling by factors of two, without smoothing (i.e. the next is a 128x128, then a 64x64, etc., all scaled to the same size). Note the substantial aliasing; high spatial frequencies alias down to low spatial frequencies, and the smallest image is an extremely poor representation of the large image. Right: The magnitude of the Fourier transform of each image. displayed as a log, to compress the intensity scale. The constant component is at the center. Notice that the Fourier transform of a resampled image is obtained by scaling the Fourier transform of the original image and then tiling the plane. Interference between copies of the original Fourier transform means that we cannot recover its value at some points. this is the mechanism of aliasing. Original Image 256x256 Resampled 128x128 Resampled 64x64 Corresponding Fourier Transforms ALIASING

Figure Left: At the top is a 256x256 pixel image showing a grid obtained by multiplying two sinusoids with linearly increasing frequency. one in x and one in y. The other images in the series are obtained by resampling by factors of two, without smoothing (i.e. the next is a 128x128, then a 64x64, etc., all scaled to the same size). Note the substantial aliasing; high spatial frequencies alias down to low spatial frequencies, and the smallest image is an extremely poor representation of the large image. Right: The magnitude of the Fourier transform of each image. displayed as a log, to compress the intensity scale. The constant component is at the center. Notice that the Fourier transform of a resampled image is obtained by scaling the Fourier transform of the original image and then tiling the plane. Interference between copies of the original Fourier transform means that we cannot recover its value at some points. this is the mechanism of aliasing. Resampled 32x32 Resampled 16x16 Corresponding Fourier Transforms ALIASING From Forsyth & Ponce

From Shree Nayar’s notes.

CSc D Computer Vision / Ioannis Stamos Figure Left: Resampled versions of the image of figure 8.11, again by factors of two, but this time each image is smoothed with a Gaussian of σ one pixel before resampling.This filter is a low- pass filter, and so suppresses high spatial frequency components, reducing aliasing. Right: The effect of the low-pass filter is easily seen in these logmagnitude images; the low pass filter suppresses the high spatial frequency components so that components interfere less, to reduce aliasing. Original Image 256x256 Corresponding Fourier Transforms LOW PASS FILTERING σ=1 pixel

CSc D Computer Vision / Ioannis Stamos Figure Left: Resampled versions of the image of figure 8.11, again by factors of two, but this time each image is smoothed with a Gaussian of σ one pixel before resampling.This filter is a low- pass filter, and so suppresses high spatial frequency components, reducing aliasing. Right: The effect of the low-pass filter is easily seen in these logmagnitude images; the low pass filter suppresses the high spatial frequency components so that components interfere less, to reduce aliasing. Corresponding Fourier Transforms LOW PASS FILTERING σ=1 pixel From Forsyth & Ponce

CSc D Computer Vision / Ioannis Stamos Figure Left: Resampled versions of the image of figure 8.11, again by factors of two, but this time each image is smoothed with a Gaussian of σ one pixel before resampling.This filter is a low- pass filter, and so suppresses high spatial frequency components, reducing aliasing. Right: The effect of the low-pass filter is easily seen in these logmagnitude images; the low pass filter suppresses the high spatial frequency components so that components interfere less, to reduce aliasing. Original Image 256x256 Corresponding Fourier Transforms LOW PASS FILTERING Gaussian σ=2 pixels

CSc D Computer Vision / Ioannis Stamos Figure Left: Resampled versions of the image of figure 8.11, again by factors of two, but this time each image is smoothed with a Gaussian of σ one pixel before resampling.This filter is a low- pass filter, and so suppresses high spatial frequency components, reducing aliasing. Right: The effect of the low-pass filter is easily seen in these logmagnitude images; the low pass filter suppresses the high spatial frequency components so that components interfere less, to reduce aliasing. Corresponding Fourier Transforms LOW PASS FILTERING σ=2 pixels From Forsyth & Ponce

Gaussian Smoothing versus Averaging Filter mask (averaging) Filter mask (gaussian) Original image (grass) Result of averaging Result of Gaussian smoothing From Forsyth & Ponce

CSc D Computer Vision / Ioannis Stamos Figure 8.1. Although a uniform local average may seem to give a good blurring model, it generates effects that are not usually seen in defocussing a lens. The images above compare the effects of a uniform local average with weighted average. The image at the top shows a view of grass. On the left in the second row, the result of blurring this image using a uniform local model and on the right, the result of blurring this image using a set of Gaussian weights. The degree of blurring in each case is about the same, but the uniform average produces a set of narrow vertical and horizontal bars, an effect often known as ringing. The bottom row shows the weights used to blur the image, themselves rendered as an image; bright points represent large values and dark points represent small values (in this example the smallest values are zero).

From Shree Nayar’s notes.

From Shree Nayar’s notes.

From Shree Nayar’s notes.