Fourier Transform in Image Processing. CS/BIOEN 6640 U of Utah Guido Gerig (slides modified from Marcel Prastawa 2012)

Similar documents
INTRODUCTION TO THE FAST FOURIER TRANSFORM ALGORITHM

Digital Image Processing. Image Enhancement in the Frequency Domain

Lecture 5: Frequency Domain Transformations

Image restoration. Lecture 14. Milan Gavrilovic Centre for Image Analysis Uppsala University

Digital Image Processing. Lecture 6

Advanced Computer Graphics. Aliasing. Matthias Teschner. Computer Science Department University of Freiburg

Computer Vision and Graphics (ee2031) Digital Image Processing I

Reading. 2. Fourier analysis and sampling theory. Required: Watt, Section 14.1 Recommended:

Computer Graphics. Sampling Theory & Anti-Aliasing. Philipp Slusallek

Biomedical Image Analysis. Spatial Filtering

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines

Drawing a Triangle (and an introduction to sampling)

Review for Exam I, EE552 2/2009

Fourier analysis and sampling theory

Theoretically Perfect Sensor

Theoretically Perfect Sensor

Aliasing and Antialiasing. ITCS 4120/ Aliasing and Antialiasing

Basics. Sampling and Reconstruction. Sampling and Reconstruction. Outline. (Spatial) Aliasing. Advanced Computer Graphics (Fall 2010)

6. Fast Fourier Transform

Outline. Foundations of Computer Graphics (Spring 2012)

Lecture 2: 2D Fourier transforms and applications

Outline. Sampling and Reconstruction. Sampling and Reconstruction. Foundations of Computer Graphics (Fall 2012)

C2: Medical Image Processing Linwei Wang

Fatima Michael College of Engineering & Technology

Drawing a Triangle (and an Intro to Sampling)

Image Filtering, Warping and Sampling

Signals and Sampling. CMPT 461/761 Image Synthesis Torsten Möller. Machiraju/Möller

Image processing in frequency Domain

Digital Image Processing. Prof. P. K. Biswas. Department of Electronic & Electrical Communication Engineering

Sampling: Application to 2D Transformations

Introduction to Sampled Signals and Fourier Transforms

Computational Aspects of MRI

Digital Image Processing

To Do. Advanced Computer Graphics. Discrete Convolution. Outline. Outline. Implementing Discrete Convolution

Filterbanks and transforms

To Do. Advanced Computer Graphics. Sampling and Reconstruction. Outline. Sign up for Piazza

Lecture 6 Basic Signal Processing

Sampling, Aliasing, & Mipmaps

Image Sampling and Quantisation

Aliasing And Anti-Aliasing Sampling and Reconstruction

Image Sampling & Quantisation

Reconstruction of Images Distorted by Water Waves

Sampling and Reconstruction

Filtering Images in the Spatial Domain Chapter 3b G&W. Ross Whitaker (modified by Guido Gerig) School of Computing University of Utah

Digital Signal Processing Lecture Notes 22 November 2010

Image Transformation Techniques Dr. Rajeev Srivastava Dept. of Computer Engineering, ITBHU, Varanasi

Scaled representations

Fourier transform of images

Computer Graphics. Texture Filtering & Sampling Theory. Hendrik Lensch. Computer Graphics WS07/08 Texturing

Biomedical Image Processing

Computer Vision I. Announcements. Fourier Tansform. Efficient Implementation. Edge and Corner Detection. CSE252A Lecture 13.

Computer Vision: 4. Filtering. By I-Chen Lin Dept. of CS, National Chiao Tung University

Sampling and Reconstruction

Sampling, Aliasing, & Mipmaps

Point and Spatial Processing

The main goal of Computer Graphics is to generate 2D images 2D images are continuous 2D functions (or signals)

EEM 561 Machine Vision. Week 3: Fourier Transform and Image Pyramids

Sampling, Aliasing, & Mipmaps

