4-image enhancement in the frequency domain

81
School of Info-Physics and Geomatics Engineering, CSU 1 22/5/14 Chapter4 Image Enhancement in the Frequency Domain Enhance: To make greater (as in value, desirability, or attractiveness. Frequency: The number of times that a periodic function repeats the same sequence of values during a unit variation of the independent variable. Webster’s New Collegiate Dictionary

Upload: chandra-sekhar-reddy

Post on 07-Apr-2015

143 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU1 23/4/11

Chapter4 Image Enhancement in the Frequency Domain

Enhance: To make greater (as in value, desirability, or attractiveness.

Frequency: The number of times that a periodic function repeats the same sequence of values during a unit variation of the independent variable.

– Webster’s New Collegiate Dictionary

Page 2: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU2 23/4/11

Content

Background Introduction to the Fourier Transform and the

Frequency Domain Smoothing Frequency-Domain Filters Sharpening Frequency-Domain Filters Homomorphic Filtering Implementation Summary

This chapter is concerned primarily with helping the reader develop a basic understanding of the Fourier transform and the frequency domain, and how they apply to image enhancement.

Page 3: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU3 23/4/11

4.1 Background

• Any function that periodically repeats itself can be expressed as the sum of sines and/or cosines of different frequencies, each multiplied by a different coefficient (Fourier series).

• Even functions that are not periodic (but whose area under the curve is finite) can be expressed as the integral of sines and/or cosines multiplied by a weighting function (Fourier transform).

• The advent of digital computation and the “discovery” of fast Fourier Transform (FFT) algorithm in the late 1950s revolutionized the field of signal processing, and allowed for the first time practical processing and meaningful interpretation of a host of signals of exceptional human and industrial importance.

Page 4: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU4 23/4/11

• The frequency domain refers to the plane of the two dimensional discrete Fourier transform of an image.

• The purpose of the Fourier transform is to represent a signal as a linear combination of sinusoidal signals of various frequencies.

Page 5: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU5 23/4/11

4.2 Introduction to the Fourier Transform and the Frequency Domain

• The one-dimensional Fourier transform and its inverse– Fourier transform (continuous case)

– Inverse Fourier transform:

• The two-dimensional Fourier transform and its inverse– Fourier transform (continuous case)

– Inverse Fourier transform:

dueuFxf uxj 2)()(

dydxeyxfvuF vyuxj )(2),(),(

1 where)()( 2

jdxexfuF uxj

dvduevuFyxf vyuxj )(2),(),(

sincos je j

Page 6: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU6 23/4/11

4.2.1The one-dimensional Fourier transform and its inverse (discrete time case)

– Fourier transform (DFT)

– Inverse Fourier transform (IDFT)

The 1/M multiplier in front of the Fourier transform sometimes is placed in the front of the inverse instead. Other times both equations are multiplied by

Unlike continuous case, the discrete Fourier transform and its inverse always exist, only if f(x) is finite duration.

1,...,2,1,0for )(1

)(1

0

/2

MuexfM

uFM

x

Muxj

1,...,2,1,0for )()(1

0

/2

MxeuFxfM

u

Muxj

1/ M

Page 7: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU7 23/4/11

• Since and the fact

then discrete Fourier transform can be redefined

– Frequency (time) domain: the domain (values of u) over which the values of F(u) range; because u determines the frequency of the components of the transform.

– Frequency (time) component: each of the M terms of F(u).

1

0

1( ) ( )[cos 2 / sin 2 / ]

for 0,1,2,..., 1

M

x

F u f x ux M j ux MM

u M

sincos je j cos)cos(

Page 8: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU8 23/4/11

• F(u) can be expressed in polar coordinates:

– R(u): the real part of F(u)– I(u): the imaginary part of F(u)

• Power spectrum:

)()()()( 222uIuRuFuP

( )

1/2 2 2

1

( ) ( )

where ( ) ( ) ( ) (magnitude or spectrum)

( ) ( ) tan (phase angle or phase spectrum)

( )

j uF u F u e

F u R u I u

I uu

R u

Page 9: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU9 23/4/11

Some One-Dimensional Fourier Transform Examples

Please note the relationship between the value of K and the height of the spectrum and the number of zeros in the frequency domain.

Page 10: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU10 23/4/11

• The transform of a constant function is a DC value only.

• The transform of a delta function is a constant.

Page 11: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU11 23/4/11

• The transform of an infinite train of delta functions spaced by T is an infinite train of delta functions spaced by 1/T.

• The transform of a cosine function is a positive delta at the appropriate positive and negative frequency.

Page 12: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU12 23/4/11

• The transform of a sin function is a negative complex delta function at the appropriate positive frequency and a negative complex delta at the appropriate negative frequency.

• The transform of a square pulse is a sinc function.

Page 13: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU13 23/4/11

4.2.2 The two-dimensional Fourier transform and its inverse (discrete time case)

– Fourier transform (DFT)

– Inverse Fourier transform (IDFT)

• u, v : the transform or frequency variables• x, y : the spatial or image variables

1,...,2,1,0,1,...,2,1,0for

),(1

),(1

0

1

0

)//(2

NvMu

eyxfMN

vuFM

x

N

y

NvyMuxj

1,...,2,1,0,1,...,2,1,0for

),(),(1

0

1

0

)//(2

