Tải bản đầy đủ (.pdf) (271 trang)

poon, banerjee - contemporary optical image processing with matlab

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (15.04 MB, 271 trang )

Contemporary Optical
Image Processing
with MATLAB |
Elsevier Science Internet Homepage
(Europe)
(America)
(Asia)
Consult the Elsevier homepage for full catalogue information on all books, journals and electronic
products and services.
Elsevier Titles of Related Interest
RASTOGI & INAUDI (Editors)
Trends in Optical Non-destructive Testing and
Inspection.
ISBN: 0-08-043020-1
WOLF (Series Editor)
Progress in Optics.
Series ISSN." 0079-6638
Related Journals
Free specimen copy gladly sent on request: Elsevier Science Ltd, The Boulevard, Langford Lane,
Kidlington, Oxford, OX5 1GB, UK
Computers and Electrical Engineering
Image and Vision Computing
ISA Transactions ~
Optics and Lasers in Engineering
Optics and Laser Technology
Optics Communications
Signal Processing
Signal Processing: Image Communication
To Contact the Publisher
Elsevier Science welcomes enquiries concerning publishing proposals: books, journal special issues,


conference proceedings, etc. All formats and media can be considered. Should you have a publishing
proposal you wish to discuss, please contact, without obligation, the publisher responsible for Elsevier's
optical, electronic and control publishing programme:
Dr Martin Ruck
Publishing Editor
Elsevier Science Ltd Phone: +44 1865 843230
The Boulevard, Langford Lane Fax: +44 1865 843920
Kidlington, Oxford, OX5 1GB, UK E-mail:
General enquiries, including placing orders, should be directed to Elsevier's Regional Sales Offices -
please access the Elsevier homepage for full contact details (homepage details at top of this page).
Contemporary Optical
Image Processing
with MATLAB |
Ting-Chung Poon
Bradley Department of Electrical and Computer Engineering,
Virginia Polytechnic Institute and State University,
Blacksburg, VA, USA
Partha P. Banerjee
Department of Electrical and Computer Engineering,
University of Dayton,
Dayton, OH, USA
2001
ELSEVIER
AMSTERDAM. LONDON. NEW YORK-OXFORD. PARIS. SHANNON- TOKYO
ELSEVIER SCIENCE Ltd
The Boulevard, Langford Lane
Kidlington, Oxford OX5 1GB, UK
9 2001 Elsevier Science Ltd. All rights reserved.
This work is protected under copyright by Elsevier Science, and the following terms and conditions apply to its use:
Photocopying

Single photocopies of single chapters may be made for personal use as allowed by national copyright laws. Permission of the
Publisher and payment of a fee is required for all other photocopying, including multiple or systematic copying, copying for
advertising or promotional purposes, resale, and all forms of document delivery. Special rates are available for educational
institutions that wish to make photocopies for non-profit educational classroom use.
Permissions may be sought directly from Elsevier Science Global Rights Department, PO Box 800, Oxford OX5 I DX, UK;
phone: (+44) 1865 843830, fax: (+44) 1865 853333, e-mail: You may also contact Global Rights
directly through Elsevier's home page (), by selecting 'Obtaining Permissions'.
In the USA, users may clear permissions and make payments through the Copyright Clearance Center, Inc., 222 Rosewood Drive,
Danvers, MA 01923, USA; phone: (978) 7508400, fax: (978) 7504744, and in the UK through the Copyright Licensing Agency
Rapid Clearance Service (CLARCS), 90 Tottenham Court Road, London WIP 0LP, UK; phone: (+44) 207 631 5555; fax:
(+44) 207 631 5500. Other countries may have a local reprographic rights agency for payments.
Derivative Works
Tables of contents may be reproduced for internal circulation, but permission of Elsevier Science is required for external resale
or distribution of such material. Permission of the Publisher is required for all other derivative works, including compilations and
translations.
Electronic Storage or Usage
Permission of the Publisher is required to store or use electronically any material contained in this work, including any chapter or
part of a chapter.
Except as outlined above, no part of this work may be reproduced, stored in a retrieval system or transmitted in any form or by
any means, electronic, mechanical, photocopying, recording or otherwise, without prior written permission of the Publisher.
Address permissions requests to: Elsevier Science Global Rights Department, at the mail, fax and e-mail addresses noted above.
Notice
No responsibility is assumed by the Publisher for any injury and/or damage to persons or property as a matter of products liability,
negligence or otherwise, or from any use or operation of any methods, products, instructions or ideas contained in the material
herein. Because of rapid advances in the medical sciences, in particular, independent verification of diagnoses and drug dosages
should be made.
MATLAB is a registered trademark of The MathWorks, Inc.
For MATLAB product information, please contact:
The MathWorks Inc., 3 Apple Hill Drive, Natick, MA 01760-2098, USA.
Tel. +1 508 647 700; Fax: +1 508 647 7101;