Digital Signal Processing. Soma Biswas

Lecture 4: Spatial Domain Transformations

CPSC 425: Computer Vision

Digital Signal Processing and Filter Design using Scilab

EECS 556 Image Processing W 09. Image enhancement. Smoothing and noise removal Sharpening filters

Spatial Enhancement Definition

Image preprocessing in spatial domain

Image preprocessing in spatial domain

Motivation. The main goal of Computer Graphics is to generate 2D images. 2D images are continuous 2D functions (or signals)

BME I5000: Biomedical Imaging

Assignment 3: Edge Detection

Templates, Image Pyramids, and Filter Banks

Anno accademico 2006/2007. Davide Migliore

Sampling and Reconstruction. Most slides from Steve Marschner

ENT 315 Medical Signal Processing CHAPTER 3 FAST FOURIER TRANSFORM. Dr. Lim Chee Chin

Michael Moody School of Pharmacy University of London 29/39 Brunswick Square London WC1N 1AX, U.K.

Lecture Image Enhancement and Spatial Filtering

Image Warping: A Review. Prof. George Wolberg Dept. of Computer Science City College of New York

Michael Moody School of Pharmacy University of London 29/39 Brunswick Square London WC1N 1AX, U.K.

CHAPTER 3 DIFFERENT DOMAINS OF WATERMARKING. domain. In spatial domain the watermark bits directly added to the pixels of the cover

Frequency analysis, pyramids, texture analysis, applications (face detection, category recognition)

Extracting Wavefront Error From Shack-Hartmann Images Using Spatial Demodulation

Image Processing. Application area chosen because it has very good parallelism and interesting output.

Sampling functions and sparse reconstruction methods

ANALYSIS OF GEOPHYSICAL POTENTIAL FIELDS A Digital Signal Processing Approach

Digital Image Processing COSC 6380/4393

TOPICS PIPELINE IMPLEMENTATIONS OF THE FAST FOURIER TRANSFORM (FFT) DISCRETE FOURIER TRANSFORM (DFT) INVERSE DFT (IDFT) Consulted work:

Image Restoration and Reconstruction

CoE4TN3 Medical Image Processing

Overview. Spectral Processing of Point- Sampled Geometry. Introduction. Introduction. Fourier Transform. Fourier Transform

What will we learn? Neighborhood processing. Convolution and correlation. Neighborhood processing. Chapter 10 Neighborhood Processing

Image Restoration and Reconstruction

XRDUG Seminar III Edward Laitila 3/1/2009

Computer Vision. Fourier Transform. 20 January Copyright by NHL Hogeschool and Van de Loosdrecht Machine Vision BV All rights reserved

Aliasing. Can t draw smooth lines on discrete raster device get staircased lines ( jaggies ):

Broad field that includes low-level operations as well as complex high-level algorithms

Filtering, scale, orientation, localization, and texture. Nuno Vasconcelos ECE Department, UCSD (with thanks to David Forsyth)

Brightness and geometric transformations

Image processing. Reading. What is an image? Brian Curless CSE 457 Spring 2017

PSD2B Digital Image Processing. Unit I -V

FOURIER TRANSFORM GABOR FILTERS. and some textons

Module 9 AUDIO CODING. Version 2 ECE IIT, Kharagpur

Transcription:

Fourier Transform in Image Processing CS/BIOEN 6640 U of Utah Guido Gerig (slides modified from Marcel Prastawa 2012)

1D: Common Transform Pairs Summary source

FT Properties: Convolution See book DIP 4.2.5: F f t g t = F s. G s Convolution in space/time domain is equiv. to multiplication in frequency domain.

Important Application Filtering in frequency Domain

FT Properties Wikipedia Fourier Transforms

FT Properties

Aliasing

Discrete Sampling and Aliasing Digital signals and images are discrete representations of the real world Which is continuous What happens to signals/images when we sample them? Can we quantify the effects? Can we understand the artifacts and can we limit them? Can we reconstruct the original image from the discrete data?