NyMx

evuFyxfM

u

N

v

NvyMuxj

Page 14: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU14 23/4/11

• We define the Fourier spectrum, phase anble, and power spectrum of the two-dimensional Fourier transform as follows:

– R(u,v): the real part of F(u,v)– I(u,v): the imaginary part of F(u,v)

spectrum)(power ),(),(),()(

angle) (phase ),(

),(tan),(

spectrum) ( ),(),(),(

222

1

2

122

vuIvuRvuFu,vP

vuR

vuIvu

vuIvuRvuF

Page 15: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU15 23/4/11

• Some properties of Fourier transform:

)(symmetric ),(),(

symmetric) (conujgate ),(*),(

(average) ),(1

)0,0(

(shift) )2

,2

()1)(,(

1

0

1

0

vuFvuF

vuFvuF

yxfMN

F

Nv

MuFyxf

M

x

N

y

yx

Page 16: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU16 23/4/11

(a) f(x,y) (b) F(u,y) (c) F(u,v)

The 2D DFT F(u,v) can be obtained by 1. taking the 1D DFT of every row of image f(x,y), F(u,y), 2. taking the 1D DFT of every column of F(u,y)

Steps and some example of two-dimensional DFT

y or v

x or u

Convention of coordination:

Page 17: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU17 23/4/11

shift

Consider the relationship between the separation of zeros in u- or v- direction and the width or height of white block of source image.

Page 18: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU18 23/4/11

Shape of three dimensional spectrum

Page 19: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU19 23/4/11

DFT

DFT

The Property of Two-Dimensional DFT Rotation

Page 20: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU20 23/4/11

DFT

DFT

DFT

A

B

0.25 * A + 0.75 * B

The Property of Two-Dimensional DFT Linear Combination

Page 21: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU21 23/4/11

DFT

DFT

A

Expanding the original image by a factor of n (n=2), filling the empty new values with zeros, results in the same DFT.

B

The Property of Two-Dimensional DFT Expansion

Page 22: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU22 23/4/11

Two-Dimensional DFT with Different FunctionsTwo-Dimensional DFT with Different Functions

Sine wave

Rectangle

Its DFT

Its DFT

Page 23: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU23 23/4/11

Two-Dimensional DFT with Different FunctionsTwo-Dimensional DFT with Different Functions

2D Gaussianfunction

Impulses

Its DFT

Its DFT

Page 24: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU24 23/4/11

4.2.3 Filtering in the Frequency DomainFrequency is directly related to rate of change. The frequency of fast varying components in an image is higher than slowly varying components.

Page 25: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU25 23/4/11

Basics of Filtering in the Frequency Domain

Including multiplication the input/output image by (-1)x+y.

What is zero-phase-shift filter?

Page 26: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU26 23/4/11

Some Basic Filters and Their FunctionsSome Basic Filters and Their Functions

• Multiply all values of F(u,v) by the filter function (notch filter):

– All this filter would do is set F(0,0) to zero (force the average value of an image to zero) and leave all other frequency components of the Fourier transform untouched and make prominent edges stand out

otherwise. 1

)2/,2/(),( if 0),(

NMvuvuH

Page 27: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU27 23/4/11

Some Basic Filters and Their FunctionsSome Basic Filters and Their Functions

Lowpass filter

Highpass filter

Circular symmetry

Page 28: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU28 23/4/11

Some Basic Filters and Their FunctionsSome Basic Filters and Their Functions

Low frequency filters: eliminate the gray-level detail and keep the general gray-level appearance. (blurring the image)Low frequency filters: have less gray-level variations in smooth areas and emphasized transitional (e.g., edge and noise) gray-level detail. (sharpening images)

Page 29: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU29 23/4/11

4.2.4 Correspondence between Filtering in the Spatial and Frequency Domain

• Convolution theorem:– The discrete convolution of two functions f(x,y) and h(x,y) of size M

N is defined as

The process of implementation:

1) Flipping one function about the origin;

2) Shifting that function with respect to the other by changing the values of (x, y);