E-mail: Web: www.mathworks.com
First edition 2001
British Library Cataloguing in Publication Data
Poon, Ting-Chung
Contemporary optical image processing with MATLAB
1. MATLAB (Computer file) 2. Image processing - Computer
programs
I.Title II. Banerj ee, Partha P.
621.3 ' 67 ' 02855369
ISBN 0080437885
Library of Congress Cataloging in Publication Data
Poort, Ting-Chung.
Contemporary optical image processing with MATLAB / Ting-Chung Poort, Partha P.
Banerjee 1st ed.
p. cm.
ISBN 0-08-043788-5 Cnardeover)
1. Image proe~sing. 2. MATLAB. I. Banerjee, Partha P. II. Title.
TA1637 .P65 2001
621.36'7 de21
2001023232
ISBN: 0-08-043788-5
Q The paper used in this publication meets the requirements of ANSI/NISO Z39.48-1992 (Permanence of Paper).
Printed in The Netherlands.
PREFACE
This book serves two purposes: first to introduce the readers to the concepts of
geometrical optics, physical optics and techniques of optical imaging and image
processing, and secondly, to provide them with experience in modeling the theory and
applications using a commonly used software tool MATLAB. It is a comprehensively
revised and updated version of the authors' previous book Principles of Applied Optics.
A sizeable portion of this book is based on the authors' own in-class presentations, as

well as research in the area.
Emphasis is placed on physical principles, on innovative ways of analyzing ray
and wave propagation through optical systems using matrix and FFT methods that can be
easily implemented using MATLAB. The reason MATLAB is emphasized is because of
the fact that it is now a widely accepted software tool, which is very routinely used in
signal processing. Furthermore, MATLAB is now commonly available in PC or
workstation clusters in most universities, and student versions of it (Version 5) are
available at the price of an average hardback textbook. Although student versions of
MATLAB do have limitations compared with the professional version, they are
nevertheless very powerful for array and matrix manipulation, for performing FFTs and
for easy graphing. MATLAB code is very concise and complex mathematical operations
can be performed using only a few lines of code. In our book we provide several
examples of analysis of optical systems using MATLAB and list MATLAB programs for
the benefit of readers. Since optical processing concepts are based on two dimensional
linear system theories for the most part, we feel that this approach provides a natural
bridge between traditional optics specialists and the signal and digital image processing
community. We stress however that we have chosen to use MATLAB as a supplement
rather than a replacement of traditional analysis techniques. Along with traditional
problems, we have included a set of computer exercises at the end of each chapter.
Taking this approach enables instructors to teach the concepts without committing to the
use of MATLAB alone.
The book is primarily geared towards a senior/graduate level audience. Since the
purpose of the book is to bring out the systems aspect of optics, some of the traditional
theories in physical optics such as the classical derivation of the Fresnel diffraction
formula have been omitted. Instead we emphasize the transfer function approach to
optical propagation wherever possible, discuss the coherent and optical transfer function
of an image processing system etc. In geometrical optics, we take the readers quickly to
the matrix formalism, which can be easily used to simulate ray propagation in the
absence of diffraction. Emphasis is also placed on Gaussian beam optics, and the q-
formulation is derived in a straightforward and simple way through the transfer function

