Вы находитесь на странице: 1из 38

Lappeenranta

University of Technology

Fourier Transform
in
Image Processing
Joonas Konttinen
Przemysaw Pyka
Mika Kangas

Contents

Introduction
Discrete Fourier Transform in image processing
Properties of the Fourier Transfrom
Fast Fourier Transform
Applications of the Fourier Transfrom in digital
image processing
Image processing examples

Introduction
Fourier Transform is an integral transform of one function into another.
Jean Baptiste Joseph Fourier (1768-1830), a French mathematician and
physicist.
There is a whole family of Fourier Transfrom variants which have
many scientific applications.

Linearity
Fourier transform is
linear!
It possesses the properties of
homogeneity
and
additivity.

Homogeneity
k * x[] k * X[]

Additivity
x1[] + x2[] X1[] + X2[]

Scaling
f(a*x) (1/a) * F(w/a)
If function wider in the x-direction, its spectrum
wiil become smaller in the x-direction.
The amplitude will also be changed.

Time Shifting
Signal with symmetry around
a vertical axis linear phase.

A shift in the time domain


corresponds to changing
the slope of the phase

Duality of Symetry
if f(x) <--> F(w)
then F(x) <--> f(-w)
Apart from some scaling factors at least.
Because of this property, for example, the
spectrum of a rectangular pulse is a sinc
function and at the same time the spectrum of
a sinc function is a rectangular pulse.

The Discrete Fourier transform in image processing...


The Fourier Transform is an important image processing tool which is
used to decompose an image into its sine and cosine components.
The output of the transformation represents the image in the Fourier or
frequency domain, while the input image is the spatial domain
equivalent.
In the Fourier domain image, each point represents a particular
frequency contained in the spatial domain image.
In image processing, The Fourier Transform is used in a wide range of
applications, such as image analysis, image filtering, image
reconstruction and image compression.

How does it work?


From the variants of the Fourier Transform Discrete Fourier Transform (DFT)
is the variant used in digital image processing.
The DFT is the sampled Fourier Transform. That is why DFT does have all the
frequences which form the image, but only a set of samples which is large
enough to fully describe the spatial domain image.
The number of frequencies corresponds to the number of pixels in the spatial
domain image, i.e. the image in the spatial and Fourier domain are of the same
size.

How does it work?


For a square image of size NN, the two-dimensional DFT is
given by:

f(i,j) is the image in the spatial domain and the exponential term
is the basis function corresponding to each point F(k,l) in the
Fourier space.
The equation can be interpreted as: the value of each point F(k,l)
is obtained by multiplying the spatial image with the
corresponding base function and summing the result.

How does it work?


The basis functions are sine and cosine waves with increasing
frequencies, i.e. F(0,0) represents the DC-component of the image
which corresponds to the average brightness and F(N-1,N-1)
represents the highest frequency.
In a similar way, the Fourier image can be re-transformed to the
spatial domain. The inverse Fourier transform is given by:

How does it work?


To obtain the result for the previous equations, a double sum
has to be calculated for each image point. However, because
the Fourier Transform is separable, it can be written as:

where

How does it work?


Using those last two formulas, the spatial domain image is first
transformed into an intermediate image using N one-dimensional Fourier
Transforms.

This intermediate image is then transformed into the final image, again
using N one-dimensional Fourier Transforms.

Expressing the two-dimensional Fourier Transform in terms of a series of


2N one-dimensional transforms decreases the number of required
computations.

How does it work?


The ordinary one-dimensional DFT still has complexity which can be
reduced with the use of Fast Fourier Transform (FFT) to compute the onedimensional DFTs.

It is a significant improvement, in particular for large images.

There are various forms of the FFT and most of them restrict the size of the
input image that may be transformed, often to where n is an integer.

How does it work? ...magnitude and phase


The Fourier Transform produces a complex number valued output image which
can be displayed with two images, either with the real and imaginary part or with
magnitude and phase.

In image processing, often only the magnitude of the Fourier Transform is


displayed, as it contains most of the information of the geometric structure of the
spatial domain image.

The Fourier image can also be re-transformed into the correct spatial domain after
some processing in the frequency domain...(both magnitude and phase of the imgae
must be preserved for this).

The Fourier domain image has a much greater range than the image in the spatial
domain. Hence, to be sufficiently accurate, its values are usually calculated and
stored in float values.

Fast Fourier Transform