3) Computing a sum of products over all values of m and n, for each displacement.

1 1

0 0

1 1

0 0

1( , ) ( , ) ( , ) ( , )

1( , ) ( , )

M N

m n

M N

m n

f x y h x y f m n h x m y nMN

h m n f x m y nMN

Page 30: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU30 23/4/11

),(),(),(),( vuHvuFyxhyxf ),(),(),(),( vuHvuFyxhyxf Eq. (4.2-

32)

–Let F(u,v) and H(u,v) denote the Fourier transforms of f(x,y) and h(x,y), then

Eq. (4.2-31)

• an impulse function of strength A, located at coordinates (x0,y0): and is defined by

:

where : a unit impulse located at the origin

• The Fourier transform of a unit impulse at the origin (Eq4.2-35) :

1

0

1

00000 ),(),(),(

M

x

N

y

yxAsyyxxAyxs

),( 00 yyxxA

1

0

1

0

)0,0(),(),(M

x

N

y

syxyxs

1

0

1

0

)//(2 1),(

1),(

M

x

N

y

NvyMuxj

MNeyx

MNvuF

),( yx

The shifting property of impulse function

Page 31: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU31 23/4/11

• Let , then the convolution (Eq. (4.2-36))

• Combine Eqs. (4.2-35) (4.2-36) with Eq. (4.2-31), we obtain:

),(1

),(),(1

),(),(1

0

1

0

yxhMN

nymxhnmMN

yxhyxfM

m

N

n

),(),( yxyxf

),(),(

),(1

),(1

),(),(),(),(

),(),(),(),(

vuHyxh

vuHMN

yxhMN

vuHyxyxhyx

vuHvuFyxhyxf

That is to say, the response of impulse input is the transfer function of filter.

Page 32: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU32 23/4/11

The distinction and links between spatial and frequency filtering If the size of spatial and frequency filters is same, then the

computation burden in spatial domain is larger than in frequency domain;

However, whenever possible, it makes more sense to filter in the spatial domain using small filter masks.

Filtering in frequency is more intuitive. We can specify filters in the frequency, take their inverse transform, and the use the resulting filter in spatial domain as a guide for constructing smaller spatial filter masks.

Fourier transform and its inverse are linear process, so the following discussion is limited to linear processes.

Page 33: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU33 23/4/11

• Let H(u) denote a frequency domain, Gaussian filter function given the equation

where : the standard deviation of the Gaussian curve.• The corresponding filter in the spatial domain is

22222)( xAexh

22 2/)( uAeuH

There is two reasons that filters based on Gaussian functions are of particular importance: 1) their shapes are easily specified; 2) both the forward and inverse Fourier transforms of a Gaussian are real Gaussian function.

Page 34: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU34 23/4/11

Page 35: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU35 23/4/11

2 2 2 21 2/ 2 / 2

1 2( ) , ( , )u uH u Ae Be A B

The corresponding filter in the spatial domain is

2 2 2 2 2 21 22 2

1 2( ) 2 2x xh x Ae Be We can note that the value of this types of filter has both negative and positive values. Once the values turn negative, they never turn positive again.

Filtering in frequency domain is usually used for the guides to design the filter masks in the spatial domain.

Page 36: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU36 23/4/11

• One very useful property of the Gaussian function is that both it and its Fourier transform are real valued; there are no complex values associated with them.

• In addition, the values are always positive. So, if we convolve an image with a Gaussian function, there will never be any negative output values to deal with.