A Mathematical Model of Discrete Delta functional Samples Shah functional

Goal A Mathematical Model of Discrete Discrete signal Samples To be able to do a continuous Fourier transform on a signal before and after sampling Samples from continuous function Representation as a function of t Multiplication of f(t) with Shah

Fourier Series of A Shah Functional u

Fourier Transform of A Discrete Sampling u

Fourier Transform of A Discrete Sampling Frequencies get mixed. The original signal is not recoverable. u Energy from higher freqs gets folded back down into lower freqs Aliasing

What if F(u) is Narrower in the Fourier Domain? No aliasing! How could we recover the original signal? u

What Comes Out of This Model Sampling criterion for complete recovery An understanding of the effects of sampling Aliasing and how to avoid it Reconstruction of signals from discrete samples

Shannon Sampling Theorem Assuming a signal that is band limited: Given set of samples from that signal Samples can be used to generate the original signal Samples and continuous signal are equivalent

Sampling Theorem Quantifies the amount of information in a signal Discrete signal contains limited frequencies Band-limited signals contain no more information then their discrete equivalents Reconstruction by cutting away the repeated signals in the Fourier domain Convolution with sinc function in space/time

Reconstruction Convolution with sinc function

Sinc Interpolation Issues Must functions are not band limited Forcing functions to be band-limited can cause artifacts (ringing) f(t) F(s)

Sinc Interpolation Issues Ringing - Gibbs phenomenon Other issues: Sinc is infinite - must be truncated

Fourier Transform F(s) = 4sinc(4s) - 2sinc 2 (2s) +.5sinc 2 (s) F(s) InverseFourier f(x)

