0% found this document useful (0 votes)
42 views

Signalprocessing: Biomedical Image Analysis

This document provides an overview of signal processing techniques including transformations in the frequency domain. It introduces the Fourier transform and discusses its definition, properties, and extensions to 2D functions and the discrete domain. It also covers other transforms such as the discrete cosine transform, Hadamard transform, and Hotelling transform. The document contains examples and explanations of concepts like convolution, correlation, translation, and rotation in both the continuous and discrete settings.

Uploaded by

Ahmed Said
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Signalprocessing: Biomedical Image Analysis

This document provides an overview of signal processing techniques including transformations in the frequency domain. It introduces the Fourier transform and discusses its definition, properties, and extensions to 2D functions and the discrete domain. It also covers other transforms such as the discrete cosine transform, Hadamard transform, and Hotelling transform. The document contains examples and explanations of concepts like convolution, correlation, translation, and rotation in both the continuous and discrete settings.

Uploaded by

Ahmed Said
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

Prof. Dr.

Philippe Cattin: Signalprocessing Contents

Signalprocessing Contents
Abstract 2

Biomedical Image Analysis Motivation - Fetoscope


Motivation Mariner
3
4
Motivation - Mariner (2) 5
1 Transformations in the Frequency Domain
Prof. Dr. Philippe Cattin Introduction 7
1.1 Introduction to the Fourier Transform
Definition of the Fourier Transform 9
MIAC, University of Basel Fourier Transform Example 10
Extension of the Fourier Transform to 2D Functions 11
Fourier Transform Example of a 2D Function 12
Feb 23rd & 24th, 2009 1.2 The Discrete Fourier Transform (DFT)
Definition of the 1D Discrete Fourier Transform 14
Mar 9th, 2009 1D Discrete Fourier Transformation Example 15
The 2D Discrete Fourier Transform 16
The 2D Discrete Fourier Transform (2) 17
Remark 1: The Scaling Terms 18
Remark 2: Existence of the DFT 19
2D Discrete Fourier Transform Example 20
1.3 Properties of the Fourier Transform
Introduction 22
Fourier Transform of Even, Odd Functions 23
Separability 24
Separability Example 25
Translation 26
Translation in the Fourier Domain 27
Translation in the Fourier Domain Example 28
Translation in the Fourier Domain Example (2) 29
Translation in the Image Domain 30
Translation in the Image Domain Example 31
Biomedical Image Analysis Feb 23rd & 24th, 2009 Rotation
Biomedical Image Analysis 32
Feb 23rd & 24th, 2009
Mar 9th, 2009 Rotation Example Mar 9th, 2009 33

1 of 91 03/02/2010 09:27 AM 2 of 91 03/02/2010 09:27 AM


Distributivity and Scaling 34 2.3 Hadamard Transform
Average Value 35 Hadamard Transform 71
Laplacian 36 2D Hadamard Transformation 72
Convolution and Correlation 37 Generation of the 2D Hadamard Kernel 73
Convolution (1) 38 Drawback of the Hadamard Kernel Ordering 74
Convolution (2) 39 Ordered 2D Hadamard Transformation Kernel 75
Convolution with an Impulse Function 40 2.4 Discrete Cosine Transform
Convolution with an Impulse Function (2) 41 Discrete Cosine Transform 77
Discrete Convolution 42 2D Discrete Cosine Transformation Kernel 78
Two-Dimensional Continuous Convolution 43 2D Discrete Cosine Kernel used in JPEG Compression 79
Two-Dimensional Discretised Convolution 44 3 Hotelling Transform
2D Convolution Example 45 Hotelling Transform 81
Correlation 46 Hotelling Transform (2) 82
Correlation Theorem 47 Properties of the Hotelling Transform 83
Correlation Example 48 Hotelling Transform Example 84
2D Correlation Example 49 Hotelling Transform Example (2) 85
1.4 The Fast Fourier Transform (FFT) Hotelling Transform Example (3) 86
Computational Complexity 51
Computational Complexity (2) 52
Derivation of the FFT Algorithm 53
The Inverse FFT 54
2 Other Separable Image Transforms
2.1 Unitary Image Transforms
Unitary Image Transforms 57
Unitary Image Transforms (2) 58
Separability and Symmetry 59
Separability and Symmetry (2) 60
Separability and Symmetry Example 61
Matrix Notation 62
Principle of the 2D Unitary Transforms 63
2.2 Walsh Transform
Walsh Transform 65
1D Walsh Transformation Kernel 66
2D Walsh Transform 67
2D Walsh Transformation Kernel 68
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
2D Walsh Transformation Example Mar 9th, 2009 69 Mar 9th, 2009

3 of 91 03/02/2010 09:27 AM 4 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Prof. Dr. Philippe Cattin: Signalprocessing

Abstract (2) Motivation - Fetoscope (3)


The homomorphic filter used for this example uses the Fourier Transform.

This chapter deals with the signal processing background