• There is also an important relationship between the widths of a Gaussian function and its Fourier transform. If we make the width of the function smaller, the width of the Fourier transform gets larger. This is controlled by the variance parameter 2 in the equations.

• These properties make the Gaussian filter very useful for lowpass filtering an image. The amount of blur is controlled by 2. It can be implemented in either the spatial or frequency domain.

• Other filters besides lowpass can also be implemented by using two different sized Gaussian functions.

Some important properties of Gaussian filters funtions

Page 37: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU37 23/4/11

4.2 Smoothing Frequency-Domain Filters

• The basic model for filtering in the frequency domain

where F(u,v): the Fourier transform of the image to be smoothed

H(u,v): a filter transfer function

• Smoothing is fundamentally a lowpass operation in the frequency domain.

• There are several standard forms of lowpass filters (LPF).– Ideal lowpass filter– Butterworth lowpass filter– Gaussian lowpass filter

),(),(),( vuFvuHvuG

Page 38: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU38 23/4/11

Ideal Lowpass Filters (ILPFs)Ideal Lowpass Filters (ILPFs)

• The simplest lowpass filter is a filter that “cuts off” all high-frequency components of the Fourier transform that are at a distance greater than a specified distance D0 from the origin of the transform.

• The transfer function of an ideal lowpass filter

where D(u,v) : the distance from point (u,v) to the center of ther frequency rectangle (M/2, N/2)

2122 )2/()2/(),( NvMuvuD

),( if 0

),( if 1),(

0

0

DvuD

DvuDvuH

Page 39: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU39 23/4/11

cutoff frequency

ILPF is a type of “nonphysical” filters and can’t be realized with electronic components and is not very practical.

Page 40: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU40 23/4/11

Page 41: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU41 23/4/11

The blurring and ringing phenomena can be seen, in which ringing behavior is characteristic of ideal filters.

Page 42: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU42 23/4/11

Another example of ILPF

Another example of ILPF

Figure 4.13 (a) A frequency-domain ILPF of radius 5. (b) Corresponding spatial filter. (c) Five impulses in the spatial domain, simulating the valuesof five pixels. (d) Convolution of (b) and (c) in the spatial domain.

frequency

spatial

spatial

spatial

),(),(),(),( vuHvuFyxhyxf

Notation: the radius of center component and the number of circles per unit distance from the origin are inversely proportional to the value of the cutoff frequency.

diagonal scan line of (d)

Page 43: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU43 23/4/11

nDvuDvuH 2

0/),(1

1),(

Butterworth Lowpass Filters (BLPFs) with order n

Note the relationship between order n and smoothing

The BLPF may be viewed as a transition between ILPF AND GLPF, BLPF of order 2 is a good compromise between effective lowpass filtering and acceptable ringing characteristics.

Page 44: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU44 23/4/11

Butterworth LowpassFilters (BLPFs)

n=2D0=5,15,30,80,and 230

Page 45: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU45 23/4/11

Butterworth Lowpass Filters (BLPFs)Spatial Representation

Butterworth Lowpass Filters (BLPFs)Spatial Representation

n=1 n=2 n=5 n=20

Page 46: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU46 23/4/11

Gaussian Lowpass Filters (FLPFs)Gaussian Lowpass Filters (FLPFs)

20

2 2/),(),( DvuDevuH

Page 47: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU47 23/4/11

Gaussian Lowpass Filters (FLPFs)

D0=5,15,30,80,and 230

Page 48: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU48 23/4/11

Additional Examples of Lowpass FilteringAdditional Examples of Lowpass Filtering

Character recognition in machine perception: join the broken character segments with a Gaussian lowpass filter with D0=80.

Page 49: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU49 23/4/11

Application in “cosmetic processing” and produce a smoother, softer-looking result from a sharp original.

Page 50: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU50 23/4/11

Gaussian lowpass filter for reducing the horizontal sensor scan lines and simplifying the detection of features like the interface boundaries.

Page 51: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU51 23/4/11

( , ) 1 ( , )hp lpH u v H u v

Ideal highpass filter

Butterworth highpass filter

Gaussian highpass filter

),( if 1

),( if 0),(

0

0

DvuD

DvuDvuH

nvuDDvuH 2

0 ),(/1

1),(

20

2 2/),(1),( DvuDevuH

4.4 Sharpening Frequency Domain Filter

Page 52: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU52 23/4/11

Highpass Filters Spatial RepresentationsHighpass Filters Spatial Representations

Page 53: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU53 23/4/11

Ideal Highpass Filters (IHPFs)Ideal Highpass Filters (IHPFs)

),( if 1

),( if 0),(

0

0

DvuD

DvuDvuH

non-physically realizable with electronic component and have the same ringing properties as ILPFs.

Page 54: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU54 23/4/11

Butterworth Highpass FiltersButterworth Highpass Filters

nvuDDvuH 2

0 ),(/1

1),(

The result is smoother than that of IHPFs and sharper than that of GHPFs

Page 55: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU55 23/4/11

Gaussian Highpass FiltersGaussian Highpass Filters

20

2 2/),(1),( DvuDevuH

The result is the smoothest in three types of high-pass filters

Page 56: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU56 23/4/11

The Laplacian in the Frequency DomainThe Laplacian in the Frequency Domain

)(),( 22 vuvuH

2 2( , ) ( / 2) ( / 2)H u v u M v N

The FT of n-order differential of a function f(x) is

( ) / ( ) ( )n n nd f x dx ju F u

2 22 2 2 2 2

2 2

( , ) ( , )[ ( , )] [ ] ( ) ( , ) ( ) ( , ) ( ) ( , )

f x y f x yf x y ju F u v jv F u v u v F u v

x y

For a two-dimensional function f(x,y), it can be shown that

So, Laplacian can be implemented in the frequency domain by using the filter

Shift the center to (M/2, N/2) and obtain

We have the following Fourier transform pairs

2 2 2( , ) ( / 2) ( / 2) ( , )f x y u M v N F u v

Page 57: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU57 23/4/11

Frequencydomain

Spatial domain

The plot of Laplacian in frequency and spatial domain

Page 58: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU58 23/4/11

2 1 2 2( , ) ( , ) ( , ) 1 (( ) ( ) ) ( , )2 2

M Ng x y f x y f x y u v F u v

For display purposes only

A integrated operation in frequency domain

Page 59: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU59 23/4/11

Unsharp masking, high-boost filtering, and high-frequency emphasis filtering (refers to page187-191)

Page 60: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU60 23/4/11

4.5 Homomorphic filteringProblems:When the illumination radiating to an object is non-uniform, the detail of the dark part in the image is more discernable.

aims:Simultaneously compress the gray-level range and enhance contrast, eliminate the effect of non-uniform illumination, and emphasis the details.

Principal:Generally, the illumination component of an image is characterized by slow spatial variations, while the reflectance components tends to vary abruptly, particularly at the junctions of dissimilar objects. These characteristics lead to associating the low frequencies of the Fourier transform of the logarithm of an image with illumination and the high frequencies with reflectance.

Page 61: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU61 23/4/11

),(),(),( yxryxiyxf

The illumination-reflectance model of an image

),( yxi ),( yxrIllumination coefficient: reflectance coefficient:

Steps: ),(ln),(ln),(ln),( yxryxiyxfyxz

)],([ln)],([ln)],([ yxryxiyxz FFF

),(),(),( vuRvuIvuZ

),(),(),(),(),( vuRvuHvuIvuHvuS

2)

1)