concept. Holography and complex spatial filtering is introduced simultaneously since
they are essentially similar. Also novel in the book is the ray theory of hologram
construction and reconstruction, which is elegant and simple to use in order to determine
quickly the location and characteristics of the reconstructed image. Of course the ray
theory of holograms has its roots in the rigorous wave theory, this is pointed out clearly
in the text.
vi Preface
Another novel feature in the book is the discussion of optical propagation through
guided media like optical fibers and self-induced guiding using optical nonlinearities. In
each case, there are ample MATLAB simulations to show beam propagation in such
media. The reason for introducing nonlinearities in this book is because an increasingly
large number of applications of optical nonlinearities exist in image processing, e.g., edge
enhancemem and image correlation through phase conjugation. Contemporary topics
such as this, as well as scanning holography, bipolar incoherent image processing, image
processing using acousto-optics, and dynamic holographic techniques for phase distortion
correction of images are discussed in the book.
A comment concerning units and notation: we mainly use the MKS system of
units and the engineering convention for wave propagation, to be made more precise in
the text. Instructive problems and MATLAB assignments are included at the end of each
Chapter. Note that some of the examples given in the text may not work with the student
version because of the size of the matrix. We hope that the book will adequately prepare
the interested readers to modem research in the area of image processing.
T C. Poon would like to thank his wife Eliza Lau and his children Christina and
Justine for their encouragement, patience and love. P.P. Banerjee would like to thank his
wife Noriko and his children Hans and Neil for their encouragement and support. The
authors would like to thank Taegeun Kim and Christina Poon for their help in writing
some of the MATLAB codes, Christina Poon and Justine Poon for help in typing parts of
the manuscript and drawing some of the figures, and Bill Davis for his assistance on the
use of the word processing software. We would like to acknowledge all our students who
have contributed substantially to some of the work reported in this book, especially in

Chapters 4 and 7. We would also like to express our gratitude to Professor Adrian
Korpel of the University of Iowa for instilling in us the spirit of optics. Last, but not
least, we would like to thank our parems for their moral encouragement and sacrifice that
made this effort possible.
vii
CONTENTS
Chapter 1: Introduction to Linear Systems
1.1 One and Two-dimensional Fourier Transforms
1.2 The Discrete Fourier Transform
1.3 Linear Systems, Convolution and Correlation
Chapter 2: Geometrical Optics
2.1 Fermat's Principle
2.2 Reflection and Refraction
2.3 Refraction in an Inhomogeneous Medium
2.4 Matrix Methods in Paraxial Optics
2.4.1 The ray transfer matrix
2.4.2 Illustrative examples
2.5 Ray Optics using MATLAB
Chapter 3: Propagation and Diffraction of Optical Waves
3.1 Maxwell's Equations: A Review
3.2 Linear Wave Propagation
3.2.1 Traveling-wave solutions
3.2.2 Intrinsic impedance, the Poynting vector,
and polarization
3.3 Spatial Frequency Transfer Function for Propagation
3.3.1 Examples of Fresnel diffraction
3.3.2 MATLAB example: the Cornu Spiral
3.3.3 MATLAB example: Fresnel diffraction
of a square aperture
3.3.4 Fraunhofer diffraction and examples

3.3.5 MATLAB example: Fraunhofer diffraction
of a square aperture
3.4 Fourier Transforming Property of Ideal Lenses
3.5 Gaussian Beam Optics and MATLAB Example
3.5.1 q-transformation of Gaussian beams
3.5.2 Focusing of a Gaussian beam
3.5.3 MATLAB example: propagation of a Gaussian beam
Chapter 4 : Optical Propagation in Inhomogeneous Media
4.1 Introduction: The Paraxial Wave Equation
4.2 The Split-step Beam Propagation Method
4.3 Wave Propagation in a Linear Inhomogeneous Medium
4.3.1 Optical propagation through graded index fiber
4.3.2 Optical propagation through step index fiber
4.3.3 Acousto-optic diffraction
4.4 Wave Propagation in a Nonlinear Inhomogeneous Medium
4.4.1 Kerr Media
9
10
11
15
18
19
25
32
39
40
43
43
48
53

57
61
63
67
76
80
84
85
87
88
97
97
99
101
102
108
111
117
118
viii Contents
4.4.2 Photorefractive Media
Chapter 5 Single and Double Lens Image Processing Systems
5.1 Impulse Response and Single Lens Imaging System
5.2 Two-Lens Image Processing System
5.3 Examples of Coherent Image Processing
5.4 Incoherent Image Processing and Optical Transfer Function
5.5 MATLAB Examples of Optical Image Processing
5.5.1 Coherent lowpass filtering
5.5.2 Coherent bandpass filtering
5.5.3 Incoherent spatial filtering