necessary to understand the underlying mathematics behind
many Computer Vision algorithms. In particular the Fourier
Transform, the Discrete Fourier Transform, and the Fast Fourier
Transform are discussed.

Fig 3.1: Homomorphic filter example of a fetoscope image

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

5 of 91 03/02/2010 09:27 AM 6 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Prof. Dr. Philippe Cattin: Signalprocessing

Motivation Mariner (4) Motivation - Mariner (2) (5)

Fig 3.3: Original Mariner 6 martian image Fig 3.4: Log Fourier spectra of the image

Fig 3.2: A Fourier T ransform based notch filter example

Fig 3.5: Notch filtered log spectra Fig 3.6: Notch filtered image

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

7 of 91 03/02/2010 09:27 AM 8 of 91 03/02/2010 09:27 AM


Transformations in the Introduction to the
Frequency Domain Fourier Transform
Introduction (7) Definition of the Fourier Transform (9)
A periodic function can be represented by the sum of sines and cosines Let be a continuous function of real variable . The Fourier Transform of
of different frequencies, multiplied by a different coefficient (Fourier , denoted is defined by the equation
Series)
Non-periodic functions can also be represented as the integral of
sines/cosines multiplied by a weighting function (Fourier
Transformation) (3.1)

where .

Given , can be obtained by using the inverse Fourier Transform

(3.2)

The Fourier transform pair exists, if is continuous and integrable and


is integrable, which is almost always satisfied in practice.

In Computer Vision we are mainly concerned with real functions. The Fourier
Transform of a real function, however, is generally complex, thus

(3.3)

where and are the real and imaginary components of ,


respectively. Often it is convenient to express it in exponential form

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

9 of 91 03/02/2010 09:27 AM 10 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Introduction to the Fourier T ransform

(3.4)
Fourier Transform Example (10)
where
Consider the simple function shown in Fig 3.7. Its
Fourier transform is obtained from Eq 3.1 as follows:
(3.5)

and
Fig 3.7: A simple function

(3.6)

The magnitude function is called the Fourier Spectrum of and


its Phase Angle
(3.9)
The square of the spectrum
Fig 3.8: Fourier spectrum

(3.7)

is commonly referred to as Power Spectrum or Spectral Density.

The variable appearing in the Fourier Transform is often called the Frequency
Variable. The name arises from the exponential term, that can be rewritten
using Euler's Formula

As is a complex function, we calculate the Fourier spectrum for


visualisation purposes
(3.8)

(3.10)

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis
Mar 9th, 2009 Mar 9th, 2009

11 of 91 03/02/2010 09:27 AM 12 of 91 03/02/2010 09:27 AM


Figure 3.8 shows a plot of . Prof. Dr. Philippe Cattin: Signalprocessing Introduction to the Fourier T ransform

Extension of the Fourier Transform (11)


to 2D Functions
The Fourier Transformation can be easily extended to 2D functions . If
the function is continuous and integrable and is integrable, the Fourier
Transform pair exists

(3.11)

and the inverse Fourier Transform

(3.12)

Similar to the 1D case, the Fourier Spectrum, Phase , and Power Spectrum
can be defined as follows

(3.13)

(3.14)

(3.15)

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

13 of 91 03/02/2010 09:27 AM 14 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Introduction to the Fourier T ransform

(3.17)
Fourier Transform Example of a 2D (12)
Function
Figure 3.10 shows a plot of .
Consider the simple function shown in Fig 3.9. Its Fourier transform is obtained
from Eq 3.11 as follows:

Fig 3.10: Fourier spectrum

Fig 3.9: A simple function

(3.16)

As is a complex function, we calculate the Fourier spectrum for


visualisation purposes

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

15 of 91 03/02/2010 09:27 AM 16 of 91 03/02/2010 09:27 AM


The Discrete Fourier
.
Transform (DFT)
Definition of the 1D Discrete Fourier (14)
Transform
In Computer Vision the continuous functions are generally discretised into a
sequence

(3.18)

by taking samples units apart. The function can be redefined

where now assumes the discrete values .

With this notation, the Discrete Fourier Transform


(DFT) can be defined as

Fig 3.11: Sampling a


continuous function

and the Inverse Discrete Fourier Transform

The terms and are related by


Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

17 of 91 03/02/2010 09:27 AM 18 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing T he Discrete Fourier T ransform (DFT ) Prof. Dr. Philippe Cattin: Signalprocessing T he Discrete Fourier T ransform (DFT )

1D Discrete Fourier Transformation (15) The 2D Discrete Fourier Transform (16)


Example The definition of the (in Computer Vision more common) 2D Discrete Fourier
Transform (DFT) is then given by

(3.19)

Original signal Fourier spectrum Phaseangle

for and , and the Inverse DFT

(3.20)
Signal with noise shifted by Fourier spectrum of shifted noise Phaseangle of shifted noise
Fig 3.12: One-dimensional discrete Fourier transformation example. Lower example shows the effect of
a phaseshift in the high frequency signal to the phase angle.