3) Determine the H(u, v), which must compress the dynamic range of i(x,y), and enhance the contrast of r(x,y) component.

Page 62: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU62 23/4/11

rL<1

rH>1

2 20( ( , ) / )( , ) ( )[1 ]c D u v D

H L LH u v e

The following function meet the above requires

The curve shape shown in above figure can be approximated using basic form of the ideal highpass filters, for example, using a slightly modified form of the Gaussian highpass filter and can obtain

Page 63: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU63 23/4/11

)],(),([),( 1' vuIvuHyxi F

)],(),([),( 1' vuRvuHyxr F

)],(exp[),( '0 yxiyxi

)],(exp[),( '0 yxryxr

),(),(),( 00 yxryxiyxg

Steps: 4)

5)

Page 64: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU64 23/4/11

ln FFT H(u,v)

FFT-1 exp

f(x,y)

g(x,y)

The flow-chart of Homomorphic filtering

Page 65: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU65 23/4/11

Two examples

Page 66: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU66 23/4/11

Page 67: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU67 23/4/11

4.6 Implementation 4.6.1Some Additional Properties of the 2D Fourier Transform

, distributivity, scaling, and :

0 0

0 0

2 ( / / )0 0

2 ( / / )0 0

( , ) ( , )

( , ) ( , )