How the FFT works?
1) Decomposed an N point time domain signal
into N time domain signals each composed of
a single point.
2) Calculate the N frequency spectra
corresponding to these N time domain
signals.
3) The N spectra are synthesized into a single
frequency spectrum.

Fast Fourier Transform


Decomposition
16 point signal is decomposed into 16 signal each containing a single point

Log2N stages required in this decomposition

Fast Fourier Transform


Decomposition

The decomposition
is nothing more
than a reordering
of the samples in the signal.

Fast Fourier Transform


Calculating
The next step is to find the frequency spectra of
the 1 point time domain signals.
The frequency spectrum of a 1 point signal is
equal to itself.

Don't forget that each of the 1 point signals is


now a frequency spectrum, and not a time
domain signal.
signal

Fast Fourier Transform


Synthesis
The last step is to combine the N frequency spectra in the exact reverse order
that the time domain decomposition took place.

The last stage results in the output of the FFT, a 16 point frequency spectrum.

Fast Fourier Transform


Synthesis

When the time domain signal is diluted with zeros, the frequency domain is
duplicated.
If the time domain signal is also shifted by one sample during the dilution,
the spectrum will
additionaly
be multiplied
by sinusoid.

Fast Fourier Transform


Synthesis

Synthesis Flow Diagram for combining


two 4 point spectra into a single 8 point spectrum.
Butterfly basic calculation element in FTT

Fast Fourier Transform


Alghoritm
Loops:
1) runs through the Log2N stages
2) moves through each of the individual
frequency spectra in the stage being worked on
3) uses the butterfly to calculate the points
in each frequency spectra

Overhead boxes
determine the beginning and ending indexes
for the loops, as well as calculating
the sinusoids needed in the butterflies

Fourier transform applications


Used in many scientific areas
Physics
Number theory
Signal processing (inc. image processing)
Probability theory
Statistics
Cryptography
Acoustics
Optics
Etc, etc

Fourier transform in signal


processing
Includes: (for example) audio and image signal processing
Audio and image signal are very alike (1D vs. 2D)
Both can be continuous (analog) or discrete (digital)
Same kind of filters can be used

Fourier transform is used for a easier way to apply different


kind of filters to the signal
Filters are used for:
Removing unwanted frequencies from signal
Removing noise from signal
Altering signal somehow

1D and 2D Fourier transform


comparison
Basic sine signal:
Fourier transforms of that signal:

Position of peaks will depend on signal


frequency

1D and 2D Fourier transform


comparison
Important part:
Sine signal with added positive constant:

Fourier transform of the same signal:


Notice the extra peak at origin

1D and 2D Fourier transform


comparison
On 2D images, you are watching the
waveform from top view
You can imagine that the white parts are
top of the wave and black parts are the
bottom parts (see picture on the right)
Fourier transform:

1D and 2D Fourier transform


comparison
In the 2D-image Fourier transforms, there is always a
peak at origin
The value at origin is the average intensity/color of
the image
No negative values
In the 2D-image Fourier transform, higher
frequencies represent detail in a picture and lower
frequencies represent the gradient changes in the
picture
That feature is used to apply filters to images

Image processing
When a image is taken by a image sensor, it isnt
always usable in raw format
There can be noise or other disturbance in the image
It can be caused by system it self or some external source

Useful information have to be somehow separated from


the original image
Image information have to be altered to some other form
Image could be to big for transfer
Image compression

Image filtering
Image filtering workflow with Fourier
transform:
1.

2.
3.

Image is converted to spectral form with Fourier


transform (Usually Fast Fourier transform is
used).
Filter is applied to spectral image
Image is converted back to its original form
using inverted Fourier transform

Few filter examples


Low pass filter = Image blur

Few filter examples


High pass filter = Edges

Can be used in edge detection

Few filter examples


Sharpening = boosting high frequency pixels

Few filter examples


Removing unwanted frequencies

More

Bibliography
Steven W. Smith The Scientist and Engineer's
Guide to Digital Signal Processing
http://student.kuleuven.be/~m0216922/CG/fourier.html
http://www.cee.hw.ac.uk/hipr/html/fourier.html
http://www.cs.unm.edu/~brayer/vision/fourier.html
http://homepages.inf.ed.ac.uk/rbf/CVonline/LOCAL_COPIES/MARSHAL
L/node15.html#SECTION00141000000000000000
http://micro.magnet.fsu.edu/primer/java/digitalimaging/processing/fouriertr
ansform/

Вам также может понравиться