Sampling of the continuous function is in a 2D grid of width and


height in the axis, respectively.

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

19 of 91 03/02/2010 09:27 AM 20 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing T he Discrete Fourier T ransform (DFT ) Prof. Dr. Philippe Cattin: Signalprocessing T he Discrete Fourier T ransform (DFT )

The 2D Discrete Fourier Transform (17) Remark 1: The Scaling Terms (18)
(2) Because and are a Fourier Transform pair the multiplicative
scaling terms can be chosen arbitrary. As images are often digitised in square
As in the 1D case, the discrete function represents samples of the function arrays, thus , the following scaling is often chosen

(3.21)
(3.24)

for and .

The sampling increments in the spatial and frequency domain are related by and

(3.22)
(3.25)

and

Beware, that the scaling term in MATLAB is with the inverse rather
(3.23) than the transform!

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

21 of 91 03/02/2010 09:27 AM 22 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing T he Discrete Fourier T ransform (DFT ) Prof. Dr. Philippe Cattin: Signalprocessing T he Discrete Fourier T ransform (DFT )

Remark 2: Existence of the DFT (19) 2D Discrete Fourier Transform (20)


Claim
Example
In contrast to the continuous case, existence of the discrete Fourier
Transform is of no concern, because both and always
exist.

Proof

(a) Original image (b) T he Fourier spectrum (c) T he log Fourier spectrum
Fig 3.13: Example Voyager 2 image of saturn with its Fourier spectrum and the log Fourier spectrum

The dynamic range of Fourier spectra usually is much higher than the typical
display device can reliably reproduce. The consequence is that only the
brightest parts are shown, see Fig 3.13(b). A useful technique that
compensates for this difficulty is of displaying the function

(3.26)

The identify follows from the orthogonality condition see Fig 3.13(c).

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

23 of 91 03/02/2010 09:27 AM 24 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

Properties of the Fourier


Fourier Transform of Even, Odd (23)
Transform Functions
The fact that the Fourier Transform of a real-valued image yields a complex
Introduction (22) output might give the impression that information has somehow doubled. This is
of course not the case. In fact, for real input (such as images) a number of
This part focuses on properties of the Fourier Transform that are of value in important properties hold for the Fourier Transform:
the context of Computer Vision.
Spatial Frequency Hint:
Although our main interest is in the 2D discrete transform, the underlying Domain Domain
concepts are sometimes easier to explain using the 1D continuous form. A function is even if it holds for all real
real part even,
: thus symmetric to
real imaginary part
odd the y-axis.
A real-valued function is odd if for all
real, even real, even real it holds: thus
real, odd imaginary, odd symmetric to the origin.

As can be seen in the above table, the relationships between Fourier coefficients
are such that the total number of independent variables remains the same.

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

25 of 91 03/02/2010 09:27 AM 26 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform we get two 1D Fourier Transforms. The same principle applies for the Inverse
Fourier Transform. The following figure illustrates this process:

Separability (24)
The 2D discrete Fourier Transform pair, Eq 3.19 & 3.20, can be expressed in its
separable form

Fig 3.14: Principle of separability

(3.27)

and the Inverse Transformation respectively

(3.28)

Advantage:

The Transformations and can be obtained in two successive


applications of 1D Fourier transforms → computationally very efficient.

This becomes evident, when we rewrite the separable discrete Fourier Transform
in Eq 3.27 in the form

(3.29)

where

(3.30)

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

27 of 91 03/02/2010 09:27 AM 28 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

Separability Example (25) Translation (26)


MATLAB example using the 2D FFT function We have to differentiate between two cases

fft2(magic(3)) 1. Translations in the Fourier (Frequency) Domain


2. Translations in the Image Domain
ans =
Let's assume we know
45.0000 0 0
0 + 0.0000i 13.5000 + 7.7942i 0.0000 - 5.1962i
0 - 0.0000i 0.0000 + 5.1962i 13.5000 - 7.7942i (3.31)

MATLAB example using two 1D FFT function calls