j ux M vy N

j xu M yu N

f x x y y F u v e

f x y e F u u v v

1 2 1 2[ ( , ) ( , )] [ ( , )] [ ( , )]

1( , ) ( / , / )

f x y f x y f x y f x y

f ax by F u a v bab

0 0( , ) ( , )f r F w

Translation

Distributivity and scaling

rotation

Page 68: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU68 23/4/11

Periodicity, conjugate symmetry, and back-to-back properties

shift

( , ) ( , ) ( , ) ( , )

( , ) ( , ) ( , ) ( , )

( , ) ( , )

F u v F u M v F u v N F u M v N

f u v f u M v f u v N f u M v N

F u v F u v

Page 69: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU69 23/4/11

• Separability

1 1 12 / 2 / 2 /

0 0 0

1 1 1( , ) ( , ) ( , )

M N Mj ux M j vy N j ux M

x y x

F u v e f x y e F x v eM N M

A similar process can be applied to computing the 2-D inverse Fourier transform.

Page 70: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU70 23/4/11

4.6.2 computing the inverse FF using a forward transform algorithm

Repeat the one-dimensional inverse FF:1

2 /

0

( ) ( )M

j ux M

u

f x F u e

Take the complex conjugate of two side and multiply M

12 /

0

1 1( ) ( )

Mj ux M

u

f x F u eM M

Which is the form of forward FF. Take the complex conjugate of the result of the above equation and will get the inverse FF by forward transform.For two-dimensional case, similarly have

1 12 ( / / )

0 0

1 1( , ) ( , )

M Nj ux M vy N

u v

f x y F u v eMN MN

Here, we can treat F(u,v) as a simple function presenting on the forward transform equation

Page 71: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU71 23/4/11

4.6.3 More on Periodicity: the need for padding4.6.3 More on Periodicity: the need for padding

1

0

( ) ( )

1( ) ( )

M

m

f x h x

f m h x mM

Convolution process

Aliasing or wraparound error

Page 72: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU72 23/4/11

extend

extend

The methods of solving the aliasing problem is to extend and pad.

( ) 0 1( )

0 1

( ) 0 1( )

0 1

where 1

e

e

f x x Af x

A x P

h x x Bh x

B x P

P A+B

Page 73: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU73 23/4/11

For two-dimensional case

Page 74: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU74 23/4/11

An example

*

==

Page 75: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU75 23/4/11

4.6.4 convolution and correlation theorems1 1

0 0

1( , ) ( , ) ( , ) ( , )

M N

m n

f x y h x y f m n h x m y nMN

1 1

0 0

1( , ) ( , ) ( , ) ( , )

M N

m n

f x y h x y f m n h x m y nMN

Except for the complex of f and h not mirrored about the origin, everything else in the implementation of correlation is identical to convolution, including the need for padding.

convolution

correlation

( , ) ( , ) ( , ) ( , )

( , ) ( , ) ( , ) ( , )

f x y h x y F u v H u v

f x y h x y F u v H u v

Correlation theorem

Correlation includes across- and auto-correlation, and its main use is for matching and sure the location where h (template) finds a correspondence in f.

Page 76: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU76 23/4/11

Page 77: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU77 23/4/11

4.6.5 Summary of Some Important Properties of the 2-D Fourier Transform

4.6.5 Summary of Some Important Properties of the 2-D Fourier Transform

Page 78: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU78 23/4/11

Page 79: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU79 23/4/11

Page 80: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU80 23/4/11

Page 81: 4-Image Enhancement in the Frequency Domain

School of Info-Physics and Geomatics Engineering, CSU81 23/4/11

Summary

• The basic concept about Fourier Transform (FT)

• The algorithm of FT and the process of frequency filtering

• The physical meaning related to FT

• The relationship of resolution between spatial and frequency domain

• Correspondence between filtering in the spatial and frequency domains

• The general type of smoothing and sharpening filters and their main features

• Homomorphic filtering

• Some important properties of FT

• Convolution and correlation theorems

Spatial and frequency filtering are both highly subjective processes