Chapter 6: Holography and Complex Spatial Filtering
6.1 Characteristics of Recording Devices
6.2 The Principle of Holography
6.3 Construction of Practical Holograms
6.4 Reconstruction of Practical Holograms and Complex Filtering
6.5 Holographic Magnification
6.6 Ray Theory of Holograms: Construction and Reconstruction
Chapter 7: Contemporary Topics in Optical Image Processing
7.1 Theory of Optical Heterodyne Scanning
7.1.1 Bipolar incoherent image processing
7.1.2 Optical scanning holography
7.2 Acousto-Optic Image Processing
7.2.1 Experimental and numerical simulations of 1-D
image processing using one acousto-optic cell
7.2.2 Improvement with two cascaded
acousto-optic cells
7.2.3 Two-dimensional processing and four-corner
edge enhancement
7.3 Photorefractive Image Processing
7.3.1 Edge enhancement
7.3.2 Image broadcasting
7.3.3 All-optical joint transform edge-enhanced
correlation
7.4 Dynamic Holography for Phase Distortion Correction of Images
124
133
133
138
140
146

150
150
155
160
169
170
173
186
189
193
199
207
208
214
219
226
227
231
235
239
241
243
245
248
Subject Index 257
Chapter 1
Introduction to Linear Systems
1.1
1.2
1.3

One and Two-dimensional Fourier Transforms
The Discrete Fourier Transform
Linear Systems, Convolution and Correlation
In this Chapter, we introduce readers to mathematical basics that
are often used throughout the rest of the book. First, we review some of
the properties of the Fourier transform and provide examples of two-
dimensional Fourier transform pairs. Next we introduce readers to
discrete Fourier transforms since this serves as the basis for Fast Fourier
transform algorithms that will be used for simulations using MATLAB.
Finally, we discuss properties of linear systems and the concept of
convolution and correlation.
1.1 One and Two-dimensional Fourier
Transforms
The one-dimensional (I-D) spatial Fourier transform of a square-
integrable function f (z) is given as [Banerjee and Poon (1991)]
F(k~) - f_~f(z)exp(jk~z)dz- f~{f(z)}.
(1.1-1)
The inverse Fourier transform is
f(x) - ~f~o F(k~)exp( - jk~x) dx - ~~ {F(/c~)}. (1.1-2)
2 1 Introduction to Linear Systems
The definitions for the forward and backward transforms are consistent
with the engineering convention for a traveling wave, as explained in
Banerjee and Poon (1991). If
f(x)
denotes a phasor electromagnetic
quantity, multiplication by exp(jwt) gives a collection or spectrum of
forward traveling plane waves.
The two-dimensional (2-D) extensions of Eqs. (1.1-1), (1.1-2) are
F(kx,kv) - f_~f~o~f (x, y)exp(jkxX + jkyy) dxdy
= ,Txy{f(x, Y)},

(1.1-3)
1 O<3
f (x,y) - ~ f_o~F(k~, kv) exp(
-
jk~x - jkyy) dxdy
=
(1.1-4)
In many optics applications, the function
f(x,y)
represents the
transverse profile of an electromagnetic or optical field at a plane z.
Hence in Eqs. (1.3-3) and (1.3-4),
f(x,y)
and
F(kx,kv)
have z as a
parameter. For instance, Eq. (1.1.4) becomes
1 OO
f (x,y;z) - -g~ f_o F(kx, ky, z)
exp( -
jk~x - jkyy) dxdy.
(1.1-5)
The usefulness of this transform lies in the fact that when
substituted into the wave equation, one can reduce a three-dimensional
(3-D) partial differential equation (PDE) to a one-dimensional ordinary
differential equation (ODE) for the spectral amplitude
F(k~, kv; z).
Typical properties and examples of two-dimensional Fourier
transform appear in the Table below.
Function in (x, y) Fourier transform in