fft(fft(magic(3)).').' we want to know how a translation in the Fourier Domain by can by


expressed in
ans =

45.0000 0 0 (3.32)
0 + 0.0000i 13.5000 + 7.7942i 0.0000 - 5.1962i
0 - 0.0000i 0.0000 + 5.1962i 13.5000 - 7.7942i
and similarly for translations in the Image Domain

(3.33)

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

29 of 91 03/02/2010 09:27 AM 30 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

Translation in the Fourier Domain (27) Translation in the Fourier Domain (28)
A Translation of in the Fourier Domain results in
Example

The discrete Fourier Transform is generally


(3.34) calculated using the Fast Fourier Transform. The
FFT implementations, however, generally yield the
frequency domain unsorted as can be seen in Fig
3.15(b) on the right.
A multiplication of with the exponential term and taking the transform of Fig 3.15(a): Original signal
the product results in a shift of the origin of the frequency plane to the point Shifting the frequency domain by would yield
the correct sorting order as depicted in Fig 3.15(c).
This can be achieved in the spatial domain by
The special case were is often used and yields multiplying by

Fig 3.15(b): Unsorted spectrum


(3.37)
(3.35)

followed by the Fourier transform


and
Fig 3.15(c): Sorted spectrum

(3.36)

Thus the origin of the Fourier Transform of can be moved to the centre of
its corresponding frequency square by multiplying by the term
.

For the 1D case this shift reduces to the term .

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

31 of 91 03/02/2010 09:27 AM 32 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

Translation in the Fourier Domain (29) Translation in the Image Domain (30)
Example (2) A Translation of in the Image Domain results in

MATLAB Code

img=zeros(256,256); (3.38)
img(128-32:128+32,128-16:128+16)=1;
IMG=fft2(img);
figure; imshow(log10(1+abs(IMG)));

Multiplying with the exponential term

Original image Log spectrum with the


lowest frequencies at the (3.39)
edges
MATLAB Code

img=zeros(256,256); and taking the inverse Fourier Transform moves the origin of the Image to
img(128-32:128+32,128-16:128+16)=1;
img1xy=img.*(-1).^(x+y);
IMG=fft2(img1xy);
figure; imshow(log10(1+abs(IMG))); Note, that a shift in does not affect the magnitude of the Fourier
Transform (but only its phase), as

Original image multiplied by Log spectrum with the


lowest frequencies in the
centre
(3.40)

This is important to know, as the magnitude is often taken to visualise the Fourier
Transform.

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

33 of 91 03/02/2010 09:27 AM 34 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

Translation in the Image Domain (31) Rotation (32)


Example To investigate the influence of rotation we introduce polar coordinates

(3.41)

then and become and respectively.

The direct substitution in the discrete Fourier Transform pair yields

Original image log Fourier spectrum Phaseangle


(3.42)

A rotation by in the Image Domain rotates the Fourier Domain by the same
angle and vice versa.

Shifted original image Shifted log Fourier spectrum Shifted phaseangle

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

35 of 91 03/02/2010 09:27 AM 36 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

Rotation Example (33) Distributivity and Scaling (34)


MATLAB Sample Code Form the definition of the discrete Fourier Transform pair follows that

% Create test image and show it


img=zeros(256,256); (3.43)
img(128-32:128+32,128-16:128+16)=1;
figure; imshow(img);
% Fourier Transform
T est Image log10 Fourier However, in general
IMG=fftshift(fft2(img));
Spectrum
% Show log10 of the Spectrum
figure; imshow(log10(1+abs(IMG)));
(3.44)
MATLAB Sample Code

% Rotate the test image


In other words, the Fourier Transform and its inverse is distributive over
img45=imrotate(img,45,'bicubic','crop'); addition but not over multiplication.
figure; imshow(img45);
% Fourier Transform For two scalars and
IMG45=fftshift(fft2(img45));
Rotated T est Image Rotated log10 % Show log10 of the Spectrum
Fourier Spectrum
figure; imshow(log10(1+abs(IMG45))); (3.45)

and

(3.46)

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

37 of 91 03/02/2010 09:27 AM 38 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

Average Value (35) Laplacian (36)


The average value of a discrete 2D function can be defined as The Laplacian of a 2-dimensional function is defined as

(3.49)
(3.47)

With the definition of the Fourier Transform we get


Substituting in Eq 3.19 and assuming yields

(3.50)

The Laplacian operator is useful for outlining edges as will be shown in later
(3.48) sections of this lecture.

Therefore the average value is related to the Fourier transform at the


frequency 0 thus .

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

39 of 91 03/02/2010 09:27 AM 40 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

Convolution and Correlation (37) Convolution (1) (38)


In the next few slides we will introduce two Fourier Transform relationships that The convolution of two 1-dimensional functions and is generally
connect the spatial and the frequency domain, namely denoted by and defined by the integral

Convolution
Correlation
(3.51)
Convolution and correlation are of fundamental importance in many image
processing techniques.

where is a dummy variable.

The importance of convolution in the frequency domain analysis lies in the fact
that and constitute a Fourier Transformation pair thus

(3.52)

a convolution in the Image domain results in a multiplication in the Frequency


domain, and vice versa

(3.53)

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

41 of 91 03/02/2010 09:27 AM 42 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

Convolution (2) (39) Convolution with an Impulse (40)


Function
The special case of convoluting a function with an Impulse Function
is of particular interest as will be shown later.

Definition:

The Impulse Function (Dirac delta function) is often


referred to as the unit impulse function introduced by the
physicist → Paul Dirac [http://en.wikipedia.org/wiki/Paul_Dirac] . The
Dirac Impulse
function may be viewed as having an area of unity in
an infinitesimal small neighbourhood about and zero
elsewhere; that is,

Sifting Theorem

and thus

It is common practice to graphically represent the Dirac impulses as


arrows at with a height equal to the impulse strength (area).

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

43 of 91 03/02/2010 09:27 AM 44 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

Convolution with an Impulse (41) Discrete Convolution (42)


Function (2) Suppose that, instead of being continuous, are discretised into sampled
arrays of size and
This important relationship will be used again in the sampling and quantisation
section.

(3.54)

(3.55)

With the discrete convolution can be defined as

(3.56)

Fig 3.16: Convolution with an impulse funtion

Because is bigger than and they must be padded with


zeros, so that both are of length .

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

45 of 91 03/02/2010 09:27 AM 46 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

Two-Dimensional Continuous (43) Two-Dimensional Discretised (44)


Convolution Convolution
The 2D Convolution is analogous to the 1D, thus The discretised 2D Convolution is defined by

(3.57) (3.60)

The Convolution Theorem in two dimensions can then be expressed as


where and are the discretised arrays of and ,
respectively.

(3.58) Wraparound error in the individual convolutions is avoided by choosing

and (3.61)

(3.59) and

(3.62)

Calculating the discrete convolution in the frequency domain is


often more efficient than directly using the equation above.

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

47 of 91 03/02/2010 09:27 AM 48 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

2D Convolution Example (45) Correlation (46)


The correlation of two continuous functions and , denoted by ,
is defined by the relation

1D:

2D:
(a) Original image

(c) Padded original (e) Convolution result


where is the complex conjugate.
(b) Filter kern MAT LAB snippet
The discrete equivalent of the correlation is defined as
IMG=fft2(img);
KERN=fft2(kern);
F=IMG.*KERN;
f=ifft2(F);
1D:

2D:

(d) Padded kern


Fig 3.17: 2D Convolution example (a) Original image of size , (b) filter kern of size , (c)
padded original of size , (d) padded filter kern of size
, (e) convolution result of size

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

49 of 91 03/02/2010 09:27 AM 50 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

Correlation Theorem (47) Correlation Example (48)


For both the continuous and discrete cases, the following correlation theorem
holds

(3.63)

and

(3.64)

The principal application for correlation in image processing are

template matching

However, one has to take into account, that correlation is

sensitive to lightning changes


linear bias

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

51 of 91 03/02/2010 09:27 AM 52 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Properties of the Fourier T ransform

The Fast Fourier


2D Correlation Example (49)
Transform (FFT)
Computational Complexity (51)
The number of complex multiplications and additions required to implement the
Discrete Fourier Transform

(a) Original image

(c) Padded original (e) Correlation result


(3.65)
MAT LAB snippet
(b) T emplate
IMG=fft2(img);
TEMP=fft2(temp);
F=IMG.*conj(TEMP); is proportional to
f=ifft2(F);
as for each of the values of the expansion of requires complex
multiplications of by
as the terms can be precalculated and tabulated they are not
counted in the complexity analysis
(d) Padded template
Fig 3.18: 2D Correlation example (a) Original image of size , (b) template of size , (c) padded
original of size , (d) padded template of size , (e)
correlation result of size

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

53 of 91 03/02/2010 09:27 AM 54 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing T he Fast Fourier T ransform (FFT ) Prof. Dr. Philippe Cattin: Signalprocessing T he Fast Fourier T ransform (FFT )

Computational Complexity (2) (52) Derivation of the FFT Algorithm (53)


Proper decomposition can reduce the number of multiplications and addition The FFT algorithm developed in the next few slides is based on the successive
proportional to . This decomposition is called the fast Fourier doubling method. We start with the general form of the DFT
Transform (FFT) algorithm.

Example:
(3.66)
DFT FFT Let's assume that an FFT of size
32 1'024 160 6.40 8'192 takes on one particular
64 4'096 384 10.67 machine 1s. Using the DFT method
128 16'384 896 18.29 the same Fourier Transform would
and rewrite it in the form
256 65'536 2'048 32.00 require 10min30s.
512 262'144 4'608 56.89
1024 1'048'576 10'240 102.40
2048 4'194'304 22'528 186.18
(3.67)
4096 16'777'216 49'152 341.33
8192 67'108'864 106'496 630.15

(3.68)

and is assumed to be of the form where is a positive integer.

The requirement that must be a power of 2 does not limit generality of the
algorithm, as one can always achieve this requirement by zero-padding the data to
the next power of 2.

As is a power of 2 we can express it as

(3.69)

where is also a positive integer. Substitution into Eq. 3.67 yields

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

55 of 91 03/02/2010 09:27 AM 56 of 91 03/02/2010 09:27 AM


(3.75)

(3.70)
Carefull analysis of Eq. 3.72-3.75 reveals some interesting properties of these
expressions.

An -point Fourier Transform can be computed by evaluating two


From Eq. 3.68 we know that , so the previous equation can be -point Fourier Transforms.
expressed as
The resulting values of and are substituted into Eq. 3.74 to
obtain for . The other half then follows directly
from Eq. 3.75 without additional transform evaluations.
(3.71)
If and are recursively split further we finally end up with a
computational complexity for the Fast Fourier Transform (FFT) of

Defining
complex multiplications:
complex additions:

(3.72)
The complexity of FFT is thus in the order of .

and

(3.73)

Eq. 3.71 reduces to

(3.74)

Biomedical
Also, sinceImage Analysis and Feb 23rd
the above equations & 24th, 2009
get Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

57 of 91 03/02/2010 09:27 AM 58 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing T he Fast Fourier T ransform (FFT )

Other Separable Image


The Inverse FFT (54)
Transforms
On the previous slide we developed a fast implementation for the Fourier
Transform, but what about the Inverse Fourier Transform?

The reason is that any method implementing the forward transform can also be
used to compute the inverse. To show this let us repeat the equations for the DFT
and inverse DFT
Unitary Image Transforms
Unitary Image Transforms (57)
(3.76)
The 1D discrete Fourier transform is one of a class of unitary (orthogonal )
transforms that can be expressed in terms of the general relation

(3.77)
(3.79)

Taking the complex conjugate of Eq. 3.77 and dividing both sides by yields
where is the transform of , the forward transform kernel ,
and . The inverse transform has a similar form

(3.78)

(3.80)

Comparing the result with Eq. 3.76 shows that the right hand side of Eq. 3.78 is
in the form of the forward Fourier Transform. Thus inputting into an
where is the inverse transformation kernel and .
algorithm to compute the forward transform gives that can be easily
The properties of the transformation kernel determine the nature of the
converted to .
transform.

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

59 of 91 03/02/2010 09:27 AM 60 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Unitary Image T ransforms Prof. Dr. Philippe Cattin: Signalprocessing Unitary Image T ransforms

Unitary Image Transforms (2) (58) Separability and Symmetry (59)


For 2D square images the forward and inverse transform are defined as The forward kernel is separable if

(3.82)

(3.81) The kernel is additionally symmetric if and thus

(3.83)

where are the forward and backward transformation The identical definitions apply for the inverse kernel .
kernels.
Separable image transforms allow for computationally efficient
implementations

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

61 of 91 03/02/2010 09:27 AM 62 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Unitary Image T ransforms Prof. Dr. Philippe Cattin: Signalprocessing Unitary Image T ransforms

Separability and Symmetry (2) (60) Separability and Symmetry Example (61)
If a transformation kernel is separable, the 2D transformation can be split in As has been previously shown, the forward transformation kernel of the 2D
two 1D transformations → computationally more efficient . In a first step the Fourier transform is
1D transform is performed along each row of

(3.86)

(3.84)

which is separable and symmetric, because

for . Next, the 1D transformation is conducted along each


column of

(3.87)

(3.85)

It is easy to show that the inverse Fourier kernel is also separable and
for . symmetric.

The very same result is obtained if the transformation is performed first on each
column and the on each row.

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

63 of 91 03/02/2010 09:27 AM 64 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Unitary Image T ransforms Prof. Dr. Philippe Cattin: Signalprocessing Unitary Image T ransforms

Matrix Notation (62) Principle of the 2D Unitary (63)


If a kernel is separable as well as symmetric Eq 3.81 can also be
Transforms
written in matrix form

(3.88)

where is the image matrix, is an symmetric transformation matrix


with elements , and is the resulting transform.

To obtain the inverse transform Eq 3.88 must be pre- and post-multiplied by an


inverse transformation matrix

(3.89)

If then

(3.90)

Several transforms - including Fourier, Walsh - can be expressed in this form.

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

65 of 91 03/02/2010 09:27 AM 66 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing W alsh T ransform

Walsh Transform
1D Walsh Transformation Kernel (66)
Walsh Transform (65) The Walsh transformation kernel is symmetric
having orthogonal rows and columns. These
When , the discrete 1D Walsh transform of , denoted by , is properties lead to an inverse kernel identical to
the forward kernel except for a constant
obtained with the forward kernel
multiplicative factor . The inverse Walsh
transform is thus

(3.91)

(3.93) Fig 3.19: 1D W alsh transformation


kernel

where is the -th bit in the binary representation of , e.g. if and


then , , and .
The validity of Eq. 3.93 is easily validated by
Eq. 3.79 can thus be written as substituting with Eq. 3.92 and making use of
the orthogonality properties mentioned.

(3.92)

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

67 of 91 03/02/2010 09:27 AM 68 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing W alsh T ransform Prof. Dr. Philippe Cattin: Signalprocessing W alsh T ransform

2D Walsh Transform (67) 2D Walsh Transformation Kernel (68)


The 2D forward and inverse Walsh transform kernels are given by
As the Walsh kernels only depend on
the indexes and not the
image itself, it is fixed and serves as a
(3.94) kind of basis functions only
determined by the dimension .

Figure 3.20 for example shows the


kernel (basis functions) as a
and function of .

Because the Walsh transform is


symmetric the inverse kernel is the
(3.95) same.

The Walsh transform can


be computed efficiently by
The corresponding 2D forward and inverse Walsh transforms can thus be written a slightly adapted Fast Fig 3.20: 2D W alsh transformation kernel for
as (white , black ). Each block
Fourier Transform (FFT)
corresponds to varying in particular
.

(3.96)

and the inverse transformation

(3.97)

Although the grouping of the -terms is arbitrary the form shown above is
preferred in image processing.

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

69 of 91 03/02/2010 09:27 AM 70 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing W alsh T ransform

Hadamard Transform
2D Walsh Transformation Example (69)
Hadamard Transform (71)
The 1D forward Hadamard kernel is given by

(3.98)

where the summation in the exponent is performed in modulo2 arithmetic and


definition of equal to the Walsh transform. The 1D forward Hadamard
transform is then defined as

(3.99)
Fig 3.21: Example for the forward and inverse 2D W alsh transform

where , and .

As the Hadamard transform has orthogonal rows and columns the inverse kernel
is equal to the forward kernel except for the scaling term .

(3.100)

and finally the inverse Hadamard transform

(3.101)

for .
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

71 of 91 03/02/2010 09:27 AM 72 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Hadamard T ransform

2D Hadamard Transformation (72)


Similarly to the Walsh kernels, the 2D Hadamard kernels are given by

(3.102)

and for the inverse Hadamard kernels

(3.103)

where the summations in the exponent are again performed in modulo2


arithmetic. As was the case in the Walsh transform, the 2D Hadamard kernels
are identical .

The 2D Hadamard transform pair can thus be defined as

(3.104)

and

(3.105)

for .

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

73 of 91 03/02/2010 09:27 AM 74 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Hadamard T ransform Prof. Dr. Philippe Cattin: Signalprocessing Hadamard T ransform

Generation of the 2D Hadamard (73) Drawback of the Hadamard Kernel (74)


Kernel Ordering
The Hadamard definition leads to a simple recursive relationship for generating The generation of the Hadamard
the transformation kernels needed to implement Eqs 3.88 & 3.90. kernels with the recursive rule ,
however, has a serious drawback
The Hadamard matrix with the lowest order is
with increasing the number of
transitions (thus frequency) does
not increase as is the case in the
Fourier transform

For some applications like Image


compression the ordering is, however,
The recursive relationship below can then be used to determine : not important.

Fig 3.22: Standard 2D Hadamard for (white


, black ). Each block corresponds to
The transformation Matrix and the inverse transformation Matrix for use in varying in particular
Eqs 3.88 and 3.90 respectively are then obtained by normalising with .

The expression for the inverse Hadamard matrix is identical.

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

75 of 91 03/02/2010 09:27 AM 76 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Hadamard T ransform Similar to the Walsh transform, the Hadamard transform can be implemented
efficiently by slightly adapting the Fast Fourier Transform (FFT).

Ordered 2D Hadamard (75)


Transformation Kernel
The Hadamard kernel where the sequency (number
of transitions) increases as a function of (1D) and
(2D) is given by the relation

(3.106)

Fig 3.23: Ordered 2D Hadamard


transformation kernel for
where (white , black ). Each
block corresponds to varying
in particular
.

(3.107)

And the 2D ordered Hadamard kernel

(3.108)

Figure 3.23
Biomedical for
Image example
Analysis shows the ordered Hadamard kernel
Feb (basis
23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
functions) as a function of . Mar 9th, 2009 Mar 9th, 2009

77 of 91 03/02/2010 09:27 AM 78 of 91 03/02/2010 09:27 AM


Discrete Cosine Transform (3.113)

Discrete Cosine Transform (77)


for , where the scaling factor is defined as for the 1D
The Discrete Cosine Transform is yet another member of the unitary transform case.
family and defined as

(3.109)

for . Similarly, the inverse DCT is defined as

(3.110)

for , where the scaling factor is

(3.111)

The corresponding 2D Discrete Cosine Transform pair is given by

(3.112)

for . Similarly, the 2D inverse DCT is defined as


Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

79 of 91 03/02/2010 09:27 AM 80 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Discrete Cosine T ransform Prof. Dr. Philippe Cattin: Signalprocessing Discrete Cosine T ransform

2D Discrete Cosine Transformation (78) 2D Discrete Cosine Kernel used in (79)


Kernel JPEG Compression
The 2D Discrete Cosine Transformation
kernel for is depicted in Fig Figure 3.25 shows the DCT basis functions used
3.24. in JPEG compression. JPEG is a lossy
compression and works as follows:
In contrast to the Walsh and Hadamard
transform the DCT transform uses 1. The entire image is split in patches
2. Each patch is transformed into a
multiplications with real values, luminance/chrominance colour space .
and This allows for different compression
evaluations of the cosine function. factors since luminance is more important
than chrominance for human vision
The DCT has become the method of 3. DCT transformation of each patch
choice in image compression. 4. The DCT coefficients are processed so that
unimportant coefficients will be
Fig 3.25: 2D DCT Kernel for
replaced by zeros and larger coefficients
will lose precision
5. The resulting DCT coefficients are Huffman
Fig 3.24: 2D DCT Kernel for (white , compressed (lossless compression)
black ). Each block corresponds to varying

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

81 of 91 03/02/2010 09:27 AM 82 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Hotelling T ransform

Hotelling Transform
Hotelling Transform (2) (82)
Hotelling Transform (81) Let's assume we have vector samples from a random population
. The mean vector and the covariance matrix can then be
The Hotelling transform is also known as the Eigenvector , Principal approximated from these samples by
Component , or discrete Karhunen-Loeve transform.

So far all the transformation kernels (basis functions) were fixed and only
depended on the size of the image. The Hotelling transform in contrast is based (3.114)
on statistical properties and is computed using sample data.

Although computationally more demanding the Hotelling transform has


several useful features that make it an indispensable tool for Computer Vision.
and
It is often used for

Dimensionality reduction
Image recognition (3.115)
Statistical models

Because is real and symmetric, finding a set of orthogonal eigenvectors is


always possible. Let and , , be the eigenvectors and
corresponding eigenvalues of .

We can then define as a matrix whose rows are formed by these eigenvectors

(3.116)

where the eigenvectors are ordered by their descending corresponding


eigenvalues, thus . The first row thus corresponds to the largest and the
last row to the smallest eigenvalue.

defines a transformation matrix that maps the 's into new vectors in a new
coordinate system as follows
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

83 of 91 03/02/2010 09:27 AM 84 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Hotelling T ransform

(3.117)

Properties of the Hotelling (83)


Equation 3.117 is called the Hotelling transform. Transform
The mean of the resulting vectors is zero; that is

(3.118)

The covariance matrix of the 's can be obtained by

(3.119)

Furthermore, is a diagonal matrix whose elements along the diagonal are


the eigenvalues of

(3.120)

As the off-diagonal elements are the vectors are uncorrelated.

and have the same eigenvalues and eigenvectors.


The effect of using Eq 3.117 is to establish a new coordinate system whose
origin is at the centroid of the population and whose axes are in the direction
of the eigenvectors of
As the rows of are orthogonal vectors the inverse is equal to the transpose
thus

Any vector can be recovered from its corresponding by using

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

85 of 91 03/02/2010 09:27 AM 86 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Hotelling T ransform

Hotelling Transform Example (84)

The task of this example is to determine the approximate main


axis of the object prior to recognition.

Fig 3.26: Image of a


Jet Fighter

As the sky is mainly blue and the airplane grey it is obvious that
the red colour channel is suitable to segment the airplane.

Fig 3.27: Red RGB


channel

The segmented image of the airplane using a threshold of


in the red colour channel.

The coordinates of all the white pixels constitute the vector


samples . The mean vector and covariance matrix are
then calculated.
Fig 3.28: Binary
mask

Using the Singular Value Decomposition (SVD) the


eigenvectors and eigenvalues are determined

Fig 3.29: New


coordinate system,
where is a diagonal matrix with the sorted eigenvalues and the vector length is
a matrix with the orthogonal eigenvectors (Principal a measure of the
Components) variance

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

87 of 91 03/02/2010 09:27 AM 88 of 91 03/02/2010 09:27 AM


Prof. Dr. Philippe Cattin: Signalprocessing Hotelling T ransform Prof. Dr. Philippe Cattin: Signalprocessing Hotelling T ransform

Hotelling Transform Example (2) (85) Hotelling Transform Example (3) (86)

Let's assume we have vector samples of


grey-scale mug shot images of size
pixels.

If the images are treated as individual vectors


of size the
mean vector and the covariance matrix
can be determined.

The eigenvectors of then span a


new orthogonal eigenspace. The eigenvectors
are often called Principal Components or in
our case Eigenfaces. Figure 3.30 depicts the
first 16 Eigenfaces (brightness was scaled to Fig 3.30: Principal Components 1-16
(Eigenfaces)
span the entire dynamic range).

Figure 3.32 shows ten original sample mug


shots with their reconstruction using the first 30
Eigenfaces.

Fig 3.31: Eigenvalues corresponding to


the eigenvectors

Fig 3.32: T he top row shows 10 sample mug shots. T he lower row shows their respective
reconstruction using the first 30 Eigenfaces

Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009

89 of 91 03/02/2010 09:27 AM 90 of 91 03/02/2010 09:27 AM


3.33

Biomedical Image Analysis Feb 23rd & 24th, 2009


Mar 9th, 2009

91 of 91 03/02/2010 09:27 AM

You might also like