Signalprocessing: Biomedical Image Analysis
Signalprocessing: Biomedical Image Analysis
Signalprocessing Contents
Abstract 2
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
Fig 3.3: Original Mariner 6 martian image Fig 3.4: Log Fourier spectra of the image
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
where .
(3.2)
In Computer Vision we are mainly concerned with real functions. The Fourier
Transform of a real function, however, is generally complex, thus
(3.3)
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
(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)
(3.7)
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
(3.10)
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis
Mar 9th, 2009 Mar 9th, 2009
(3.11)
(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
(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:
(3.16)
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
(3.18)
(3.19)
(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.
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
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
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
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
Separability (24)
The 2D discrete Fourier Transform pair, Eq 3.19 & 3.20, can be expressed in its
separable form
(3.27)
(3.28)
Advantage:
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
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
Translation in the Fourier Domain (27) Translation in the Fourier Domain (28)
A Translation of in the Fourier Domain results in
Example
(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
.
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
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)));
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
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
(3.41)
A rotation by in the Image Domain rotates the Fourier Domain by the same
angle and vice versa.
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
and
(3.46)
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
(3.49)
(3.47)
(3.50)
The Laplacian operator is useful for outlining edges as will be shown in later
(3.48) sections of this lecture.
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
Convolution
Correlation
(3.51)
Convolution and correlation are of fundamental importance in many image
processing techniques.
The importance of convolution in the frequency domain analysis lies in the fact
that and constitute a Fourier Transformation pair thus
(3.52)
(3.53)
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
Definition:
Sifting Theorem
and thus
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
(3.54)
(3.55)
(3.56)
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
(3.57) (3.60)
and (3.61)
(3.59) and
(3.62)
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
1D:
2D:
(a) Original image
2D:
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
(3.63)
and
(3.64)
template matching
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
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)
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.
(3.69)
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
(3.70)
Carefull analysis of Eq. 3.72-3.75 reveals some interesting properties of these
expressions.
Defining
complex multiplications:
complex additions:
(3.72)
The complexity of FFT is thus in the order of .
and
(3.73)
(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
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
(3.82)
(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
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)
(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
(3.88)
(3.89)
If then
(3.90)
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
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.92)
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
(3.96)
(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
Hadamard Transform
2D Walsh Transformation Example (69)
Hadamard Transform (71)
The 1D forward Hadamard kernel is given by
(3.98)
(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)
(3.101)
for .
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
(3.102)
(3.103)
(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
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
(3.106)
(3.107)
(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
(3.109)
(3.110)
(3.111)
(3.112)
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
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.
Dimensionality reduction
Image recognition (3.115)
Statistical models
We can then define as a matrix whose rows are formed by these eigenvectors
(3.116)
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
(3.117)
(3.118)
(3.119)
(3.120)
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
As the sky is mainly blue and the airplane grey it is obvious that
the red colour channel is suitable to segment the airplane.
Biomedical Image Analysis Feb 23rd & 24th, 2009 Biomedical Image Analysis Feb 23rd & 24th, 2009
Mar 9th, 2009 Mar 9th, 2009
Hotelling Transform Example (2) (85) Hotelling Transform Example (3) (86)
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
91 of 91 03/02/2010 09:27 AM