(kx, ky)
1. f(x,y)
2. f (x-xo, y -
Yo)
3. f (ax, by); a, b
complex constants
4. f*(x,y)
s.r(~,v)
6. Of(x, y)/Ox
7. delta function
F(~x,~)
F(kx,ky)exp(jkxXO + jkyyo)
1 F(kz "
r*(- kx,- k~)
47r2f(-
kx,- ky)
- jk~F(~z,k~)
1.2 The Discrete Fourier Transform 3
1 oo
(5(:c, Y)= ~ ~2 f-oo
e+Jk~x+jk~Ydzdy
8.1
9. rectangle function
rect(x, y) - rect(x)rect(y),
where rect(x)= ( l'lx <1/2
0, otherwise /
\
10. Gaussian
exp[- c~(x 9 + ye)]
11. comb function

(x)
x y -comb ~ comb N , comb ~,
X
where comb
~ =~-2~ ~(x - nxo)
t~=-oo
1
4 7c2 6 ( kx ,ky )
sinc function
sinc( kx k~ kx
, ~ ) - sinc( ~ )sinc( ~),k~
where sinc(x)
- sin(Trx)
7rz
Gaussian
2 2
kx + k v
~-exp[~ - -7S]
comb function
comb ~0' ~ '
where
kxo=27r/xo, kyo=27r/yo
Table 1.1 Properties and examples of some two-dimensional Fourier Transforms.
1.2 The Discrete Fourier Transform
Given a discrete function f(nA), n- 0, N-I, where A is the
sampling interval in x, a corresponding periodic function fp(nA) with
period NA can be formed as [Antoniou (1979)]"
OO
fp(nA) - ~
f(nA + rNA)

(1.2-1)
r=-oo
The discrete function f(nA) may be formed by the discrete values of a
continuous function
f(x)
evaluated at the points
x - nL.
The
discrete Fourier transform
(DFT) of
fp(nA)
is defined as
N-1
Fp(mK)- E
fp(nA)exp(jmnKA) K- 2~
, - NA" (1.2-2)
n=0
The inverse DFT is defined as
N-1
fp(nA) - ~ Fp(mK)exp( -
jmnKA).
(1.2-3)
rn=0
For properties of the DFT, e.g., linearity, symmetry, periodicity etc., as
well as relationship to the z-transform, the Fourier transform and the
Fourier series, the readers are referred to any standard book on digital
signal processing [Antoniou (1979)].
4 1 Introduction to Linear Systems
For the purposes of this book, the DFT is a way of numerically
approximating the continuous Fourier transform of a function. The DFT

is of interest because it can be efficiently and rapidly evaluated by using
standard
fast Fourier transform
(FFT) packages. Note that the direct
evaluation of the DFT requires N complex multiplications and N- 1
complex additions for each value of
Fp(mK),
and since there are N
values to determine, N 2 multiplications and
N(N-
1) additions are
necessary. However, by using FFT algorithms, such as decimation in
time or decimation in frequency, the number of multiplications can be
reduced to
(N/2)log2N.
For example, if N > 512, the number of
multiplications is reduced to less than 1% of that required by direct
evaluation. Details of FFT algorithms can be found in any standard
digital signal processing text, see for instance, Antoniou (1979). We will
use FFT concepts in beam propagation problems in Chapter 4 and in
image processing, in Chapters 5-7.
The direct connection between the continuous Fourier transform
and the DFT is given below. For a function
f(x)
and its continuous
Fourier transform
F ( kx ) ,
I KI <
(1.2-4)
In Eq. (1.2-4),

Fp(mK)
is defined, as in Eq. (1.2-2), to be the DFT of
fp(nA). The equality holds for the fictitious case when the function is
both approximately space and spatial frequency limited.
1.3 Linear Systems, Convolution and
Correlation
A system
is the mapping of an input or set of inputs into an output
or set of outputs. A convenient representation of a system is a
mathematical operator [Poularikas and Seely (1991)]. For instance for a
single-input single-output system,
fo(x, v) - v)},
(1.3-1)
where
fi
and
fo
are the input and output, respectively, and where P~y is
the operator.
A system is linear if for all complex constants a and b,
1.3 Linear Systems, Convolution and Correlation 5
Pxv{afil (x, y) + bfi2(x, y)}
= aPxy{fil (x, y)) +
bP~y{f~2(x,
y)},
(1.3-2)
that is, the overall output is the weighted sum of the outputs due to inputs
fil and fi2. This feature is particularly useful in constructing the output
for a given input, knowing the output for an elementary input like the
delta function.

For a delta function input of the form
~5(x- x',y- y~),
the
A
output
Pzy
{6(x - x', y - y')} -
h(x, y, x', y')
is called the
impulse
response
of the linear system. Using the
sifting property
of delta
functions, we know that an arbitrary function
fi(x, y)
can be represented
as
(1.3-3)
i.e.,
fi(x, y)
can be regarded as a linear combination of weighted and
shifted delta functions. We can then write the output
fo(X, y)
of the
linear system as
- L~L~f~(~', y')h(~, y, ~', y') d~'ay'.
(1.3-4)
Now, a linear system is called
space-invariant

if the impulse response
h(x, y, x', y')
depends only on x - x', y - y', that is,
A
h(~, u, ~', y') - h(~ - ~', y - y').
(~.3-5)
Thus for linear space-invariant systems, the output
fo(X, y)
from Eq.
(1.3-4) can be rewritten as
fo(~, y) - L~L~f~(~', y')h(~ - ~', y - y') a~'dy'.
(1.3-6)
6 1 Introduction to Linear Systems
Now the
convolution 9(x, y)
of two functions 91 (x, y) and
g2(x, y)
is
defined as
9(x, y) f_~oof_~o~gl (x', y')g2(x - x', y - y') dx'dy'
= g~ (x, v),9~(x, y)
(1.3-7)
Using this definition, Eq. (1.3-6) can be reexpressed as
fo(~, v) - f~(x, v),h(~, v) - h(~, v), f~(~, v)
(1.3-8)
It can be readily shown that the Fourier transform
G(kx, ky)of
9(x, y)is
related to the Fourier transforms
G1,2(kz,

ky) of
gl,2(x, y)
as
(1.3-9)
Hence, using this property, it follows that
Fo(kx, k~) =f /(kx, k~)H(kx, k~),
(1.3-10)
where
Fo(k~,
kv),
F~(k~, ky)
and
H(kx, lcy)
are the Fourier transforms of
fo(X, y), fi(x, y),
and
h(x, y),
respectively.
H(k~, ky)
is called the
transfer function
of the system.
The
correlation s(x,
y)of two functions
sl(x, y)
and
s2(x, y)
is
defined as

= ~ (x, v) | ~ (~, v).
(1.3-11)
Note upon comparing with Eq. (1.3-7) that this can be rewritten as
8(X, y) 81(X, y) @ 82(X, y)
= ~ (x, v),~ ( - x, - v) - ~( - x, - v),~ (~, v),
(1.3-12)
where the last step in the above relation can be verified by writing down
the entire integral and making a simple substitution. Now, using the
properties of Fourier transforms it follows that
1.3 Linear Systems, Convolution and Correlation 7
S(kx, =s; (kx, k )S:(kx,
(1.3-13)
where
S(kx, kv),
Sl(]cx,
~y)
and
S2(k~, ky)
are the Fourier transforms of
s(x, y), s~ (x, y)
and s 2 (x, y), respectively.
We will use properties of convolution in our discussion on
transfer functions for propagation in Chapter 3, and properties of
correlation in connection with matched filtering and image processing in
Chapter 6.
Problems
1.1
Verify the Fourier transform pairs 9, 10 and 11 in Table 1.1.
1.2
From first principles find the Fourier transforms of:

(a) the
signumfunction
sgn(x, y) - sgn(x)sgn(y), where
sgn(x) - 1, x > 0,
= 0, x- 0,
= - 1, x < 0.;
(b) the
triangle function
a(x, y) - A(x)A(y), where
A(x)- 1 - I~1,
<
1,
0, otherwise;
(c)
sech(x/Xo)Sech(y/yo ).
1.3
Verify that
fi(x, y).h(x, y) - h(x, y). fi(x, y).
1.4
Find the Fourier transforms of
(i) [91 (x, y)*92(x, y)]g3(x, y), (ii)
[91(x, y)g2(x, g)]*g3(x, y).
Express your results in terms of the
Fourier transforms of 91,2,3.
1.5 Prove
Parseval's theorem:
ee oe 1 oe oe
f_~f_~lf(x, y)[2dxdy - ~ ~ f_~f_~[F(kx, kyl2dkxdk,.
8 1 Introduction to Linear Systems
1.6

Find the DFTs of the following periodic functions, defined over a
period as"
(a) fv(nA) = 1 for n- 0,2,4,6
= 0 for n - 1,3,7;
(b) fv (nA) = 1 for n - 0,1,2,3
= 0 for n - 4,5,6,7.
Write a MATLAB program to find the FFTs of the above
functions, and compare with your analytical results.
References
1.1
1.2
1.3
Banerjee, P.P., and T C. Poon (1991).
Principles of Applied
Optics.
Irwin, Boston.
Antoniou, A. (1979).
Digital Filters. Analysis and Design.
Mc.
Graw Hill, N.Y.
Poularikas A.D., and S. Seely (1991).
Signals and Systems.
PWS-
Kent, Boston.
Chapter 2
Geometrical Optics
2.1
2.2
2.3
2.4

2.5
Fermat's Principle
Reflection and Refraction
Refraction in an lnhomogeneous Medium
Matrix Methods in Paraxial Optics
2.4.1 The ray transfer matrix
2.4.2 Illustrative examples
Ray Optics using MATLAB
In
geometrical
optics, we view light as particles of energy
traveling through space. The trajectory of these particles follows along
paths that we call
rays.
We can describe an optical system comprising
elements such as mirrors and lenses by tracing the rays through the
system. In vacuum or free space, the speed of light particles is a constant
approximately given by c - 3 x 10 8 m/s. The speed of light in a
transparent homogeneous material, which we term v, is again a constant
but less than c. This constant is a physical characteristic or signature of
the material. The ratio
c/v
is called the
refractive index n
of the material.
We can derive the laws of geometrical optics, namely reflection
and refraction, using a simple axiom known as
Fermat's principle.
This
is an extremum principle from which we can trace the rays in a general

optical medium. Based on the laws of reflection and refraction, we will
introduce a matrix approach to analyze ray propagation through an
optical system.
Geometrical optics is a special case of
wave
or
physical
optics,
which will be mainly our focus through the rest of the Chapters in the
10
2 Geometrical Optics
book. Specifically, it can be shown that we can recover geometrical
optics by taking the limit in which the wavelength of light approaches
zero. In this limit, diffraction and the wave nature of light is absent.
2.1 Fermat's Principle
In classical mechanics, Hamilton's principle of least action
provides a recipe to find the optimum displacement of a conservative
system from one coordinate to another [Goldstein (1950)]. Similarly, in
optics, we have Fermat's principle which states that the path a ray of
light follows is an extremum in comparison with the nearby paths. In
Section 2.2, we will use Fermat's principle to derive the laws of
geometrical optics.
We now give a mathematical enunciation of Fermat's principle.
Let n(x, y, z) represent a position-dependent refractive index. Then
ds nds
C /1"~ ~ C
represents the time taken to traverse the geometric path ds in a medium
of refractive index n as c is the speed of light in free space. Thus, the
time taken by the ray to traverse a path C between points A and B (see
Figure 2.1) is ! fc n(x, y z) ds

C ~ "
C
J
A
B
Figure 2.1 A ray of light traversing a path C between points A and B.
2.2 Reflection and Refraction 11
The integral above is called the
optical path length
(OPL).
According to Fermat's principle, the ray follows the path for which the
OPL is an extremum"
6(OPL) - 6 fc
n(x,
y, z) ds - O .
(2.1-1a)
The variation of the integration means that we find the partial
differentials of the integral with respect to the free parameters in the
integral. This will become clear in the next Section where we derive the
laws of reflection and refraction when we have a common boundary
between two media of different refractive indices. In a
homogeneous
medium,
i.e., in a medium with a constant refractive index, the rays are
straight lines.
We can also restate Fermat's principle as a
principle of least time.
To see this, we divide Eq. (2.1-1 a) by c to get
~ (S fc n(x, ,z) ds - O.
(21 lb)

c Y "-
We remark that Eq. (2.1-1b) is
incorrectly
called the least time
principle. To quote Feynmann [Feynmann (1963)], Eq. (2.1-1 b) really
means that "if we make a small change in the ray in any manner
whatever, say in the location at which it comes to the mirror, or the
shape of the curve, or anything, there will be no first order change in the
time; there will be only a second order change in the time."
2.2 Reflection and Refraction
When a ray of light is incident on the boundary MM' separating
two different media, as in Figure 2.2, observation shows that part of the
light is reflected back into the first medium, while the rest of the light is
refracted as it enters the second medium. The directions taken by these
rays are described by the laws of reflection and refraction. We will now
use Fermat's principle to derive the two laws.
12
2 Geometrical Optics
Incident ray~N~ ~Reflected ray
.,q o;/
M Medium 1 ,~ M'
Medium 2
o,
efracted ray
Figure 2.2 Reflected and refracted rays for light incident at the interface of two media.
Consider a reflecting surface as shown in Figure 2.3. Light from
point A is reflected from the reflecting surface to point B, forming the
angle of incidence 0i and the angle of reflection Or, measured from the
normal to the surface. The time required for the ray of light to travel the
path AO + OB is given by t - (AO + OB)/v, where v is the velocity of

light in the medium containing the points AOB. The medium is
considered isotropic for convenience. From the geometry, we find
1 1/2 1/2
t(z) - ~([h~ + (d- z)~] + [h~ + z2l
).
(2.2-1)
d
z
A '~
B
hi
h2
////////////////////
Figure 2.3 Incident (AO) and reflected (OB) rays.
2.2 Reflection and Refraction
13
According to the least time principle, light will find a path that
extremizes t(z) with respect to variations in z. We thus set dt(z)/dz
= 0
to get
a-~ _ z (2.2-2)
[h~-'F-(d-z)2] 1/2 [h 2+z2]
1/2
or
sin Oi = sinO~
(2.2-3a)
so that
0~ - 0r. (2.2-3b)
We can readily check that the second derivative of t(z) is positive so that
the result obtained corresponds to the

least time principle.
Equation
(2.2-3) states that the angle of incidence is equal to the angle of
reflection. In addition, Fermat's principle also demands that the incident
ray, the reflected ray and the normal all be in the same plane, called the
plane of incidence.
Let us now use Fermat's principle to analyze refraction as
illustrated in Figure 2.4.
Ot
and 0i are the angles of transmission and
incidence, respectively, measured once again from the normal to the
interface. The time taken by the light to travel the distance AOB is
t(z)-
AOw1
+ OB,/)2 [h12-jrz2]l/2~Vl +
[h~+(d-z)2]~/~~ ,
(2.2-4)
where vx and v2are the light velocities in media 1 and 2, respectively. In
order to minimize t(z), we set
dt __ z (d-zl
vl[h~+z211/2 v2[h ~+(d_z)2ll/2 = O.
(2.2-5)
14
2 Geometrical Optics
hi
0 Medium 1
f
h2
Medium 2
B

Figure 2.4 Incident (AO) and transmitted or refracted (OB) rays.
Using the geometry of the problem, we conclude that
si,~o~= ,i,~o,.
(2.2-6a)
"V 1 V 2
Now
v~,~ - c/n~,~
where n~,~ are the refractive indices of media 1 and 2,
respectively. Equation (2.2-6a) may be restated as
~i,~o~_ '2z
(2.2-6b)
sinOt ~ n 1 '
where
n~/n I
is the
relative refractive index
of medium 2 with respect to
medium 1. Equation (2.2-6) is called
Snell's law of refraction.
Again,
as in reflection, the incident ray, the refracted ray, and the normal all lie
in the same plane of incidence. Snell's law shows that when a light ray
passes obliquely from a medium of smaller refractive index into one that
has a larger refractive index, it is bent toward the normal. Conversely, if
the ray of light travels into a medium with a lower refractive index, it is
bent away from the normal. For the latter case, it is possible to visualize
a situation where the refracted ray is bent away from the normal by
2.3 Refraction in an Inhomogeneous Medium 15
exactly 90 ~ . Under this situation, the angle of incidence is called the
critical angle Oc,

given by
sin O~ - n2/n 1
(2.2-7)
When the incident angle is greater than the critical angle, the ray
originating in medium 1 is totally reflected back into medium 1. This
phenomenon is called
total internal reflection
(TIR). The optical fiber
uses this principle of total reflection to guide light, and the mirage on a
hot summer day is a phenomenon due to the same principle.
2.3 Refraction in an Inhomogeneous Medium
In the last Section, we have discussed refraction between two
media with different refractive indices, i.e., possessing a discrete
inhomogeniety in the simplest case. Consider, now, a medium
comprising a continuous set of thin slices of media of different refractive
indices as shown in Figure 2.5. At every interface, the light ray satisfies
Snell's law according to
nl sin
01
n2sin 02 nasin 03 =
(2.3-1)
Thus, we may put
nsin 0 nl sin O1 ,
(2.3-2)
where n(z) and
O(z)
stand for the refractive index and the angle in a
general layer, respectively, at location z. In the limiting case of
continuous variation of the refractive index, which defines an
inhomogeneous medium,

the piecewise linear trajectory of the ray
becomes a continuous curve, as shown in Figure 2.6. If
ds
represents the
infinitesimal arc length along the curve, then
16 2 Geometrical Optics
t3
n2
n3 I
I I
04,
I I
n4 I04~ ,
I
///5
Figure 2.5 Rays in a layered medium in which the refractive index is piecewise
continuous.
(d~)~ - (dx)~ + (d~) ~,
(2.3-3)
where we restrict ourselves to two dimensions. Also, from Figure 2.6,
dz/ds - sin O.
(2.3-4)
~A
&
Z
Figure 2.6 The path of a ray in a medium with a continuous inhomogeniety.

×