Cut-off High Frequencies F(s) = (4sinc(4s) - 2sinc 2 (2s) +.5sinc 2 (s))*(heavisidepi(w/8) F(s) InverseFourier f(x)

Aliasing Reminder: high frequencies appear as low frequencies when undersampled

Sampling and Aliasing Given the sampling rate, CAN NOT distinguish the two functions High freq can appear as low freq

Ideal Solution: More Samples Faster sampling rate allows us to distinguish the two signals Not always practical: hardware cost, longer scan time

Aliasing 16 pixels 8 pixels 0.9174 pixels 0.4798 pixels

Aliasing Aliasing in digital videos Video1 Video2

Overcoming Aliasing Filter data prior to sampling Ideally - band limit the data (conv with sinc function) In practice - limit effects with fuzzy/soft low pass

Antialiasing in Graphics Screen resolution produces aliasing on underlying geometry Multiple high-res samples get averaged to create one screen sample

Antialiasing

Interpolation as Convolution Any discrete set of samples can be considered as a functional Any linear interpolant can be considered as a convolution Nearest neighbor - rect(t) Linear - tri(t)

Convolution-Based Interpolation Can be studied in terms of Fourier Domain Issues Pass energy (=1) in band Low energy out of band Reduce hard cut off (Gibbs, ringing) 1.2 1 0.8 0.6 0.4 0.2 0-6 -5-4 -3-2 -1 0 1 2 3 4 5 6-0.2-0.4

Fourier Transform of Images

2D Fourier Transform Forward transform: Backward transform: Forward transform to freq. yields complex values (magnitude and phase):

2D Fourier Transform

Fourier Spectrum Image Fourier spectrum Origin in corners Retiled with origin In center Log of spectrum

Fourier Spectrum Translation and Rotation

Phase vs Spectrum Image Reconstruction from phase map Reconstruction from spectrum

Image Fourier Space v u

5 % 10 % 20 % 50 %

Fourier Spectrum Demo http://bigwww.epfl.ch/demo/basisfft/demo.html

Filtering Using FT and Inverse X

Low-Pass Filter Reduce/eliminate high frequencies Applications Noise reduction uncorrelated noise is broad band Images have spectrum that focus on low frequencies 100% 98% 96% 94% 92% 90% 88% 86% 0% 10% 20% 30% 40% 50% 60% 70% 80%

Ideal LP Filter Box, Rect Cutoff freq Ringing Gibbs phenomenon

Extending Filters to 2D (or higher) Two options Separable H(s) -> H(u)H(v) Easy, analysis Rotate H(s) -> H((u 2 + v 2 ) 1/2 ) Rotationally invariant

Ideal LP Filter Box, Rect

Ideal Low-Pass Rectangle With Cutoff of 2/3 Image Filtered Filtered + Histogram Equalized

Ideal LP 1/3

Ideal LP 2/3

Butterworth Filter Control of cutoff and slope Can control ringing

Butterworth - 1/3

Butterworth vs Ideal LP

Butterworth 2/3

Gaussian LP Filtering Ideal LPF Butterworth LPF Gaussian LPF F1 F2

High Pass Filtering HP = 1 - LP All the same filters as HP apply Applications Visualization of high-freq data (accentuate) High boost filtering HB = (1- a) + a(1 - LP) = 1 - a*lp

High-Pass Filters

High-Pass Filters in Spatial Domain

High-Pass Filtering with IHPF

BHPF

GHPF

HP, HB, HE

High Boost with GLPF

High-Boost Filtering

Band-Pass Filters Shift LP filter in Fourier domain by convolution with delta LP Typically 2-3 parameters -Width -Slope -Band value BP

Band Pass - Two Dimensions Two strategies Rotate Radially symmetric Translate in 2D Oriented filters Note: Convolution with delta-pair in FD is multiplication with cosine in spatial domain

Band Bass Filtering

SEM Image and Spectrum

Band-Pass Filter

Radial Band Pass/Reject

Band Reject Filtering

Band Reject Filtering

Band Reject Filtering

Fast Fourier Transform With slides from Richard Stern, CMU

DFT Ordinary DFT is O(N 2 ) DFT is slow for large images Exploit periodicity and symmetricity Fast FT is O(N log N) FFT can be faster than convolution

Fast Fourier Transform Divide and conquer algorithm Gauss ~1805 Cooley & Tukey 1965 For N = 2 K

The Cooley-Tukey Algorithm Consider the DFT algorithm for an integer power of 2, N 1 N 1 X[k] x[n]w nk N x[n]e j2 nk / N ; W N e j2 / N n 0 n 0 Create separate sums for even and odd values of n: X[k] x[n]w nk N x[n]w nk N n even n odd Letting n 2r for n even and n 2r 1 for n odd, we obtain N / 2 1 N /2 1 X[k] x[2r]w 2rk N r 0 r 0 x[2r 1]W 2r 1 k N N 2

The Cooley-Tukey Algorithm Splitting indices in time, we have obtained N / 2 1 N /2 1 X[k] x[2r]w 2rk N x[2r 1]W 2r 1 k N r 0 r 0 But and So W N 2 e j2 2 / N e j2 /(N / 2) WN / 2 W N 2rk WN k WN k WN / 2 X[k] (N/ 2) 1 n 0 rk x[2r]w N /2 W N k (N/ 2) 1 n 0 rk x[2r 1]W N / 2 rk N/2-point DFT of x[2r] N/2-point DFT of x[2r+1]

Divide and reuse Example: N=8

Example: N=8, Upper Part Continue to divide and reuse

Two-Point FFT The expression for the 2-point DFT is: 1 nk X[k] x[n]w 2 x[n]e j2 nk / 2 n 0 n 0 Evaluating for k 0,1 we obtain X[0] x[0] x[1] X[1] x[0] e j2 1/ 2 x[1] x[0] x[1] which in signal flowgraph notation looks like... 1 This topology is referred to as the basic butterfly

Modern FFT FFTW http://www.fftw.org/