2d “continuous space” signals and systems

64
Chapter CS 2D “Continuous Space” Signals and Systems Contents 2D Signals and Systems (“Continuous Space”) .................................... CS.2 Classification of signals/images .......................................... CS.3 Periodic images .................................................. CS.5 Simple image transformations ........................................... CS.7 Simple image classes ............................................... CS.8 Important 2D signals ............................................... CS.10 2D Dirac impulse ................................................. CS.12 Systems for 2D signals (Imaging Systems) .................................... CS.16 Classification of systems .............................................. CS.17 Impulse response ................................................. CS.21 Shift invariance .................................................. CS.25 Convolution .................................................... CS.26 Magnification and LSI systems .......................................... CS.29 Representation of Signals by Orthogonal Bases ................................... CS.30 Fourier series ................................................... CS.37 Fourier Transforms .................................................. CS.40 Two-dimensional Fourier transform ........................................ CS.40 Relation to one-dimensional Fourier transform .................................. CS.41 2D Fourier transform properties .......................................... CS.43 Properties that are analogous to 1DFT properties ................................. CS.43 Generalized Fourier transforms .......................................... CS.45 Properties that are unique to the 2D FT ...................................... CS.46 Hankel transform ................................................. CS.46 Other 2D transforms ................................................ CS.49 Bandwidth and time-bandwidth products ..................................... CS.50 Sampling ........................................................ CS.51 Signal reconstruction/interpolation ........................................ CS.54 Computing Fourier transforms from sampled images ............................... CS.57 Discrete Fourier Transform ............................................ CS.59 Fast Fourier Transform .............................................. CS.60 Summary of key relationships ........................................... CS.60 Appendix: Vector Spaces and Linear Operators ................................... CS.62 CS.1

Upload: others

Post on 16-Oct-2021

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 2D “Continuous Space” Signals and Systems

Chapter CS

2D “Continuous Space” Signals and Systems

Contents

2D Signals and Systems (“Continuous Space”) . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . CS.2

Classification of signals/images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . CS.3

Periodic images . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . CS.5

Simple image transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . CS.7

Simple image classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . CS.8

Important 2D signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . CS.10

2D Dirac impulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . CS.12

Systems for 2D signals (Imaging Systems) . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . CS.16

Classification of systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . CS.17

Impulse response . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . CS.21

Shift invariance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . CS.25

Convolution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . CS.26

Magnification and LSI systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . CS.29

Representation of Signals by Orthogonal Bases . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . CS.30

Fourier series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . CS.37

Fourier Transforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . CS.40

Two-dimensional Fourier transform . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . CS.40

Relation to one-dimensional Fourier transform . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . CS.41

2D Fourier transform properties . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . CS.43

Properties that are analogous to 1DFT properties . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . CS.43

Generalized Fourier transforms . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . CS.45

Properties that are unique to the 2D FT . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . CS.46

Hankel transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . CS.46

Other 2D transforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . CS.49

Bandwidth and time-bandwidth products . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . CS.50

Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . CS.51

Signal reconstruction/interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . CS.54

Computing Fourier transforms from sampled images . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . CS.57

Discrete Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . CS.59

Fast Fourier Transform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . CS.60

Summary of key relationships . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . CS.60

Appendix: Vector Spaces and Linear Operators . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . CS.62

CS.1

Page 2: 2D “Continuous Space” Signals and Systems

CS.2 c© J. Fessler, January 6, 2005, 23:23 (student version)

2D Signals and Systems (“Continuous Space”)

Many image processing papers address the following scenario: one is given a digital image and one would like to process thatimage to form another image, or to apply an algorithm for extracting some “information” from it. However, except for computer-generated images (like digital animation), generally digital images originate from some (continuous) real-world scene, recorded byan imaging system that includes “analog” components like lenses. For a complete view of image processing, one must be familiarwith the basic principles of such imaging systems. Many suchsystems are (approximately) linear and shift-invariant, so many ofthe classical “signals and systems” concepts apply, albeitgeneralized to 2D (or 3D) rather than in 1D.

So our first goal is a brief review of 2D “continuous” or “analog” signals and systems. (Essentially EECS 316 in 2D).

Overview• Definitions• Simple signal transformations (shift, scale). New: rotation, warping.• Signal classes (even, odd, periodic, ...). New: circular symmetry, separable.• Important signals (impulse functions, sinusoids)• System classes: (linear, stable, invertible, causal, static, shift-invariant). New: rotation invariant.• Impulse response (point-spread function)• Linear shift-invariant (LSI ) systems• Superposition integral,convolution, and properties. New: magnification• LSI system properties in terms of PSF• Orthogonal signal representation• Fourier series / eigenfunctions / properties• 2D Fourier transform• 2D FT properties (convolution etc.). New: rotation, separability, circular symmetry• 2D sampling/ recovery via interpolation. New: non-Cartesian sampling.

What major 1D topics are absent?

• ??• ??

This review will emphasize the similarities anddifferencesbetween the 1D and 2D formulae. This treatment serves to reinforcesignals and systems concepts learned previously, while simultaneously introducing a few new concepts and properties that areunique to 2D (and higher) problems.

References: Bracewell’s two books [1,2].

Page 3: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.3

Classification of signals/images

Mathematically, asignal is afunctionof one or more independent variables. Animageis a function of two (or perhaps 3) variables.

A function is a mapping from one set of values, called thedomain, to another set called therange. When introducing a newfunction, such as one calledf , one generally writesf : D 7→ R and then describes the domainD, the rangeR, and the valuef(x) ∈ R that the function assigns to an arbitrary memberx of the domainD.

To say that an image is a function of two or three variables is arather broad and vague definition. To get more specific we makesomeclassifications!

Domain dimension

One way to classify signals is by thedimension of the domainof the function,i.e., how many arguments the function has.• A one-dimensional(1D) signal is a function of a single variable,e.g., time or elevation above sea level. In this case the range

is a subset ofR = (−∞,∞), the set of all real numbers.• An M -dimensionalsignal is a function ofM independent variables. In this case, the range is a subset ofR

M = (−∞,∞)M ,the set of allM -tuples of real numbers.

Example. A sequence of “black and white” (really: grayscale) TV picturesI(x, y, t) is a scalar-valued function of three arguments:spatial coordinatesx andy, and time indext, so it is a 3D signal.

We focus ontwo-dimensional (2D) signals,i.e., images, generally considering the independent variablesto be spatial position(x, y).

Range dimension

Another way to classify signals is by thedimension of the rangeof the function,i.e., the dimension of the space of values thefunction can take.• scalaror single-channelsignals• multichannel signals

Example. A BW TV picture is scalar valued, whereas a color TV picture can be described as a three-channel signal, where thecomponents of the signal represent red, green, and blue (RGB). g(x, y) = [gR(x, y) gG(x, y) gB(x, y)]. We will consider bothscalar (grayscale) images and multichannel (e.g., color) images.

Discrete- vs. Continuous-Space Images• Continuous-space imagesor analog images

Defined for all locations/coordinates(x, y) ∈ R2 = (−∞,∞)2, or at least in some (usually rectangular) subset ofR

2, i.e., thedomain is this subset.Example. g(x, y) = e−(x2+y2), −∞ < x, y <∞.• Discrete-space images

Defined only for integer locations/coordinates(n,m) ∈ Z2, or at least in some (usually rectangular) subset ofZ

2, i.e., thedomain is this subset. Note thatZ , . . . ,−2,−1, 0, 1, 2, . . . . Often, g[n,m] denotes the image value at some discretelocation (xn, ym). The discrete locations are calledpixels. The image value at this location is called apixel value. Forexample, it often happens thatxn = n∆X, andym = m∆Y, where∆X and∆Y are horizontal and vertical pixel spacings. Inother words, the pixels form a rectangular grid. However, this is not the only possibility. (Note that it isincorrect to think ofg[n,m] as being zero for non-integer values of(n,m).)

Some of the common ways in which discrete-space images ariseare:• Sampling a continuous image at discrete positions• Integrating a continuous image over each of a set of pixel regions• Processing another discrete-space image

Notation• We will (usually) use parentheses for the arguments of continuous-space images,e.g., g(x, y), and square brackets for the

arguments of discrete-space images,e.g., g[n,m]. When it is helpful to further distinguish the two, we will addthe subscriptsaandd, as inga(x, y) andgd[n,m].• In these notes, as throughout much of engineering, when we write g(x, y), there are two possible interpretations:g(x, y) might

mean the value of the image at location(x, y) or it might refer to the entire image. The correct interpretation will usually beclear from context. Another approach is to simply writeg or g(·, ·) when referring to the entire image.

Page 4: 2D “Continuous Space” Signals and Systems

CS.4 c© J. Fessler, January 6, 2005, 23:23 (student version)

Focus on continuous-space images

As this chapter focuses on continuous-space images, from now on, unless stated otherwise, all images are presumed to becontinuous-space images.

Image support

The domain of an image is commonly called itssupport or support region. An image is said to havefinite or bounded supportif it does not extend to infinity in any direction. That is, there is a numberS <∞ such that if(x, y) is in the support/domain, then|x| ≤ S and|y| ≤ S.

Value characteristics• A continuous-valued imagecan take any value in some continuous interval.• A discrete-valued imageonly takes values from a countable set of possible values,e.g., a finite set as in0, 1, 2, . . . , 255 for

an 8-bit image, or a countably infinite set, as inZ.Typically arises fromquantization of a continuous-valued image (e.g., A-to-D conversion), or from counting (e.g., nuclearimaging).• A binary image only takes two values, typically 0 or 1.

Typically arises from thresholding a continuous-valued ordiscrete-valued image, or in the formation ofhalftone grayscaleimages.• For generality, we will consider bothreal-valued and complex-valued images. A real-valued image hasf(x, y) ∈ R. A

complex-valued image hasf(x, y) ∈ C, whereC denotes the set of all complex numbers of the formu + ıv, with u, v ∈ R andı =√−1.

• Sometimes image values have meaningful physical units, such as lumens. But often the image values are just relative “intensi-ties.”

Deterministic vs Random images

Whether a given set of images is considered to be deterministic or random is a matter of the philosophy of whatever mathematicalor statistical models that we assume. We will consider both deterministic and stochastic models for images.

Energy and power images

Theenergyof an imageg(x, y) with R2 as its support is defined as

E ,

∫ ∞

−∞

∫ ∞

−∞

| g(x, y) |2 dxdy .

Theaverage powerof an imageg(x, y) with R2 as its support is defined as

P , limT→∞

1

(2T )2

∫ T

−T

∫ T

−T

| g(x, y) |2 dxdy

= limR→∞

1

πR2

∫∫

(x,y) : x2+y2<R

| g(x, y) |2 dxdy .

Using circles of radiusT and√

2T that inscribe and surround the square[−T, T ] × [−T, T ], one can easily show that the abovetwo definitions of power are equivalent.• If E is finite (E <∞), theng(x, y) is called anenergy image, or is said to besquare integrable, andP = 0.• If E is infinite, thenP can be either finite or infinite. IfP is finite and nonzero, theng(x, y) is called apower image.• Some images are neither energy images nor power images, suchasg(x, y) = x2, for whichE =∞ andP =∞. Such signals

are generally of little practical engineering importance.• When an image has finite support, the integrals defining the energy and power are taken only over the support region and instead

of taking a limit in the definition of power, the integral is simply divided by the area of the support. In any event, power isenergy per unit area.• Using notation from functional analysis, letL2(S) denote the set of all real-valued functions (e.g., images) with supportS and

finite energy. For example, often one considers the collectionL2(R2) consisting of all finite energy images on the Cartesian

plane.• For complex-valued images,| g(x, y) |2 = g(x, y) g∗(x, y), whereg∗(x, y) denotes the complex conjugate ofg(x, y), where

(u + ıv)∗ = u− ıv.

Page 5: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.5

Periodic images

A 1D signalg(t) is calledperiodic with period T > 0 iff g(t) = g(t + T ) for all t ∈ R.

It would be tempting (but incorrect) to say that a 2D signal (image)g(x, y) is periodic ifg(x + TX, y + TY) = g(x, y), ∀x, y ∈ R

for someTX, TY > 0. However, “aperiodic” signals such asg(x, y) = e−|x−y| satisfy this condition (for anyTX = TY > 0). Sowe need a better condition.• An imageg(x, y) is calledperiodic with period (TX, TY) > 0 iff

g(x + TX, y) = g(x, y + TY) = g(x, y), ∀x, y ∈ R. (CS-1)

• Otherwiseg(x, y) is calledaperiodic.• Ordinarily, periodic images are presumed to have support equal toR

2, i.e., infinite support. One could also consider an imagewith finite support to be periodic, if the above periodicity property holds with(x, y) limited to the support.If g(x, y) is periodic with period (TX,TY), then

g(x, y) = g(x + TX, y) = g((x + TX) + TX, y) = g(x + 2TX, y) = · · · = g(x + nTX, y + mTY), ∀n,m ∈ Z.

An image that is periodic with period(TX, TY), is also periodic with period(nTX,mTY), for any integersn,m 6= 0.

Example. The imageg(x, y) = sin(2π[νXx + νYy])

is periodic with period(TX, TY) = (k/νX, l/νY) for any choices of nonzero integersk andl.

If one examines aslice through the image at angleθ along the line described parametrically by(x(t), y(t)) = (t cos θ, t sin θ) ,with t ranging from−∞ to∞, then one obtains the 1D signal

gθ(t) = sin(2π[νX cos θ + νY sin θ]t),

which is periodic with period1/(νX cos θ + νY sin θ). Notice how slices in different directions yield 1D signalswith differentperiods.

Example. The signalg(x, y) = e−|sin(2πx/5) + sin(2πy/3)| is periodic with period(5, 3). The following figure shows this signal.

x

y

A periodic 2D signal g(x,y)

0 5 10 150

3

6

9

12

0

1

Page 6: 2D “Continuous Space” Signals and Systems

CS.6 c© J. Fessler, January 6, 2005, 23:23 (student version)

Fundamental period?

In 1D, at this point we usually define thefundamental period to be the “smallest value” of the period satisfying (CS-1).

How do we define “smallest value” in 2D?

As we will see, there is not a unique way to define a smallest period.

Suppose an imageg(x, y) is periodic with some period(TX, TY) > 0, not necessarily the fundamental period. DefineTX,0 to bethe smallest value ofT for which (T, TY) is a period ofg(x, y). DefineTY,0 to be the smallest value ofT for which (TX,0, T ) isa period ofg(x, y). Then it would be natural to define(TX,0, TY,0) as thefundamental period of g(x, y). But such a definitionwould only be sensible if it were independent of whether we minimized overx or y first.

Is the preceding definition invariant to ordering of minimization?

Another approach is to define thefundamental period to be the smallest period of any 1D signal produced by a slice throughthe image. For example, for the sinusoidal signal above, theslice with smallest period has angleθ = tan−1(νY/νX) and period1/√

ν2X

+ ν2Y.

Exercise. Prove the above facts.

Yet another approach is to consider anyundominatedperiod(TX, TY) to befundamental, whereundominatedmeans there existsno other period(T ′

X, T ′

Y) such thatT ′

X≤ TX andT ′

Y≤ TY. With this definition, there may be a set of fundamental periods, rather

than just one.

Fortunately, defining the fundamental period is not terribly important, since the main place we use the concept of periodis with theFourier series (FS), and for FS it is not essential to use the fundamental period—any period will suffice.

Fact. Periodic signals are power signals withP = 1TXTY

〈TX〉

〈TY〉| g(x, y) |2 dxdy, where

〈T 〉denotes an integral over any

interval of lengthT .

Lim [3, p. 51] discusses a more “efficient” definition of period in a problem at the end of the first chapter. We can say an imageisperiodic iff

g(x, y) = g(x + T11, y + T12) = g(x + T21, y + T22), ∀x, y.

Although Lim does not state this, presumably one must require thatT11 > 0, T22 > 0, T21 6= T11, andT12 6= T22. With thisdefinition, apparently one would like to minimize|T11T22 − T12T21|. Is there a unique minimizer?

Page 7: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.7

Simple image transformations

Now we describe some simple mathematical operations,i.e., transformations, that transform an image into another image. Someof these operate directly on the value of an image, while others operate directly on the independent space variablesx andy, andonly indirectly on the image values. In other words, some operate on therangeand some on thedomain of the signal.

Amplitude transformations• Affine amplitude transformation:

g(x, y) = a f(x, y) +b.

• Nonlinear amplitude transformation:

g(x, y) =

255, a f(x, y) +b > gmax

a f(x, y) +b, gmin ≤ a f(x, y) +b ≤ gmax

0, a f(x, y) +b < gmin

This is often used to map an image to the range[0, 255] for display. Performed with MATLAB ’s imagesc function.

Spatial transformations• Space shifting or translation (e.g., camera panning):

g(x, y) = f(x− x0, y − y0)

• Mirroring (space reversal):g(x, y) = f(−x,−y)

(MATLAB ’s transpose , fliplr , andflipud commands)• Space scaling (zooming, magnification, minification , or shrinking):

g(x, y) = f(ax, ay)

Ordinarily, we takea > 0, because ifa < 0, then mirroring occurs in addition to space scaling.Zooming/magnification corresponds toa < 1, and shrinking/minification corresponds toa > 1.• Rotation (counterclockwise byφ radians):

g(x, y) = f

x cos φ + y sinφ︸ ︷︷ ︸

x′

, −x sin φ + y cos φ︸ ︷︷ ︸

y′

. (CS-2)

This is performed (in discrete-space) by MATLAB ’s imrotate function.This relationship is perhaps easiest understood inpolar coordinates. We write an imageg(x, y) in polar coordinates as

g(r, θ) = g(r cos θ, r sin θ),

in other words:(x, y) = (r cos θ, r sin θ). Usually we drop the subscript and just writeg(r, θ).In polar coordinates, image rotation is simply:

g(r, θ) = f(r, θ − φ). (CS-3)

Exercise. Verify that (CS-2) and (CS-3) are equivalent.• Generalspatial transformation (e.g., morphing or warping an image)

g(x, y) = f(TX(x, y), TY(x, y)),

where hereTX : R2 → R and likewise forTY. Used, for example, in video coding to approximately match one frame to the next

account for scene motion between frames.Performed with MATLAB ’s interp2 or griddata functions.

One nice method for spatial transformations is parameterized usingthin-plate splines.

There are numerous additional “transformations” that willconstitute a considerable fraction of our efforts in this course,e.g.,

gradient magnitude operation:g(x, y) =

√(

∂∂x f(x, y)

)2+(

∂∂y f(x, y)

)2

, histogram equalization, etc.

Page 8: 2D “Continuous Space” Signals and Systems

CS.8 c© J. Fessler, January 6, 2005, 23:23 (student version)

Simple image classes

Symmetric images

There are several ways to define symmetry properties of 2D images. For example, in examining brain images, we expect left-rightsymmetry. For establishing properties of the 2D FT, however, the most useful symmetry properties are the following.• g(x, y) haseven symmetryiff g(−x,−y) = g(x, y), ∀x, y• g(x, y) hasodd symmetry iff g(−x,−y) = − g(x, y), ∀x, y• g(x, y) is Hermitian symmetric iff g(−x,−y) = g∗(x, y), ∀x, y

We can decompose any imageg(x, y) into its even and odd parts, just as in the 1D case.

g(x, y) = Ev g(x, y)+ Od g(x, y)

Ev g(x, y) ,1

2[g(x, y) + g(−x,−y)] , Od g(x, y) ,

1

2[g(x, y)− g(−x,−y)] .

An alternate way to describe a symmetry property is to describe a simple image operation and then to consider the set of imagesthat are left unchanged for by the operation. For example, animage has even symmetry iff mirroring (i.e., space reversal) producesthe same image. That is, an image has even symmetry iff it isinvariant to mirroring. As another example, an image has oddsymmetry iff the transformationg(x, y) = − f(−x,−y) produces the same image.

Circular symmetry (No 1D analog!)

Another symmetry condition is particularly important. We say an imageg(x, y) is circularly symmetric or radially symmetriciff it is invariant to any rotation, or equivalently, iff

g(x, y) = g(u, v) whenever√

x2 + y2 =√

u2 + v2

or equivalently, iff

g(x, y) = gR

(√

x2 + y2)

, ∀x, y

for some 1D functiongR(·). Often we just writeg(r) rather thangR(r), and the reader must remember that if we considerr to be ascalar, theng(r) is a 1D function, but if we considerr =

x2 + y2, wherex andy are both variables, theng(r) is a 2D function.

Example: seepillbox and 2Dgaussianimages below.

Question: How would we define the “radially symmetric component” of an image?

Question: Can we decompose any image into a radially symmetric component plus some other meaningful compo-nent?

Rotational symmetry

An imageg(x, y) is said to haven-fold rotational symmetry iff it is invariant to a rotation by angle2π/n, equivalently, iff

g(x, y) = g(cos(2π/n) x− sin(2π/n) y, sin(2π/n) x + cos(2π/n) y), ∀x, y.

Example: rect2(x, y) has four-fold rotational symmetry.

Caution: All circularly symmetric images haven-fold rotational symmetry for every givenn ∈ N , 1, 2, . . ., but the reverse isnot true.

Page 9: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.9

Separable images (No 1D analog!)

For convolution, Fourier transforms, and other analyses, we often simplify results by exploiting separability in one of the twofollowing forms.• An imageg(x, y) is calledseparable in Cartesian coordinates(or justseparable) iff

g(x, y) = gX(x)gY(y),

for some 1D functionsgX(·) andgY(·).• An imageg(x, y) is calledseparable in polar coordinates(or polar separable) iff

g(x, y) = gR

(√

x2 + y2)

gΘ(tan−1(y/x)),

or equivalently: iffg(r, θ) = gR(r) gΘ(θ), for some 1D functionsgR(·) andgΘ(·), wherer =√

x2 + y2, θ = tan−1(y/x).

Occasionally we might also have use for functions that areadditively separable:

g(x, y) = gX(x) + gY(y).

Exercise. What images areboth(Cartesian) separable and radially symmetric? (Be as general as possible.)

Exercise. What images arebothadditively separable and radially symmetric?

Exercise. Does circular symmetry imply polar separability, or vice versa? ??

Page 10: 2D “Continuous Space” Signals and Systems

CS.10 c© J. Fessler, January 6, 2005, 23:23 (student version)

Important 2D signals

• Thepillbox image ordisk image is

g(x, y) , rect(√

x2 + y2)

= rect(r), where rect(t) ,

1, |t| < 1/20, otherwise.

• A closely-related image is thecirc function, which is unity over theunit disk :

g(x, y) = circ(√

x2 + y2)

= circ(r) = rect(r

2

)

. (CS-4)

• A box image would be defined by

g(x, y) = rect2

(x− x0

wX

,y − y0

wY

)

, rect

(x− x0

wX

)

rect

(y − y0

wY

)

. (CS-5)

This function is unity within a box of sizewX by wY centered at(x0, y0), and is zero elsewhere.

• The 2Dgaussianimageg(x, y) = e−πr2

= e−πx2

e−πy2

. (CS-6)

• The class of2D sinusoidal imagesis given by

g(x, y) = α cos(2π[νXx + νYy] + φ), whereνX, νY ∈ R+ = (0,∞) andα ∈ R.

• The class of2D complex exponential signalsis given by

g(x, y) = α eı2π(νXx+νYy) , whereνX, νY ∈ R andα ∈ C.

These are complex signals, so we visualize them by displaying their real and imaginary parts, which are sinusoidal signals.

−1−0.5

00.5

1

−1−0.5

00.5

1−1

0

1

xy

x

y

Re[g(x,y)] for fX=2 f

Y=0

−1 −0.5 0 0.5

−1

−0.5

0

0.5

x

y

Im[g(x,y)] for fX=2 f

Y=0

−1 −0.5 0 0.5

−1

−0.5

0

0.5

−1−0.5

00.5

1

−1−0.5

00.5

1−1

0

1

xy

x

y

Re[g(x,y)] for fX=2 f

Y=−1

−1 −0.5 0 0.5

−1

−0.5

0

0.5

x

y

Im[g(x,y)] for fX=2 f

Y=−1

−1 −0.5 0 0.5

−1

−0.5

0

0.5

What kind of symmetry does a 2D complex exponential signal have? ??

Which of the above are radially symmetric? ??

Which of the above are separable? ??

Displaying images in MATLAB

To efficiently generate (samples of) 2D signals in MATLAB and to display them as images, thendgrid or meshgrid commandsin conjunction withimagesc are very useful. Study the following example.

Page 11: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.11

−1 −0.5 0 0.5−1

−0.5

0

0.5

0

0.2

0.4

0.6

0.8

1

−1 −0.5 0 0.5−1

−0.5

0

0.5

0

0.2

0.4

0.6

0.8

1

x

y

−1 −0.5 0 0.5−1

−0.5

0

0.5

0

0.2

0.4

0.6

0.8

1

−1 −0.5 0 0.5 10

0.2

0.4

0.6

0.8

1

g 1(x,0

)

Profile

−1 −0.5 0 0.5 10

0.2

0.4

0.6

0.8

1

g 2(x,0

)

−1 −0.5 0 0.5 10

0.2

0.4

0.6

0.8

1

x

g 3(x,0

)

% fig_signal2a.m illustrate some 2d signals

nx = 32; x = [-nx/2:nx/2-1]/nx * 2;ny = nx; y = [-ny/2:ny/2-1]/ny * 2;[xx yy] = ndgrid(x,y); % useful trick for x,y grid!g1 = double(sqrt(xx.ˆ2 + yy.ˆ2) < 1/2);g2 = (abs(xx) < 1/2) .* (abs(yy) < 1/2);g3 = exp(-7 * (xx.ˆ2+yy.ˆ2));clf, clim = [0 1.01]; % grayscale limitscolormap(1-gray(256))subplot(321), imagesc(x,y,g1’, clim), axis xy square, col orbarsubplot(323), imagesc(x,y,g2’, clim), axis xy square, col orbarsubplot(325), imagesc(x,y,g3’, clim), axis xy square, col orbar, xlabel x, ylabel y

subplot(322), plot(x, g1(:,ny/2+1)), axis([-1 1 0 1.1])xlabel ’ ’, ylabel ’g_1(x,0)’, title(’Profile’)subplot(324), plot(x, g2(:,ny/2+1)), axis([-1 1 0 1.1])xlabel ’ ’, ylabel ’g_2(x,0)’subplot(326), plot(x, g3(:,ny/2+1)), axis([-1 1 0 1.1])xlabel ’x’, ylabel ’g_3(x,0)’orient tall, print(’fig_signal2a’, ’-deps’)

clf, c = ones(size(g1)); % a single mesh colorsubplot(321), mesh(xx, yy, g1, c), xlabel x, ylabel ysubplot(323), mesh(xx, yy, g2, c), xlabel x, ylabel ysubplot(325), mesh(xx, yy, g3, c), xlabel x, ylabel yorient tall, print(’fig_signal2b’, ’-deps’)

Figure CS.1: Illustration of simple 2D images, displayed via grayscale, profiles,i.e., g(x, 0), and mesh plots, and the MATLAB

code that generated those plots.

Page 12: 2D “Continuous Space” Signals and Systems

CS.12 c© J. Fessler, January 6, 2005, 23:23 (student version)

2D Dirac impulse

The 1D Dirac impulseδ(t) plays a central role in the analysis of 1D systems. The 2D Dirac impulseδ2(x, y) has an equallyimportant role for analysis of 2D systems.

Although the Dirac impulse is sometimes called the “Dirac delta function” in the engineering literature, it is not really afunction.In the branch of mathematics that deals rigorously with suchentities, they are calleddistributions .

We “define” a Dirac impulse by specifying itsproperties, rather than by giving an explicit formula forδ2(x, y) itself. Basically, itis defined by what it does as an integrand, although there are also a couple of other useful properties.

• Major properties

• Sifting property∫∞

−∞

∫∞

−∞g(x, y) δ2(x− x0, y − y0) dxdy = g(x0, y0) if g(x, y) is continuous at(x0, y0).

(It suffices for the limits of integration to cover the support of the impulse function.)This is by far the most important property, and it is the key tosimplifying the analysis of linear systems.• Sampling property g(x, y) δ2(x− x0, y − y0) = g(x0, y0) δ2(x− x0, y − y0) if g(x, y) is continuous at(x0, y0).

• Minor properties (these all follow from the sifting property!)• unit area property

∫∫δ2(x, y) dxdy = 1

• scaling property ??• symmetry property δ2(−x,−y) = δ2(x, y)• support property δ2(x− x0, y − y0) = 0 if x 6= x0 or y 6= y0.• relationship with unit step function:δ2(x, y) = ∂2

∂x∂y u(x)u(y)

• Separability:δ2(x, y) = δ(x) δ(y) (not essential)

No ordinary function can have all these properties. For example, any ordinary function that is zero everywhere except at(x, y) =(0, 0) will integrate to zero, rather than to unity.

However, there are many functions approximate the properties of a Dirac impulse, for example, many tall and narrow pulsefunctions that integrate to unity. The approximation improves as the pulse becomes taller and narrower. As an example, forintuition one can express the Dirac impulse as the limit of a unit-volume 2D function,e.g., a 2D Gaussian:

δ2(x, y) “ = ” limα→∞

δ2(x, y;α), δ2(x, y;α) = α2 e−πα2(x2+y2) .

The preceding formula is not really rigorous. However, whatwe really mean by the above equality is that for points(x, y) at whichg(x, y) is continuous, in the limit, integratingg(x′, y′) timesδ2(x

′, y′;α) over an interval containing(x, y) has the same effect asintegratingg(x′, y′) timesδ2(x

′, y′):

limα→∞

∫ ∞

−∞

∫ ∞

−∞

g(x′, y′) δ2(x′ − x, y′ − y;α) dx′ dy′ = g(x, y) . (CS-7)

In other words,δ2(x, y) is just an idealization of a tall narrow pulse likeδ2(x, y;α). The type of limit shown above can be studiedrigorously, and holds for many pulse-like functionsδ2(x, y;α), not just for Gaussians.

The Gaussian choice is useful when (many) derivatives ofδ2(x, y) are needed. More frequently, no derivatives are needed, andtherect choiceδ2(x, y;α) = α2 rect2(αx, αy) is more convenient.

Page 13: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.13

Sifting property

The sifting property written above can also be viewed as inducing a decomposition ofg(x, y) into (weighted) elementary functions,namely off-center Dirac impulses. Define

δ2(x, y;x′, y′) , δ2(x− x′, y − y′),

which one can visualize as follows.

x’x’

y’

y

x

Impulse Impulsey

y’

x

The usual 2D Dirac impulse located at the origin is simply

δ2(x, y; 0, 0) = δ2(x, y),

whereasδ2(x, y;x′, y′) is a Dirac impulse located at(x′, y′).

We can then rewrite the sifting property as follows:

g(x, y) =

∫∫

g(x′, y′) δ2(x, y;x′, y′) dx′ dy′ . (Picture)

Dirac impulses with nonlinear arguments

What doesδ(sin(x)) or δ2

(sin(x), y2

)mean? Study the descriptions on the next pages.

Page 14: 2D “Continuous Space” Signals and Systems

CS.14 c© J. Fessler, January 6, 2005, 23:23 (student version)

1D Dirac impulses with nonlinear arguments

For the 1D Dirac impulse, one can argue by simple change-of-variables that

δ(f(x)) =∑

xn : f(xn)=0

δ(x− xn)

|f(xn)|,

where thexn’s are the roots of the equationf(x) = 0 andf = ddxf .

As can be seen from the derivation below, this formula derives from the fact that at each rootxn, the derivative becomes a localscale factor. This formula is “valid” if the set of roots is finite (or perhaps even countable), iff is continuously differentiable andone-to-one in the neighborhood of each root, and iff is nonzero in the neighborhood of each root.

Derivation.Let Bn be a set of disjoint intervals such thatxn ∈ Bn butxm /∈ Bn for n 6= m. By the support property of the Dirac impulse:

∫ ∞

−∞

δ(f(x)) q(x) dx =∑

n

Bn

δ(f(x)) q(x) dx .

Now making the change of variablesx′ = f(x) we have

Bn

δ(f(x)) q(x) dx =

f(Bn)

δ(x′) q(f−1(x′))dx′

|f(f−1(x′))|=

q(f−1(0))

|f(f−1(0))|

=q(xn)

|f(xn)|=

∫ ∞

−∞

δ(x− xn)

|f(xn)|q(x) dx,

where we have applied the usual sifting property twice.

Example. The scaling propertyδ(ax) = 1|a| δ(x) for a 6= 0 is a simple special case of the general result above.

2D Dirac impulses with nonlinear arguments

What about in 2D? What isδ2(f(x, y), g(x, y))?

Assume that the set of roots that simultaneously solvef(x, y) = 0 andg(x, y) = 0 is finite, and thatf andg are differentiable neartheir zeros. Let(xn, yn) denote the coordinate pairs where bothf(xn, yn) = 0 andg(xn, yn) = 0. Then

δ2(f(x, y), g(x, y)) =∑

n

δ2(x− xn, y − yn)

|dn|,

wheredn is the (assumed nonzero) Jacobian determinant of

[f(x, y)g(x, y)

]

at (xn, yn), i.e., dn = det

[∂∂xf(x, y) ∂

∂y f(x, y)∂∂xg(x, y) ∂

∂y g(x, y)

]

.

“Proof.” Let Bn be a set of small disjoint disks such that(xn, yn) ∈ Bn. Then for any continuous functionq(x, y):∫∫

δ2(f(x, y), g(x, y)) q(x, y) dx dy =∑

n

∫∫

Bn

δ2(f(x, y), g(x, y)) q(x, y) dx dy

=∑

n

∫∫

T (Bn)

δ2(u, v) q(x, y)1

|J(u, v)| du dv =∑

n

1

dnq(xn, yn)

=∑

n

∫∫δ2(x− xn, y − yn)

dnq(x, y) dx dy =

∫∫[∑

n

δ2(x− xn, y − yn)

dn

]

q(x, y) dx dy

where we made the change of variablesu = f(x, y), v = g(x, y).

This is the basic idea. Some of the notation details need to beworked out...

Page 15: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.15

What does δ2(f(x, y), g(x, y)) mean if the set of simultaneous roots of f(x, y) = 0 and g(x, y) = 0 is uncountable?

Impulse “ribbons”

In some applications we need 1D Dirac impulses in the contextof a 2D problem, which requires different sifting properties than theusual formula. One can always determine the appropriate sifting property by returning to a first-principles expressionlike (CS-7).Typically a 2D integral containing a 1D Dirac impulse “sifts” to a 1D integral.

For example, in tomography, two ways to express a line integral at angleθ and radial distancer0 are as follows:∫∫

δ(x cos θ + y sin θ − r0) g(x, y) dxdy =

∫∫

δ(s− r0) g(s cos θ − l sin θ, s sin θ + l cos θ) dsdl

=

g(r0 cos θ − l sin θ, r0 sin θ + l cos θ) dl,

by making the change of variables[

sl

]

=

[cos θ sin θ− sin θ cos θ

] [xy

]

.

Curvilinear Dirac impulses

Bracewell [2, p. 130] shows that a 1D curvilinear Dirac impulse of the formδ(f(x, y)) has “strength”

S(x, y) =

1|grad f(x,y) | , f(x, y) = 0

0, otherwise,

where the slope in the direction normal to the contour wheref(x, y) = 0 is |grad f(x, y) | =√

( ∂∂xf)2 + ( ∂

∂y f)2. This leads to

the following sifting property [2, p. 132]:∫∫

g(x, y) δ(f(x, y)) dxdy =

C

S(s) g(x, y) ds,

whereC is the curve wheref(x, y) = 0, andds is the element of arc length along the curve.

Transformation of variables

The following result from multivariable calculus [4,5] wasused above.

SupposeT : U → Rn satisfies the following:

• T is continuously differentiable• T is one-to-one on a setR ⊆ Un, whereR has a boundary consisting of finitely many smooth sets and whereR and its boundary

are contained in the interior of the domain ofT .• det T ′, the Jacobian determinant ofT , is nonzero onR.

Then iff is bounded and continuous onT (R) then∫

T (R)

f dV =

R

(f T )|det T ′|dV.

Exercise. Find a suitable sifting property forδ(r − r0) = δ(√

x2 + y2 − r0

)

. Consider all possibler0 values.

Exercise. Find a suitable sifting property for1r δ(r).

Page 16: 2D “Continuous Space” Signals and Systems

CS.16 c© J. Fessler, January 6, 2005, 23:23 (student version)

Systems for 2D signals (Imaging Systems)

An imaging system, or justsystem, operates on a 2D signal called theinput image and produced a 2D signal called theoutputimage.

For continuous-space systems, the input signalf(x, y) is transformed by the system into the output signalg(x, y). (We focuson 2D-to-2D systems here, but of course 3D-to-3D and 3D-to-2D systems are also of considerable interest. Extensions to 3D arestraightforward.)

This mapping can be depicted as follows.

S g(x,y)f(x,y)System Operator Output ImageInput Image

f(x,y,z) g(x,y,z)

Design Parameters g = S[f]

Roughly speaking, there are two broad types of imaging systems: image capture systemsand image processing systems. Acamera and an X-ray scanner are examples of image capture systems. Zoom lenses, optical color filters, photographic film,andanalog photocopiers are examples of continuous-space image processing systems. A scanner / digitizer, a contrast enhancer, adenoiser, an image compressor and an edge detector are examples of image processing systems where the output is a discrete-spaceimage.

In an image capture system,f(x, y) is typically thetrue image, or true spatial distribution of some physical quantity of interest,often called theobject, whereasg(x, y) is theobserved imageor recorded image. The goal is usually forg(x, y) to be as similaras possible tof(x, y).

(In image restoration problems the goal is to recoverf(x, y) from g(x, y).)

In an image processing system,f(x, y) is typically the image produced by some image capture system, which might be noisy orblurry for example, andg(x, y) is some enhanced version off(x, y). (Typically this is done digitally and thus with a discrete-spacesystem, although optical / analog image enhancement is alsopossible.)

The input-output relationship for an imaging system is described by asystem operatoror system functionS and is written

g = S[f ], whereS : L2(R2)→ L2(R

2).

In other words,S maps one function to another function,i.e., and image to another image. The relationship is very often expressedusing the following somewhat dangerously imprecise notation:

“ g(x, y) = S[f(x, y)] ” .

The problem with that notation is that it suggests that the value of g(x, y) at any point(x, y)depends only on the input image atthat same spatial location. This is rarely the case. More precise, but somewhat cumbersome, notation is:

g(x, y) = (S[f ])(x, y).

For convenience, we will often simply write one of the following:

fS−→ g or f(x, y)

S−→ g(x, y) or f(x, y)→ S → g(x, y) .

What is the system functionS? For most image capture systems, it is a blurring function. Often we can model the image capturesystem operator as the convolution of the object with the 2D (or 3D) point spread function.

Page 17: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.17

Classification of systems

We can divide system characteristics into the following twocategories.• Amplitude properties• A-1 linearity• A-2 stability• A-3 invertibility

• Spatial properties• S-1 causality• S-1’ separability• S-2 memory• S-3 shift invariance• S-4rotation invariance

We will save linearity (the most important?) for last.

A-2 Stability• A system isbounded-input bounded-output (BIBO) stableiff every bounded input produces a bounded output.

∀f , if ∃Mf s.t.| f(x, y) | ≤Mf <∞, ∀x, y, then there must exist anMg s.t.| g(x, y) | ≤Mg <∞, ∀x, y.UsuallyMg will depend onMf .• Otherwise the system is calledunstable, and it is possible that a bounded input signal will make the output “blow up.”

Example: moving average filterwith ∆X,∆Y > 0

g(x, y) =1

∆X∆Y

∫ y+∆Y/2

y−∆Y/2

∫ x+∆X/2

x−∆X/2

f(x′, y′) dx′ dy′

=

∫ ∞

−∞

∫ ∞

−∞

1

∆X∆Y

rect2

(x− x′

∆X

,y − y′

∆Y

)

f(x′, y′) dx′ dy′ . (CS-8)

Suppose| f(x, y) | ≤Mf <∞, ∀x, y, sof(x, y) is a bounded input. Then by thetriangle inequality for integration1:

| g(x, y) | =

∣∣∣∣∣

1

∆X∆Y

∫ y+∆Y/2

y−∆Y/2

∫ x+∆X/2

x−∆X/2

f(x′, y′) dx′ dy′

∣∣∣∣∣

≤ 1

∆X∆Y

∫ y+∆Y/2

y−∆Y/2

∫ x+∆X/2

x−∆X/2

|f(x′, y′)|dx′ dy′

≤ 1

∆X∆Y

∫ y+∆Y/2

y−∆Y/2

∫ x+∆X/2

x−∆X/2

Mf dx0 dy0

= Mf ,

so| g(x, y) | ≤Mf . Thus the output signal is also bounded for a bounded input, so this system is BIBO stable.

We will derive a simple test for BIBO stability shortly that applies to LSI systems (but not more generally).

It is easy to postulatehypotheticalsystems that are unstable, likeg(x, y) = 1/ f(x, y),or the ideal integrator:g(x, y) =

∫ x

−∞

∫ y

−∞f(x′, y′) dx′ dy′.

But it is difficult to think of real continuous-space systems that are unstable.

The issue of stability is particularly relevant when designing discrete-spacefilters.

1The usual triangle inequality is|a + b| ≤ |a| + |b|. Generalizing to summation and integration yields:˛

˛

P

nfn

˛

˛ ≤P

n|fn| and

˛

˛

R

˛ ≤R

|f | .

Page 18: 2D “Continuous Space” Signals and Systems

CS.18 c© J. Fessler, January 6, 2005, 23:23 (student version)

A-3 Invertibility• A systemS is calledinvertible iff each (possible) output signal is the response to onlyoneinput signal.• OtherwiseS is not invertible.

If a systemS is invertible, then there exists a systemS−1 such that

f(x, y)→ S → g(x, y)→ S−1 → f(x, y) .

Design ofS−1 is important in many image processing applications.

Mathematically:S−1[S[f ]] = f.

Invertibility is a particularly important concept in imaging since often we would like to “undo” degrading effects likeopticalblurring (e.g., in images from the infamous Hubble telescope).

Example: Is the moving average filter (CS-8) an invertible system? ??

S-1 Causal systems

The concept of causality is very important in 1D systems (when the independent variable is time).

In imaging systems, the independent variables are spatial position, not time, so causality is usually unimportant. (Ofcourse in “realtime” systems like video, where the independent variables are both spaceand time, one must consider causality with respect to thetime variable.)

There are some (mostly older) papers in the image processingliterature that address raster-scan based image processing methods,where the image is filtered, for example, by starting in the upper left hand corner and working lexicographically down towardsthe lower right hand corner. Such processing could be described as “causal” (whereas the moving average filter above would be“noncausal” by such a definition).

S-1’ Separable systems

A 1D system is causal if the output at any timet0 depends only on the values of the input signal for timest ≤ t0. In other words,this is a restriction on the how the system functionS behaves in terms of the domain of the input signal.

The concept of aseparable systemis also a restriction on the behavior in terms of the domain ofthe input signal. Roughlyspeaking, a separable systemS processes the “rows” and “columns” of an image independently, and can be written as

S = Sh Sv or S = Sv Sh,

where denotes function composition,i.e., S[f ] = Sh[Sv[f ]]. Here,Sh denotes a “horizontal acting” operator where ifg = Sh[f ],then for any giveny0, the output valuesg(x, y0) depend only on the input valuesf(·, y0), i.e., the input values in the same row.Likewise,Sv denotes a “vertical acting” operator where ifg = Sv[f ], then for any givenx0, the output valuesg(x0, y) depend onlyon the input valuesf(x0, ·), i.e., the input values in the same column.

Separable systems essentially require only 1D operations,so they are often used in image processing to minimize computation.

Example. Is the moving average filter (CS-8) a separable system? ??

S-2 Memory

A system whose outputg(x, y) at any point(x, y) only depends on the input imagef(x, y) at the same location(x, y) could becalledmemoryless, if we stretch the English usage of “memory” somewhat. For example, a detector that converts amplitude tointensity (with no other effects) via the relationg(x, y) = [f(x, y)]2 would be memoryless.

Continuous-space image capture systems are virtually never memoryless, due to the spreading of light when propagatingthroughspace. But discrete-space image processing operations canbe categorized by those that use pixel neighborhoods vs those thatwork independently pixel-by-pixel. So the memoryless concept is more relevant to digital image processing than to image capturesystems.

Page 19: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.19

S-3 Shift-invariance

Systems whose input-output behavior is independent of the specific spatial location are calledshift-invariant or space-invariant.

Why do we focus on shift-invariant systems?

• ??• ??

A systemS is calledshift invariant iff

f(x, y)S−→ g(x, y) implies that f(x− x0, y − y0)

S−→ g(x− x0, y − y0) (CS-9)

for everyinput imagef(x, y) and shiftx0,y0.

Otherwise the system is calledshift variant or space variant.

Example: Is the moving average system above shift invariant? ??

Example: Is the imaging zooming system defined by g(x, y) = f(x/2, y/2) shift invariant? ??

Example: Is the ideal mirror system defined by g(x, y) = f(−x,−y) shift invariant? ??

S-4 Rotation-invariance

Usually the object being imaged has an orientation that is unknown relative to the recording device’s coordinate system. Often wewould like both the imaging system and the image processing operations applied to the recorded image to be independent oftheorientation of the object.

A systemS is calledrotationally invariant iff

f(x, y)S−→ g(x, y) implies that fθ(x, y)

S−→ gθ(x, y) wherefθ(x, y) , f(x cos θ + y sin θ,−x sin θ + y cos θ) (CS-10)

andgθ(x, y) is defined similarly, foreveryinput imagef(x, y) and rotationθ.

Example: Is the moving average system above rotationally invariant? ??

How could we modify the system to make it rotationally invariant? ?? ??

Page 20: 2D “Continuous Space” Signals and Systems

CS.20 c© J. Fessler, January 6, 2005, 23:23 (student version)

A-3 Linear systems

Why linearity?

• ??• ??• ??• ??

In the context of 2D continuous-space systems, we will sayS is a linear system(function) iff it is a linear operator on the vectorspace of functionsL2(R

2) described in the Appendix,i.e., iff

S[αf1 + βf2] = αS[f1] + βS[f2] superposition property

for all imagesf1, f2 and all real (or complex) constantsα, β.

Example: Is the moving average system above linear? ??

Two special cases of the above condition for linearity are particularly important in the context of linear systems.• If the input to a linear system is scaled by a constant, then the output is scaled by that same constant.

S[αf ] = αS[f ] scaling property.

• If the sum of two inputs is presented to the system, then the output will be simply the sum of the outputs that would have resultedfrom the inputs individually.

S[f1 + f2] = S[f1] + S[f2] additivity property .

We can extend the superposition property to finite sums: by applying proof-by-induction:

S[

K∑

k=1

αkfk

]

=

K∑

k=1

αkS[fk].

For a system to be called linear, we require the superposition property to hold even for complex input signals and complexscalingconstants. (This presumes that the system is defined to permit both real and complex inputs and to produce both real and complexoutputs.)

Example: Is g(x, y) = real(f(x, y)) a linear system? ??

Exercise. Find a system that satisfies the scaling property but not the additivity property.

Thus, both the additivityandscaling properties are required for a system to be linear.

Page 21: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.21

Impulse response(point spread function) (PSF) of a linear system

(The PSF is perhaps the most important tool in the analysis ofimaging systems. It is analogous to the impulse response used in 1Dsignals and systems.)

The superposition property of a linear system enables a verysimple method to characterize the system function.• Decompose the input into some elementary functions.• Compute the response (output) of the system to each elementary function.• Determine the total response of the system to the desired (complex) input by simply summing the individual outputs.

A “simple” and powerful function for decomposition is theDirac impulse δ2(x, y).

The key property of the Dirac impulse is thesifting property :

f(x, y) =

∫ ∞

−∞

∫ ∞

−∞

f(x′, y′) δ2(x− x′, y − y′) dx′ dy′ =

∫∫

f(x′, y′) δ2(x, y;x′, y′) dx′ dy′,

where the latter form expresses the image as a decompositionof an image into (weighted) elementary functions, namely off-centerDirac impulses, and whereδ2(x, y;x′, y′) = δ2(x− x′, y − y′), was defined earlier.

PSF

Suppose the input to a systemS is an impulse centered at(x′, y′), i.e., the input isδ2(x, y;x′, y′), wherex′ andy′ are considered“fixed,” andx, y are the independent variables of the input image. Leth(x, y;x′, y′) denote the corresponding output signal:

δ2(x, y;x′, y′)S−→ h(x, y;x′, y′) .

The functionh(x, y;x′, y′), the output of the systemS when the input is an impulse function located at(x′, y′), is called thepointspread function (PSF) of the system, or (less frequently in the context of imagingsystems) theimpulse responseof the system.

Example: What is the PSF of an ideal mirror? The input-output relationship isg(x, y) = f(−x,−y), so ??

Example: What is the PSF of an ideal magnifying lens? For a magnification of 2, the ideal input-output relationship isg(x, y) = α f(x/2, y/2), for someα < 1 related to the absorption of the lens. Thus

δ2(x− x′, y − y′)S−→ ??

More generally, the impulse response of the systemf(x, y)S−→ g(x, y) = α f(x/a, y/b) is ??

Example: What is the impulse response of the moving average filter (CS-8)?Substitutef(x, y) = δ2(x− x′, y − y′) in (CS-8), and we see

h(x, y;x′, y′) =

∫ ∞

−∞

∫ ∞

−∞

1

∆X∆Y

rect2

(x− x′′

∆X

,y − y′′

∆Y

)

δ2(x′ − x′′, y′ − y′′) dx′′ dy′′

=1

∆X∆Y

rect2

(x− x′

∆X

,y − y′

∆Y

)

.

The first two examples also illustrate that linearity is distinct from shift-invariance!

Page 22: 2D “Continuous Space” Signals and Systems

CS.22 c© J. Fessler, January 6, 2005, 23:23 (student version)

Superposition integral for any linearsystem

Consider a linear system with system functionS operating on inputf(x, y). We want to find a simple expression for the outputimageg(x, y) in terms of the input imagef(x, y). We would like an expression that is more informative thang = S[f ]. The PSF,the impulse decomposition, and the superposition propertyare the key ingredients.

Using the “strong” superposition property (see Appendix):

f(x, y) =

∫∫

f(x′, y′) δ2(x, y;x′, y′) dx′ dy′ S−→ g(x, y) =

∫∫

f(x′, y′)S[δ2(·, ·;x′, y′)](x, y) dx′ dy′

“ = ”∫∫

f(x′, y′)S[δ2(x, y;x′, y′)] dx′ dy′

=

∫∫

f(x′, y′) h(x, y;x′, y′) dx′ dy′,

where we have substituted in the definition ofh. The quoted equals warns you of the dangerous notation discussed on p. CS.16.

Thus we have derived the following input-output relationship for linear systems, known as thesuperposition integral:

g(x, y) =

∫ ∞

−∞

∫ ∞

−∞

f(x′, y′) h(x, y;x′, y′) dx′ dy′ . (CS-11)

This is the general superposition integral for the case where we have decomposed the input into impulse functions.

The superposition integral tells us that once we have found the PSF of the imaging system for all input coordinates, then the outputis fully determined forany input. Thus, a linear system functionS is characterized fully by its PSFh.

Thus we will rarely (if ever) explicitly work withS, for linear systems.

Example. Consider an idealized inkjet printer with a dirty head suchthat each time a “dot” is written instead we get a slight smearthat fades to the right about 3 dots worth (direction of printhead movement). We might model this smear as

rect

(y

∆X

)

rect

(x

3∆X

− 1

2

)(

1− x

3∆X

)

.

where∆Y is the dot width. Then the input-output relationship is:

g(x, y) =

∫∫

f(x′, y′) rect

(y − y′

∆X

)

rect

(x− x′

3∆X

− 1

2

)(

1− x− x′

3∆X

)

dx′ dy′ .

For an image capture system, the ideal PSF would be simply an impulse function:

h(x, y;x′, y′) = δ2(x− x′, y − y′),

so that the system output would exactly equal the input:g = S[f ] = f .In real systems there is always some blurring (imperfect resolution), if not other distortions as well. This blurring means that aninput impulse function gets “spread out” at the output, hence the term.

Analysis of imaging systems is often firstly concerned with:• findingh for the system,• and then understanding howh is influenced by the various system parameters (such as detector spacing, etc.).• Particularly useful as a rule-of-thumb for examiningh is the width of the PSF, often specified by thefull-width at half maxi-

mum (FWHM ). (Picture)

Page 23: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.23

Example: Consider the following 1D pinhole camera.

Output

Input

Ideal Pinhole Aperture

x

f(x)

g(x)

d1

d2

x′−x′d2/d1 0

How do we find the PSF? It varies by imaging system. For this system we can use simplegeometric reasoning. For incoherentillumination, this system is linear (in intensity).If the input were an impulse function atx = x′, then for an ideal (infinitesimal) pinhole the output would be an impulse functionat x = −x′d2/d1 = mx′, wherem , −d2/d1 is called thesource magnification factor. (For now we ignore the fact that lightintensity decreases with propagation distance.)Thus by simple ray-tracing we see that (for an ideal pinhole)the PSF would be given by:

h(x;x′) = δ(x−mx′) .

Substituting into the 1D superposition integral (cf. (CS-11)) and simplifying by the sifting property yields theinput-output relation:

g(x) =1

|m|f(x/m).

Note that the system is shift-variant, due to the mirroring and scaling. On the other hand, as will be discussed later, with a simplecoordinate change for the input image, the system can be considered to be shift-invariant!

Example. If the input isf(x) = exp(−(x− 3)2

)(a Gaussian bump centered atx = 3), then we can use the superposition integral

to compute the output:

g(x) =

∫ ∞

−∞

f(x′)h(x;x′) dx′ =

∫ ∞

−∞

e−(x′−3)2 δ(x−mx′) dx′ =1

|m| exp

(

−(

x− 3m

m

)2)

.

Thus the output is a Gaussian bump centered at−3|m| and “stretched out” (magnified) by the factor|m|.The superposition integral is easier than a “direct” attempt to findg(x).

If the pinhole has finite widthw, then the PSF is not an impulse function, but rather a rectangular function of widthw(d1 + d2)/d1

centered at−x′d2/d1:

h(x;x′) = rect

(x−mx′

wM

)

,

whereM = 1 + d2/d1 is theaperture magnification factor. If the aperture plane has finite thickness, then the width oftherectangle will vary withx′, which causes further shift-variance.

If we account for the1/r2 falloff with distance of the intensity of incoherent radiation, then the PSF of an ideal pinhole will be:

h(x;x′) = δ(x−mx′)1

r2(x),

where the distance between the source point and the detectorpoint is

r(x) =√

(d1 + d2)2 + (x + xd1/d2)2 = (d1 + d2)√

1 + (x/d2)2.

This intensity effect adds an additional form of shift-variance, although we can often ignore it for points near the axis(paraxialapproximation).

Page 24: 2D “Continuous Space” Signals and Systems

CS.24 c© J. Fessler, January 6, 2005, 23:23 (student version)

The effect of a finite detector aperture of widthW could be described by truncating the PSF by multiplying byrect(x/W ). Thisalso makes the system shift-varying.

The PSF depends on system “design” parameters:d2, d1, andw. Specifically, the ratiod2/d1 determines a magnification factor.When is magnification useful?

• ??• ??

Page 25: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.25

Shift invariance or Space invarianceof linear systems

In any linear system where the point spread function is the same for all input points (except for a shift), we can greatly simplifygeneral superposition integral.

Fact. A linear system satisfies theshift invariant or space invariantcondition (CS-9) iff the point spread function satisfies

h(x, y;x′, y′) = h(x− x′, y − y′; 0, 0), ∀x, y, x′, y′. (CS-12)

Proof. We must show that (CS-9) holds iff (CS-12) holds.

(Sufficiency.) Suppose (CS-12) holds. Then (CS-11) becomes

fS−→ g ⇐⇒ g(x, y) =

∫ ∞

−∞

∫ ∞

−∞

h(x, y;x′, y′) f(x′, y′) dx′ dy′ =

∫ ∞

−∞

∫ ∞

−∞

h(x, y) x− x′, y − y′ f(x′, y′) dx′ dy′ .

Making the change of variables(x′′, y′′) = (x′ + x1, y′ + y1) we have

g(x− x1, y − y1) =

∫ ∞

−∞

∫ ∞

−∞

h(x− x1 − x′, y − y1 − y′) f(x′, y′) dx′ dy′

=

∫ ∞

−∞

∫ ∞

−∞

h(x− x′′, y − y′′) f(x′′ − x1, y′′ − y1) dx′′ dy′′,

which clearly shows that the general shift invariance condition (CS-9) holds.

(Necessity.) If (CS-12) does not hold for any input location(x′, y′), then we can consider the impulse input imagef(x, y) =δ2(x, y) and another (translated) input image,δ2(x− x′, y − y′), and the corresponding output images will not satisfy (CS-9). 2

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . .For shift-invariant systems, the(0, 0) notation in (CS-12) is superfluous. Therefore, to simplify notation we define

h(x, y) , h(x, y; 0, 0),

so that (with a little notation recycling) we can simply write

h(x, y;x′, y′) = h(x− x′, y − y′) .

Sinceh(x, y) is the response of the system to an impulse at the origin, if the system is linear and shift invariant, then we candetermine the PSF by measuring the response to a single point-source input.

Example. X-ray CT phantom with tungsten wire...

To test for shift invariance of a linear system, first determine the system output for an impulse at the origin. Then shift or translatethe input impulse by some arbitrary distance. Does the system output shift by the same distance, the same direction, and retain thesame shape? If the answer yes (for any shift), then the systemis shift invariant.

Example. Are the mirror, magnification, or 1D pinhole systems shift invariant? ??

Example. Is the moving average filter (CS-8) shift invariant? ??

Exercise. To show that a given linear system is shift-varying, does it suffice to check for counter-examples using impulse inputfunctions (e.g., as used in the mirror example above)? If so, prove it. If not,explain why.

Page 26: 2D “Continuous Space” Signals and Systems

CS.26 c© J. Fessler, January 6, 2005, 23:23 (student version)

Convolution

For linear shift-invariant (LSI ) systems, the input-output relationship simplifies from the general superposition integral (CS-11)for linear systems to the following 2Dconvolution integral:

g(x, y) =

∫ ∞

−∞

∫ ∞

−∞

f(x′, y′) h(x− x′, y − y′) dx′ dy′ . (CS-13)

We have the following notations for convolution:

g = f ∗∗ h, or g(x, y) = (f ∗∗ h)(x, y), or dangerously imprecisely:g(x, y) = f(x, y) ∗∗ h(x, y) .

The dual∗’s indicate 2D convolution. Note2 ∗∗ : L2(R2)× L1(R

2)→ L2(R2).

LSI systems are easier to describe than linear shift-variant systems, since we only need the two-argument PSFh(x, y), rather thanthe general PSFh(x, y;x′, y′) with its 4 arguments. Furthermore, for LSI systems we can simplify the convolution using Fouriermethods.

Unfortunately,in most image capture systems, the PSF is not exactly shift invariant! For example, in phased-array ultrasound thePSF in the region of the transmit focus is vastly different from the PSF near the face of the array.

However, the PSF of most imaging systems variesslowly over space. (If this were not the case then the images might beverydifficulty to interpret visually.) Consequently, for the purposes of system design and analysis, the PSF can often be considered shiftinvariant over local regions of the image.

Linearity alone does not imply shift-invariance, as in the 1D pinhole example above.

One rarely performs the 2D convolution integral (CS-13) analytically.

2D convolution properties (relevant to LSI systems)

The following properties of 2D convolution are easily verified directly from the 2D convolution integral by manipulations that areessentially identical to those for 1D convolution.• Commutative property: f ∗∗ h = h ∗∗ f• Associativeproperty: [f ∗∗ h1] ∗∗ h2 = f ∗∗ [h1 ∗∗ h2]• Distributive property: f ∗∗ [h1 + h2] = [f ∗∗ h1] + [f ∗∗ h2]• The order of serial connection of LSI systems does not affectthe overall impulse response:h1 ∗∗ h2 = h2 ∗∗ h1.• f(x, y) ∗∗ δ2(x, y) = f(x, y)• Shift property:f(x, y) ∗∗ δ2(x− x′, y − y′) = f(x− x′, y − y′)• Shift-invariance: If g(x, y) = f(x, y) ∗∗ h(x, y), thenf(x− x1, y − y1) ∗∗ h(x− x2, y − y2) = g(x− x1 − x2, y − y1 − y2)• Separability property:[f1(x)f2(y)] ∗∗ [h1(x)h2(y)] = [f1(x) ∗ h1(x)] · [f2(y) ∗ h2(y)]

What is δ(x) ∗∗ δ(y)? ??• Circular symmetry property: iff(x, y) andh(x, y) are circularly symmetric, then so isf(x, y) ∗∗ h(x, y)• Scalingproperty.

Exercise. If g(x, y) = f(x, y) ∗∗ h(x, y), then what isf(2x, 2y) ∗∗ h(2x, 2y)?

2For a more precise conditions under which convolution is defined rigorously, see EECS 600.

Page 27: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.27

LSI system properties via PSF

Since an LSI system is characterized completely by its PSF, we should be able to express all the other five system properties interms of conditions on the PSF.• causal:h(x, y) = 0 wheneverx < 0 or y < 0?

That would be the natural analog to the 1D case, but it is essentially irrelevant for imaging.

• memoryless (static):??• stable: ??

Exercise: state and prove the appropriate condition for stability.• rotational invariance.

Under what conditions on the PSF h(x, y) is an LSI system rotationally invariant? ??• invertible: For what type of h(x, y) is an LSI system invertible? ??

If h(x, y) ∗∗ f(x, y) = 0signal for some nonzero signalf(x, y), then the system with PSFh(x, y) is not invertible

Exercise.State and prove the condition onh(x, y) that ensures an LSI system is rotationally invariant.

Separability

Fact. An LSI imaging system isseparableif and only if its PSFh(x, y) is separable,i.e., h(x, y) = h1(x)h2(y) for some 1Dfunctionsh1 andh2.

In which case 2D convolution simplifies into two sets of 1D convolution operations:

f(x, y) ∗∗ h(x, y) = f(x, y) ∗∗ (h1(x)h2(y)) = f(x, y) ∗∗ (h1(x) δ(y) ∗∗ δ(x) h2(y)) = (f(x, y) ∗∗ h1(x) δ(y)) ∗∗ δ(x) h2(y),

where

f(x, y) ∗∗ (h1(x) δ(y)) =

∫∫

f(x− x′, y − y′)h1(x′) δ(y′) dx′ dy′ =

f(x− x′, y) h1(x′) dx′ .

Example. The moving average filter (CS-8) is separable because it hasa separable PSFrect2(x, y) = rect(x) rect(y). In fact, wecan see that it is separable by rewriting slightly the original input-output relation:

g(x, y) =1

∆Y

∫ y+∆Y/2

y−∆Y/2

[

1

∆X

∫ x+∆X/2

x−∆X/2

f(x′, y′) dx′

]

dy′ .

The inner integral acts only along thex direction,i.e., it is a “horizontal acting” operation, whereas the outer integral acts only inthey direction,i.e., it is a “vertical acting” operation.

The 2D convolution integral for any LSI system with a separable PSF can be so decomposed:

h(x, y) = h1(x)h2(y) =⇒ g(x, y) = h(x, y) ∗∗ f(x, y) =

∫ [∫

h1(x) f(x, y) dx

]

h2(y) dy

=

∫ [∫

h2(y) f(x, y) dy

]

h1(x) dx .

Differential equations?

At this point in a 1D signals and systems course, most texts address the specific case of systems described by linear constantcoefficient differential equations, such as RLC circuits. Indeed, the analysis of such systems occupies a substantial portion of theeffort in such courses. Although there are certainly some important differential equations relevant to imaging, such as the waveequation, there is not a clear analog to RLC systems. This is asignificant difference between 1D (time) signals and systems andmultidimensional signal processing.

Page 28: 2D “Continuous Space” Signals and Systems

CS.28 c© J. Fessler, January 6, 2005, 23:23 (student version)

Effect of PSF on spatial resolution

Pictures illustrating PSF and spatial resolution:

0 500

0.5

1

Object

0 500

0.5

1

PSF

0 500

0.5

1

Output

0 500

0.5

1

0 500

0.5

1

0 500

0.5

1

0 500

0.5

1

0 500

0.5

1

0 500

0.5

1

0 500

0.5

1

0 500

0.5

1

0 500

0.5

1

Resolution criteria

Sometimes an image contains the superposition of two closely spaced impulse-like features,i.e., two closely spaced “dots”. If theirspacing is sufficiently close their appearance will be indistinguishable from, simply, one dot. If they are distinguishable, then onesays they areresolved. It sometimes important to develop a mathematical criteriafor determining when this will happen.

For example, from [6, p. 326]:

the question of when two closely spaced point sources are barely resolved is a complex one and lends itself to a varietyof rather subjective answers. According to the so-calledRayleigh resolution criterion, two equally bright pointsare barely resolved when the first zero of the Airy pattern [PSF] of the image of one point exactly coincide with thecentral maximum of the [PSF] of the image of the second point.... An alternative definition is the so-calledSparrowcriterion , which states that two point sources are just resolved if thesecond derivative of the image intensity patternvanishes at the point midway between the [sum of the two PSFs].

Exercise. Find the just-resolved distances (according to Rayleigh’sresolution criterion) for a system having a square frequency

responseH(νX, νY) = rect2

(νX

2fmax

, νY

2fmax

)

and for one having a circular frequency responseH(ρ) = rect(

ρ2fmax

)

, where

fmax = 5mm−1. Which system would you rather use for imaging and why?Hint: MATLAB ’s fzero function may be useful here.

Page 29: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.29

Magnification and LSI systems

As illustrated by the 1D pinhole example above, any system with magnification or mirroring is, strictly speaking, a shift-variantsystem, since the PSF does not depend solely on the difference between input and output coordinates.

However, we can recast such systems into equivalent shift-invariant systems by suitable coordinate changes for the input signal.This is reasonable in the context of imaging systems since the coordinates that we use are somewhat arbitrary. (In contrast, in thecontext of time-domain systems, “coordinate changes” are nontrivial.)

We will show the required coordinate change for the example of a 2D pinhole camera. Among other things, this example willillustrate the type of manipulations that are useful for imaging systems analysis.

Inputf(x,y)

Pinhole Aperture Outputg(x,y)a(x,y)

(x′,y′)

d1 d2

h(x, y;x′, y′)

Consider the simple pinhole camera system shown above, assumed linear, with a pinhole opening described by a realaperturefunction 0 ≤ a(x, y) ≤ 1, wherea(x, y) denotes the fraction of light incident on the point(x, y) that passes through.If the thickness of the aperture plane is infinitesimal (and ignoring1/r2 intensity falloff), then by geometry, the PSF is

h(x, y;x′, y′) = h(x−mx′, y −my′), where h(x, y) = a(x/M, y/M),

wherem = −d2/d1 is thesource magnification factor, M = d1+d2

d1

= 1 − m is called theobject magnification factor (butmight better be called theaperture magnification factor).

By the superposition integral, the output intensity is written in terms of the PSF by

g(x, y) =

∫ ∞

−∞

∫ ∞

−∞

f(x′, y′) h(x, y;x′, y′) dx′ dy′ =

∫ ∞

−∞

∫ ∞

−∞

f(x′, y′) h(x−mx′, y −my′) dx′ dy′ .

We can now rewrite the system equation using the simple change of variables(xm, ym) = (mx′,my′), leading to:

g(x, y) =

∫ ∞

−∞

∫ ∞

−∞

fm(xm, ym)h(x− xm, y − ym) dxm dym = fm ∗∗ h.

This is now a simple convolution of the modified imagefm(x, y) , 1m2 f(x/m, y/m), which is a magnified, scaled and mirrored

version of the input image, obtained via the coordinate change above, and the PSFh(x, y), which is a magnified version of theaperture function.

To understand the1/m2 in the definition offm, consider that for an infinitesimal pinhole, the system magnifies the image by thefactorm in each dimension. Thus the spatial extent of the input imageis extended bym2 in the output, But since the total radiationstriking the output plane does not change (i.e., passive camera system), the intensity of the output image is reduced by the factor1/m2.

The magnified imagefm(x, y) is what the system output would be for an ideal pinhole aperture, i.e., whena(x, y) = δ2(x, y).

Page 30: 2D “Continuous Space” Signals and Systems

CS.30 c© J. Fessler, January 6, 2005, 23:23 (student version)

Representation of Signals by Orthogonal Bases

The next topic usually discussed in a 1D signals and systems text isFourier series. Although Fourier methods are very importantin imaging, we are also often interested in other representations of 2D signals, such as wavelets. We first describe the generalrepresentation of signals by orthogonal bases, and then consider Fourier series as an important special case.

In engineering it is often very useful to represent signals by a linear combination of “simpler” signals:

g(x, y) =∑

k

ck φk(x, y) . (CS-14)

This process ofsignal analysisis particularly convenient if we choose a set of signalsφk that areorthogonal.

Review of inner products and orthogonality

The concept of orthogonality is an extension of the geometric concept of perpendicular lines. Suppose two lines in the planeare perpendicular and intersect at the origin. Let~u and~v denote two vectors pointing along those lines. Since the lines areperpendicular, we say~u and~v areorthogonal vectors, meaning theirinner product or dot product is zero. In Euclidean 2-space,the standard inner product of~u and~v is defined by

〈~u, ~v〉 = ~u · ~v = ~vT~v = u1v1 + u2v2.

More generally, forn-dimensional complex vectorsx,y ∈ Cn, the standard inner product is

〈x, y〉 = y′x =

n∑

k=1

xky∗k,

wherey′ denotes the Hermitian transpose of a vector (or matrix).

To generalize the concept oforthogonality to an other setting (i.e., another vector space) beyond ordinary Euclidean space, thekey is to define an appropriate inner product. Anyinner product must satisfy the following conditions:

1. 〈x, y〉 = 〈y, x〉∗ (Hermitian symmetry ), where∗ denotes complex conjugate.2. 〈x + y, z〉 = 〈x, z〉+ 〈y, z〉 (additivity )3. 〈αx, y〉 = α 〈x, y〉 (scaling)4. 〈x, x〉 ≥ 0 and〈x, x〉 = 0 iff x = 0. (positive definite)

Using the above conditions, one can show that any inner product is acontinuous function [7, p. 49], and is abilinear form thatsatisfies: ⟨

n

αnxn,∑

m

βmym

=∑

n

m

αnβ∗l 〈xn, ym〉, (CS-15)

for any complex constantsαn andβm if∑

n xn and∑

m ym are convergent series.

Related to the concept of inner product is the concept of thenorm of a vector, defined in terms of an inner product as follows:

‖x‖ ,√

〈x, x〉.

In Euclidean space this measures thelength of a vector,i.e., ‖~u‖ =√

〈~u, ~u〉 =√∑n

i=1 uiu∗i =

√∑ni=1 |ui|2.

Also related is the concept of thedistancebetween two vectors:

‖x− y‖ .

Page 31: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.31

Inner products and orthogonality for 2D images

Here we are working with 2D continuous-space images, which are functions defined onR2, rather than simple vectors inRn orC

n. For images with domainB ⊂ R2, the natural definitions of inner product, norm (squared) and distance are:

〈f, g〉 =

∫∫

B

f(x, y) g∗(x, y) dxdy

‖f‖2 = 〈f, f〉 =

∫∫

B

|f(x, y)|2 dxdy

‖f − g‖ =

(∫∫

B

|f(x, y)− g(x, y)|2 dxdy

)1/2

.

The norm off is the square root of its energy.

Two imagesf andg are calledorthogonal if 〈f, g〉 = 0.

A setof 2D signalsφk is calledorthogonal iff the inner product of each pair of distinct signals in the set is zero:

〈φk, φl〉 =

∫∫

B

φk(x, y) φ∗l (x, y) dxdy =

Ek, l = k0, l 6= k

= Ek δ[l − k],

whereEk = ‖φk‖2 is the energy ofφk(x, y).

The 1DKronecker impulse or Kronecker delta function. (this one is a function!) is defined byδ[l] =

1, l = 00, l 6= 0.

If Ek = 1 for all k, then we call the signalsorthonormal , since they arenormalized to have unit energy (and thus unit norm).

For specific 2D examples, we will often want to write:

g(x, y) =

∞∑

k=−∞

∞∑

l=−∞

ck,l φk,l(x, y) (CS-16)

rather than (CS-14),i.e., we will often index the basis signals with double subscripts.In this case, we sayφk,l is an orthogonal set of signals if〈φk1,l1 , φk2,l2〉 = 0 wheneverk1 6= k2 or l1 6= l2.

In the following examples, we will use the following useful fact:

∫ T

0

sin(2πkx/T + φ) dx =

0, k = ±1,±2, . . .T sin φ, k = 0

= T sinφ δ[k] .

Example. (separable) harmonic sinusoidsφk,l(x, y) = sin(2πkx/TX) sin(2πly/TY) for k, l = 1, 2, . . . are orthogonal on the setB = [0, TX]× [0, TY] because

〈φk,l, φmn〉 =

∫ TX

0

∫ TY

0

φk,l(x, y) φ∗mn(x, y) dx dy = . . . =

TXTY

4δ[k −m] δ[l − n] .

Example. harmonic complex exponentialsφk,l(x, y) = eı2π(kx/TX+ly/TY) overB = [0, TX]× [0, TY] for k, l ∈ Z.

〈φk,l, φmn〉 =

∫ TX

0

∫ TY

0

φk,l(x, y) φ∗mn(x, y) dx dy =

∫ TX

0

∫ TY

0

eı2π(k−m)x/TX eı2π(l−n)y/TY dxdy

= TXTY δ[k −m] δ[l − n] .

Page 32: 2D “Continuous Space” Signals and Systems

CS.32 c© J. Fessler, January 6, 2005, 23:23 (student version)

Generalized Fourier series

We will be interested in sets of orthogonal signalsφk on the setB such that ifg(x, y) has finite energy over that set, then we canrepresentg(x, y) in terms of theφk’s by the following convergent series:

g(x, y) =∞∑

k=−∞

ck φk(x, y), ∀(x, y) ∈ B, (CS-17)

where ck =〈g, φk〉‖φk‖2

=1

Ek

∫∫

B

g(x, y) φ∗k(x, y) dx dy . (CS-18)

Theck ’s are calledFourier coefficientswith respect to the orthogonal setφk, which is called anorthogonal basis. The seriesis called anorthogonal series representationfor g or simply anorthogonal seriesor orthogonal representation. A set oforthogonal functionsφk is calledcompleteif representations of the form (CS-17) are possible for every g ∈ L2(B), i.e., for allsignals with finite energy overB.

The formula (CS-18) indicates that we can compute eachck independently! This is a consequence of choosing an orthogonalset of signals. If we had chosen a non-orthogonal set, then tofind theck’s, in general we would have to solve a large system ofsimultaneous equations. (An interesting exception is the case of over-complete wavelet expansions, calledframes, which can benon-orthogonal yet simple formula for the coefficients still exist.)

Where did theck formula (CS-18) originate? There are two perspectives one can take to answer this question: the “self consistency”perspective, and the “best approximation” perspective. Both lead to the same formula (CS-18).• Self consistency perspective

If (CS-17) is true, then

〈g, φk〉 =

⟨∞∑

l=−∞

clφl, φk

=

∞∑

l=−∞

cl 〈φl, φk〉 =

∞∑

l=−∞

clEk δ[k − l] = ckEk,

sock = 〈g, φk〉 /Ek, which is exactly (CS-18).But this is somewhat circular reasoning since how do we know (CS-17) is correct in the first place?• Best approximation perspective

In practice often we must use a finite series, rather than the infinite series, meaning we make the approximation:

g(x, y) ≈ gN (x, y) ,

N∑

k=−N

ck φk(x, y) .

In this case, (CS-17) does not hold exactly, so the previous derivation is inapplicable.What would be a reasonable rationale for choosing the ck ’s in the finite series context?Choose theck ’s to make theapproximation error as small as possible!The approximation error is the difference between the actual signalg(x, y) and its finite series approximation:

eN (x, y) = g(x, y)−N∑

k=−N

ck φk(x, y) .

One reasonable measure of the approximation error (reasonable because it is analytically tractable for one thing) is the energyof the error signal. So we would like to choose theck ’s to minimize‖eN (x, y)‖2. This is essentially one form of “least squares”fitting. The solution to this error minimization problem gives the formula in (CS-18) forck, regardless ofN !

Page 33: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.33

Proof:

‖eN (x, y)‖2 =

∥∥∥∥∥g −

N∑

k=−N

ckφk

∥∥∥∥∥

2

=

g −N∑

k=−N

ckφk, g −N∑

l=−N

clφl

apply bilinearity (CS-15):

= ‖g‖2 −N∑

l=−N

cl 〈g, φl〉−N∑

k=−N

ck 〈φk, g〉+N∑

k=−N

N∑

l=−N

ckc∗l 〈φk, φl〉 use orthogonality:

= ‖g‖2 +

N∑

k=−N

|ck|2Ek −N∑

l=−N

cl 〈g, φl〉−N∑

k=−N

ck 〈φk, g〉 rearrangement “trick”:

= ‖g‖2 +

N∑

k=−N

Ek∣∣∣∣ck −

1

Ek〈g, φk〉

∣∣∣∣

2

−N∑

k=−N

1

Ek|〈g, φk〉|2 .

The first and third terms are independent ofck, so the error signal energy is minimized when the middle termis equal to zero,which happens when and only whenck is given by (CS-18). Geometrically, this choice is called aprojection of g(x, y) ontothe signalφk(x, y).

The fact that (CS-18) is optimal regardless ofN is a result of measuring error by energy. If we instead had used, for example,theL1 norm:

∫∫

B|eN (x, y)| dxdy (integrated absolute error) as the measure of error, then the optimal choice for theck’s is not

(CS-18), and is not independent ofN !

From the above formula for the approximation error energy, we can deduce that when we choose theck ’s according to (CS-18),then the error energy is

‖eN (x, y)‖2 = ‖g‖2 −N∑

k=−N

Ek|ck|2 =∑

|n|>N

Ek|ck|2.

This shows that the energy of the approximation error goes tozero,i.e., the finite series converges to the true imageg(x, y), iff

limN→∞

N∑

k=−N

Ek|ck|2 = ‖g‖2 .

It follows that the above is a necessary and sufficient condition for a set of orthogonal functions to be complete. Unfortunately,neither this condition, nor any other condition for completeness, is particularly easy to check. (See [7, p. 61] for an example ofproving completeness of polynomials over intervals in 1D.)

Finally, we note that when we have an orthogonal series representation as in (CS-17), the sense in which equality holds isthatthe difference betweeng(x, y) and the summation while not necessarily zero for all(x, y) has zero energy. This means they candiffer on a finite or countably infinite set of points, or even on a “set of measure zero”. Such differences are, generally speaking,unobservable. For example, the output of any LSI system willnot be influenced by such differences.

Parseval’s theorem

The relationship that we know asParseval’s theoremfor Fourier series holds for general orthogonal expansions:

‖g‖2 = 〈g, g〉 =

⟨∞∑

k=−∞

ckφk,

∞∑

l=−∞

clφl

=

∞∑

k=−∞

∞∑

l=−∞

ckc∗l 〈φk, φl〉 =

∞∑

k=−∞

∞∑

l=−∞

ckc∗l Ek δ[k − l] =

∞∑

k=−∞

Ek|ck|2,

(CS-19)

which follows directly from the orthogonality of theφk’s. So ‖g‖2 =

∫∫

B

| g(x, y) |2 dxdy =

∞∑

k=−∞

Ek|ck|2.

More generally, iff =∑∞

k=−∞ ckφk andg =∑∞

k=−∞ dkφk where theφk’s are orthogonal, then〈f, g〉 =∑∞k=−∞ Ekckd∗k.

Page 34: 2D “Continuous Space” Signals and Systems

CS.34 c© J. Fessler, January 6, 2005, 23:23 (student version)

Gram-Schmidt

We can orthogonalize any set of signals by applying theGram-Schmidt orthogonalization procedure. The procedure for signalsis completely analogous to that for vectors, except that we use the inner products and norms that are appropriate for signals.

Separable Orthogonal Bases

There are many well known orthogonal sets of 1D signals, suchas harmonic complex exponentials, the Harr basis, etc. We caneasily construct sets of 2D orthogonal signals from such 1D sets.

Supposeφk is an orthogonal set of 1D signals over the interval[a, b]. A simple approach to constructing orthogonal sets of 2Dsignals uses separability:

φk,l(x, y) = φk(x)φl(y). (CS-20)

Over what set B is this set orthogonal? ??

Separable 2D signals are simple and convenient, but may not always be the best choice for a given application.

Example. Harmonic complex exponentials are separable, sinceφk,l(x, y) = eı2π(kx/TX+ly/TY) = eı2πkx/TX eı2πly/TY .

Challenge: do complete, orthogonal 1D bases lead, via separability, to complete orthogonal 2D bases?

Uses of orthogonal representations• Finite support signals, whereg(x, y) = 0 except for(x, y) ∈ B• Periodic signals. Apply representation over one period. Ifthe representation is accurate over one period and theφk’s have the

same period, then the representation is equally good over all periods.• Finite energy signals with infinite support. Less frequently we use orthogonal representations for finite energy signals with

infinite support.

Page 35: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.35

Example: TheHarr basis.

A set of 1D signals that is orthogonal and complete on the interval (0,1) and that consists of pieces of square waves as illustratedbelow:

−101

Harr basis

−101

−101

−101

−101

−101

−101

−101

−101

−101

−101

−101

−101

−101

−101

0 0.2 0.4 0.6 0.8 1−1

01

t

Each signal takes values 1, -1, and 0.

Due to its completeness, any (real, finite-energy) signal can be approximated arbitrarily well (in terms of theL2 norm) using theHarr basis with a sufficiently large number of termsN .

Here is an example wherex(t) = sin(2πt).

0 0.2 0.4 0.6 0.8 1−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

t

x(t)

Harr approximation to sin(2 π t)

I made these plots in MATLAB using a discretized approximation to the integral (CS-18) for computing theck ’s, i.e., for largeN :

ck ≈∑N−1

i=0 x(i/N)φ∗k(i/N)

∑N−1i=0 |φk(i/N)|2

.

The natural corresponding 2D basis consists of the separable form (CS-20).

There are many possible complete sets of orthogonal signals, all of which can approximate all finite-energy signals to arbitraryaccuracy. One large family is calledwavelets, of which the Harr basis is a member.

Why do we focus on the Fourier series rather than the Harr basis?

?? ??

Page 36: 2D “Continuous Space” Signals and Systems

CS.36 c© J. Fessler, January 6, 2005, 23:23 (student version)

Eigenfunctions of LSI systems

Of all the many orthogonal bases, the set of harmonic complexexponentials is particularly important.

The reason is simple: complex exponentials areeigenfunctionsof LSI systems:

eı2π(νXx+νYy) → LSI h(x, y) → g(x, y) = eı2π(νXx+νYy) ∗∗ h(x, y)

=

∫ ∞

−∞

∫ ∞

−∞

eı2π[(x−x′)νX+(y−y′)νY] h(x′, y′) dx′ dy′ = eı2π(νXx+νYy) H(νX, νY)

whereH(νX, νY) is the2D Fourier transform of h(x, y):

H(νX, νY) ,

∫ ∞

−∞

∫ ∞

−∞

h(x, y) e−ı2π(νXx+νYy) dxdy . (CS-21)

So the response due to a complex exponential input signal is just that same complex exponential input signal scaled byH(νX, νY),which is why the complex exponentials are called eigenfunctions of LSI systems.

So if we can decompose a signal into complex exponential components, it is easy to determine the output of an LSI system byapplying superposition.

Exercise. Some, but not most, LSI systems have very many eigenfunctions in addition to complex exponentials. Give two distinctexamples.

Are there other finite-power signals besides complex exponentials that are eigenfunction of all LSI systems? ??

Page 37: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.37

Fourier series(the classical 2D case)

If g(x, y) is periodic with period(TX, TY), then we can representg(x, y) using a 2D Fourier series:

g(x, y) =

∞∑

k=−∞

∞∑

l=−∞

ck,l eı2π(xk/TX+yl/TY) (CS-22)

ck,l =1

TXTY

∫ TY

0

∫ TX

0

g(x, y) e−ı2π(xk/TX+yl/TY) dxdy . (CS-23)

This series uses basis functionsφk,lwith φk,l = eı2π(xk/TX+yl/TY). These are orthogonal and complete on any support rectanglewhose width is a multiple ofTX and height is a multiple ofTY. Since the formula for the coefficientsck,l does not depend on whichrectangle is chosen, the Fourier series expansion applies to all such rectangles,i.e., it applies to allx, y. (Note that the summationformula in (CS-22) is periodic with period (TX,TY). Note also that the integration in (CS-23) can be taken overany rectangle ofwidth TX and heightTY. Finally, notice that theφk,l’s have energyTX TY over anyTX × TY rectangle. Therefore, they each haveunity power.)

One of the most important applications of the Fourier seriesis in the context of deriving sampling theorems.

Convergence• Since the harmonic complex exponentials arecomplete, equality in (CS-22) holds in the sense that the difference between the

left and right-hand sides has zero energy. Equivalently, the error in the difference betweeng(x, y) and the summation of termsfrom−N to N converges to zero asN →∞, i.e., ‖g − gN‖ → 0 asN →∞ for any square integrableg, where

gN (x, y) ,

N∑

k=−N

N∑

l=−N

ck,l eı2π(xk/TX+yl/TY) .

• As in the 1D case, ifg(x, y) satisfies additional conditions, then the right-hand side of (CS-22) equalsg(x, y) at all pointsx, ywhereg(x, y) is continuous.• Certainly ifg(x, y) is separable, then all convergence properties are inherited directly from the 1D case.• TheGibbs phenomenawill also be present for signals with discontinuities.• If g(x, y) has continuous 1st and 2nd derivatives, then the 2D FS is pointwise and uniformly convergent.

This means thatgN (x, y)→ g(x, y) for anyx, y asN →∞. (Not true for discontinuous images!)

Properties

If g(x, y) is real, then the coefficients areHermitian symmetric : c−k,−l = c∗k,l, and we can write:

g(x, y) = c00 +

∞∑

k=1

2|ck0| cos(2π(k/TX) x + ∠ck0) +

∞∑

k=−∞

∞∑

l=1

2|ck,l| cos(2π[xk/TX + yl/TY] + ∠ck,l) .

The other usual 1D properties (time shift, conjugation, etc.) also all carry over directly.

If g(x, y) is separable, i.e., g(x, y) = gX(x)gY(y), wheregX(x) has periodTX andgY(y) has periodTY, thenck,l is the product ofthe 1D Fourier series coefficients ofgX(x) andgY(y), i.e.,

ck,l =

[

1

TX

∫ TX

0

gX(x) e−ı2πxk/TX dx

][

1

TY

∫ TY

0

gY(y) e−ı2πyl/TY dy

]

.

Parseval’s theoremfollows directly from the orthogonality of theφk,l’s (see (CS-19)):

1

TXTY

TY

TX

| g(x, y) |2 dx dy =∞∑

k=−∞

∞∑

l=−∞

|ck,l|2.

This shows that power in the space domain equals the sum of thepowers in each frequency component.

Page 38: 2D “Continuous Space” Signals and Systems

CS.38 c© J. Fessler, January 6, 2005, 23:23 (student version)

Example: Consider the 2D “bed of nails” function:

g(x, y) =

∞∑

n=−∞

∞∑

m=−∞

δ2(x− nTX, y −mTY) .

...

x

y ...

From (CS-23), thisg(x, y) has FS coefficientsck,l = 1TXTY

, so we can write:

g(x, y) =

∞∑

k=−∞

∞∑

l=−∞

1

TXTY

eı2π(xk/TX+yl/TY) .

(However, thisg(x, y) is not square integrable, so the FS does not converge so the above equality is just an engineering convention.)

Thecombor shahor impulse train function is defined as follows:

comb(x) =

∞∑

n=−∞

δ(x− n) .

2

...

x1

(CS-24)

We often need non-integer spacing:

comb

(x

TX

)

=∞∑

n=−∞

δ

(x

TX

− n

)

= TX

∞∑

n=−∞

δ(x− nTX) . (CS-25)

The above FS example “shows” the following equality (it can be useful in deriving sampling theorems):

comb2

(x

TX

,y

TY

)

, comb

(x

TX

)

comb

(y

TY

)

=∞∑

k=−∞

∞∑

l=−∞

eı2π(xk/TX+yl/TY) . (CS-26)

Page 39: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.39

Example:

Consider the 2D signalg(x, y) shown below, defined to be unity where white, and zero where black.

Is this signal separable? ?? What is c00? ??

We calculate the coefficients using (CS-23):

ck,l =

∫ 1

0

∫ x

0

e−ı2π(kx+ly) dy dx =

∫ 1

0x e−ı2πkx dx, l = 0

∫ 1

01

−i2πl e−ı2π(kx+ly)∣∣x

y=0dx, l 6= 0

=

1/2, k = l = 0i

k2π , l = 0, k 6= 0∫ 1

01

i2πl

[e−ı2πkx − e−ı2π(k+l)x

]dx, l 6= 0

=

1/2, k = l = 0i

k2π , l = 0, k 6= 0−il2π , k = 0, l 6= 0i

l2π , k = −l 6= 00, otherwise.

So most of the coefficients are zero, except wherel = 0 or ork = 0 or k = −l.

Are the coefficients separable? ?? Thus

g(x, y) =1

2+

∞∑

k=1

1

kπ[− sin(2πkx) + sin(2πky) + sin(2πk(x− y))].

0

0.2

0.4

0.6

0.8

1

x

y

g(x,y)

0 0.5 1 1.5 20

0.5

1

1.5

2

−0.2

0

0.2

0.4

0.6

0.8

1

1.2

x

y

FS synthesis g4(x,y)

0 0.5 1 1.5 20

0.5

1

1.5

2

% fig_fs1.m Illustrate 2D FSx = linspace(0,2,101); y = x; tx = 1; ty = 1;[xx,yy] = ndgrid(x,y);xm = mod(xx,tx); ym = mod(yy,ty); % handy trick for periodic f unctionsgxy = ym < xm; % think about this trick!

clf, subplot(221), imagesc(x,y,gxy’), axis xy, axis squar e, colorbarxlabel x, ylabel y, title ’g(x,y)’

g = 1/2 * ones(size(xx)); % DC termfor k=1:4

g = g + 1/(k*pi) * (-sin(2*pi*k*xx) + sin(2*pi*k*yy) + sin(2* pi*k*(xx-yy)));endsubplot(222), imagesc(x,y,g’), axis xy, axis square, colo rmap gray, colorbarxlabel x, ylabel y, title(sprintf(’FS synthesis g_%d(x, y)’, k))print(’fig_fs1’, ’-deps’)

Page 40: 2D “Continuous Space” Signals and Systems

CS.40 c© J. Fessler, January 6, 2005, 23:23 (student version)

Fourier Transforms

There are many transforms that are useful for image analysis. Of these, why is the Fourier transform particularly important?• Reason 1: Convolution Property

A shift-invariant PSF reduces the entire system equation toa convolution integral. Such a system is easier to analyze intheFourier domain, since convolutions in the space domain become simply multiplications in the Fourier domain. That is, thetransform of the output function is the transform of the input function multiplied by the system transfer functionH, the transformof the PSF.The preceding concept is the most important property of Fourier transforms for our purposes.• Reason 2: Eigenfunctions of LSI systems

As shown previously, complex exponential signals are the eigenfunctions of LSI systems, and the eigenvalues corresponding tothose eigenfunctions are exactly the values of the FT of the impulse response at the frequency of the signal:

ei2π(νXx+νYy) → LTI h(x, y) → H(νX, νY) ei2π(νXx+νYy),

whereh(x, y)F2←→ H(νX, νY). (See derivation preceding (CS-21).) The fact that the FT formula (CS-21) fell out of the

convolution with the complex exponential signal is by itself a compelling motivation to study that integral further.

The above two reasons are why Fourier methods are so important for analyzing LSI systems.

Two-dimensional Fourier transform

The continuous 2DFourier transform (2D FT) of a functiong(x, y) is another functionG(νX, νY) defined as

G(νX, νY) = F2[g(x, y)] =

∫ ∞

−∞

∫ ∞

−∞

g(x, y) e−ı2π(νXx+νYy) dxdy . (analysis equation)

The inverse Fourier transform of G(νX, νY) is defined by

g(x, y) = F−12 [G(νX, νY)] =

∫ ∞

−∞

∫ ∞

−∞

G(νX, νY) eı2π(νXx+νYy) dνX dνY . (synthesis equation)

Like the Fourier series, the above is a decomposition into complex exponentials, except that now there are a continuum ofexpo-nentials, combined with an integral, rather than a sum.

Other notation:G = F2[g], G(νX, νY) = (F2[g])(νX, νY), g(x, y)

F2←→ G(νX, νY),

g = F−12 [G], g(x, y) = (F2[G])(x, y),

g(x, y)F2←→ G(νX, νY) .

• We refer toνX andνY asspatial frequenciesby analogy to 1D transforms whereω = 2πf wheref is frequency.• What are the units of νX and νY? The units ofx andy are distances, for example centimeters, in which case the units of νX

andνY are cm−1, or “cycles per cm”.• Physically, each componentG(νX, νY) can be considered that component of the functiong(x, y) resulting from a plane wave of

wavevectorK = 2π√

ν2X

+ ν2Y

and propagating along directionθ, whereθ = tan−1(νY/νX).

• What are the units of G(νX, νY)? ??

Page 41: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.41

Relation to 1D Fourier transform

One can think of the 2D Fourier transform as resulting from first applying the 1D Fourier transform tog(x, y) with x as theindependent variable andy as a constant, to obtain a function offX andy, and then applying the 1D Fourier transform to thisfunction withy as the independent variable andfX as a constant. That is,

G(νX, νY) = F1D,y F1D,x g(x, y)

=

∫ ∞

−∞

[∫ ∞

−∞

g(x, y) e−ı2πνXx dx

]

e−ı2πνYy dy .

whereF1D,y andF1D,x denote the 1D Fourier transforms with respect tox andy, respectively.

Relation to Fourier series

One can derive the 2D FT from the Fourier series by letting theperiod(s) go to infinity, in analogy to the usual 1D derivation.

Here is a pseudo-proof thatF−12 [F2[g]] = g:

F−12 [F2[g]] = lim

T→∞

∫ T

−T

∫ T

−T

G(νX, νY) eı2π(νXx+νYy) dνX dνY

= limT→∞

∫ T

−T

∫ T

−T

[∫ ∞

−∞

∫ ∞

−∞

g(x′, y′) e−ı2π(x′νX+y′νY) dx′ dy′

]

eı2π(νXx+νYy) dνX dνY

=

∫ ∞

−∞

∫ ∞

−∞

g(x′, y′)

[

limT→∞

∫ T

−T

∫ T

−T

eı2π[(x−x′)νX+(y−y′)νY] dνX dνY

]

dx′ dy′

=

∫ ∞

−∞

∫ ∞

−∞

g(x′, y′)[

limT→∞

T 2 sinc2(T (x− x′), T (y − y′))]

dx′ dy′

=

∫ ∞

−∞

∫ ∞

−∞

g(x′, y′) δ2(x− x′, y − y′) dx′ dy′ = g(x, y) .

(This is typical of how FT properties are shown, by exchanging order of integration, changes of variables, etc.) To make thisrigorous, one must identify regularity conditions ong(x, y) that allow the exchange of order of limits and integration.

Existence

An integral with infinite limits represents a shorthand for alimit of an integral with endpoints that go to infinity, as seen above.Anytime one works with such integrals, for a mathematicallyrigorous treatment one should pause and consider when the limit(e.g., limT→∞ above) actually exists.

There are two common sets of sufficient conditions that ensure that the 2D Fourier transform of an imageg(x, y) exists and thatthe inverse transform relation also holds.

1. g(x, y) has finite energy,i.e., it is square integrable.In this case, the synthesis equation says thatg(x, y) equals the synthesis integral in the sense that their difference has zeroenergy.

2. Each of the following holds:• g(x, y) is absolutely integrable (over all ofR).• g(x, y) has only a finite number of discontinuities and a finite numberof maxima and minima in any finite region.• g(x, y) has no infinite discontinuities.

In this case, the Fourier transform exists and the synthesisintegral holds exactly at allx, y except where there is a disconti-nuity in g(x, y).

We will also applyF2 to functions that satisfy neither of these conditions, suchas impulse functions.

Page 42: 2D “Continuous Space” Signals and Systems

CS.42 c© J. Fessler, January 6, 2005, 23:23 (student version)

Null functions (a cautionary note)

Do the above conditions guarantee that taking a FT of a function g and then taking the inverse FT will give you backexactly the same function g? No! Consider the function

g(x, y) =

1, x = 0, y = 00, otherwise.

Since this function (called a “null function”) has no “area,” G(νX, νY) = 0, so the inverse FTg = F−12 [G] is simply g = 0, which

does not equalg exactly! However,g andg are equivalent in theL2(R2) sense that‖g − g‖2 =

∫∫(g − g)2 = 0, which is more

than adequate for any practical problem.

If we restrict attention tocontinuousfunctionsg (that are absolutely integrable), then it will be true thatg = F−12 [F2[g]].

Most physical functions are continuous, or at least do not have type of isolated points that the functiong above has. Moreover,most physical systems are insensitive to the addition of a null function to its input. Therefore the above mathematical subtletiesneed not deter our use of transform methods.We can safely restrict attention to functionsg for which g = F−1

2 [F2[g]] or at least to functions such thatg = F−12 [F2[g]] + n,

wheren is a null function.

Lerch’s theorem: iff andg have the same Fourier transform, thenf − g is a null function,i.e.,∫∞

−∞|f(x)− g(x)| dx = 0.

In 1D, when there is a (finite) discontinuity in the signal, taking the FT and then the inverse FT recovers the midpoint of thediscontinuity.What is the corresponding result in 2D?

Conjecture:

(F−12 [F2[g]])(x, y) = lim

ε→0

1

2πε

∫ 2π

0

g(x + ε cos φ, y + ε sin φ) dφ.

Exercise: prove or disprove.

Page 43: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.43

2D Fourier transform properties

We use the notationg(x, y)F2←→ G(νX, νY) to indicate thatG is the FT ofg, i.e., G = F2[g].

Properties that are analogous to 1DFT properties

Linearity The 2D Fourier transform operation is linear:

k

αk gk(x, y)F2←→

k

αk Gk(νX, νY) .

Convolution(g ∗∗ h)(x, y)

F2←→ G(νX, νY) H(νX, νY)

The convolution of two images has a spectrum that is the product of the spectra of the two images. This is a very important relationfor imaging.

Cross correlation [2, p. 47]

(g??h)(x, y) =

∫ ∞

−∞

∫ ∞

−∞

g∗(x′, y′) h(x′ + x, y′ + y) dx′ dy′

∫ ∞

−∞

∫ ∞

−∞

g∗(x′ − x, y′ − y)h(x, y) dx′ dy′

F2←→ G(νX, νY) H∗(νX, νY) .

The complex conjugate product of the spectra of two signals is the FT of their complex cross-correlation function.

Cross-correlation is used for object detection via matchedfiltering. Discrete-space implementation is MATLAB ’s xcorr2 com-mand.

An important special case is imageautocorrelation:

(g??g)(x, y) =

∫ ∞

−∞

∫ ∞

−∞

g∗(x′, y′) g(x′ + x, y′ + y) dx′ dy′ F2←→ |G(νX, νY) |2.

Although|G(νX, νY) |2 is often called thepower spectral density, the termenergy density spectrumis more appropriate.

Magnification (scaling)

For α, β 6= 0, g(αx, βy)F2←→ ??

Stretching in one domain proportionally contracts in the other domain, together with a constant weighting factor.

Shift (in space)

g(x− a, y − b)F2←→ G(νX, νY) e−ı2π(νXa+νYb)

Translation of a function in one space introduces a linear phase shift in the transform domain.

Is F2 a shift invariant operator? ??

Derivatived

dxg(x, y)

F2←→ ı2πνX G(νX, νY)

DC value (historical term, not necessarily any “current” here.)

G(0, 0) =

∫ ∞

−∞

∫ ∞

−∞

g(x, y) dx dy .

Page 44: 2D “Continuous Space” Signals and Systems

CS.44 c© J. Fessler, January 6, 2005, 23:23 (student version)

Duality

If g(x, y)F2←→ G(νX, νY), thenG∗(x, y)

F2←→ g∗(νX, νY) .

Self similarity

If g(x, y)F2←→ G(νX, νY), theng(x, y) + g(−x,−y) +G(x, y) +G(−x,−y) is its own Fourier transform!

Example: Gaussian, comb, derivative of Gaussian

Parseval’s Theoremor Power Theorem∫ ∞

−∞

∫ ∞

−∞

g(x, y) h∗(x, y) dxdy =

∫ ∞

−∞

∫ ∞

−∞

G(νX, νY) H∗(νX, νY) dνX dνY

in particular: Rayleigh’s theorem (1889):∫ ∞

−∞

∫ ∞

−∞

| g(x, y) |2 dxdy =

∫ ∞

−∞

∫ ∞

−∞

|G(νX, νY) |2 dνX dνY .

Exercise.Prove Parseval’s theorem for the 2D FT.

Multiplication (dual of convolution property)

g(x, y) h(x, y)F2←→ G(νX, νY) ∗∗H(νX, νY) .

Modulation (dual of shift property)

g(x, y) eı2π(ux+vy) F2←→ G(νX − u, νY − v) .

This property is at the heart of howholography works, and is important in deriving sampling theorems.

Hermitian symmetry properties

If g(−x,−y) = g∗(x, y), which is calledHermitian symmetry , thenG(νX, νY) is real.Proof:

G∗(νX, νY) =

(∫∫

g(x, y) e−ı2π(νXx+νYy) dxdy

)∗

=

∫∫

g∗(x, y) eı2π(νXx+νYy) dxdy

=

∫∫

g(−x,−y) eı2π(νXx+νYy) dxdy =

∫∫

g(x′, y′) e−ı2π(νXx′+νYy′) dx′ dy′ = G(νX, νY),

wherex′ = −x andy′ = −y. SoG(νX, νY) is real sinceG∗(νX, νY) = G(νX, νY).

By duality, if g(x, y) is real (which is usually the case), thenG(νX, νY) is Hermitian symmetric.

There are many other such relationships, such as: ifg(x, y) = g(−x,−y) thenG(νX, νY) is even.

Example. One application of the Hermitian property is in “half k-space” MRI, where one acquires only half of the Fourier samplesof an (assumed real) object, and “fills in” the other half using Hermitian symmetry.

Page 45: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.45

Generalized Fourier transforms

There are a number of important images for which, although not square or absolutely integrable, we would nevertheless like to useFourier theory. These include constants, exponentials, sinusoids, and periodic functions. In addition, e would like to apply Fouriertheory to the Dirac impulse and its cousin the “comb function.” In all such cases, the Dirac impulse and its defining properties playa principal role. Here is a list of such functions and their Fourier transforms.

Constant function

1F2←→ δ2(νX, νY) .

Impulse function

δ2(x, y)F2←→ 1, δ2(x− a, y − b)

F2←→ e−ı2π(νXa+νYb) .

Complex exponential

eı2π(xu+yv) F2←→ δ2(νX − u, νY − v) .

Sinusoid

cos(2π[xu + yv])F2←→ 1

2[δ2(νX − u, νY − v) + δ2(νX + u, νY + v)] .

Periodic signals

One approach to finding the 2D FT of a periodic signal uses the 2D FS:

g(x, y) =∞∑

k=−∞

∞∑

l=−∞

ck,l eı2π(xk/TX+yl/TY) F2←→ G(νX, νY) =

∞∑

k=−∞

∞∑

l=−∞

ck,l δ2(νX − k/TX, νY − l/TY) . (CS-27)

Often periodic signals arise as the superposition of shifted replicates of a basic pattern:

g(x, y) =

∞∑

n=−∞

∞∑

m=−∞

f(x− n∆X, y −m∆Y) (CS-28)

= f(x, y) ∗∗[

∞∑

n=−∞

∞∑

m=−∞

δ2(x− n∆X, y −m∆Y)

]

= f(x, y) ∗∗[

1

∆X

1

∆Y

comb2

(x

∆X

,y

∆Y

)]

F2←→ G(νX, νY) = F (νX, νY) comb2(∆XνX,∆YνY)

=

∞∑

k=−∞

∞∑

l=−∞

1

∆X∆Y

F (k/∆X, l/∆Y) δ2(νX − k/∆X, νY − l/∆Y) . (CS-29)

Comparing the right hand side of (CS-27) and (CS-29), we see that the FS coefficients are samples of the FT of the “pattern”f :

ck,l =1

∆X∆Y

F

(k

∆X

,l

∆Y

)

.

This expression is usually the easiest way to find 2D FS coefficients of a periodic signal of the form (CS-28).

Comb (an application of the previous result)

comb2(x, y)F2←→ comb2(νX, νY) .

What are the values of ∆X,∆Y and f here? ??

Page 46: 2D “Continuous Space” Signals and Systems

CS.46 c© J. Fessler, January 6, 2005, 23:23 (student version)

Properties that are unique to the 2D FT

Rotation

If g(x, y)F2←→ G(νX, νY), then (see (CS-10)):

gθ(x, y)F2←→ Gθ(νX, νY) = G(νX cos θ + νY sin θ,−νX sin θ + νY cos θ) . (CS-30)

Exercise.Prove the rotation property of the 2D FT.

Rotational symmetryIf an imageg(x, y) hasn-fold rotational symmetry, then so does its 2D FTG(νX, νY).This is a trivial consequence of the preceding property.

Separability (Cartesian)Images that are (Cartesian) separable have (Cartesian) separable Fourier transforms:

g(x, y) = gX(x)gY(y)F2←→ G(νX, νY) = GX(νX)GY(νY),

whereGX andGY are the 1D Fourier transforms ofgX(x) andgY(y) respectively.Separable functions are often used in filtering, where the filtering operation is a convolution such that

(g ∗∗ h)(x, y) = g(x, y) ∗∗ [hX(x)hY(y)]F2←→ G(νX, νY) H(νX, νY) = G(νX, νY) HX(νX)HY(νY).

We would also like a result forpolar separableimages. To form such a result, we must first digress into the Hankel transform.

Hankel transform

On [8, p. 360] of Abramowitz and Stegun, thekth-order Bessel functionJk is expressed:

Jk(z) =i−k

π

∫ π

0

eız cos φ cos(kφ) dφ =(−ı)−k

∫ 2π

0

e−ız cos φ eıkφ dφ .

(Note thatJ−k(z) = (−1)nJk(z). And Jk solvesz2f + zf + (z2 − k2)f = 0.) Usingφ′ = φ + π andφ′ = π − φ:

Jk(z) =i−k

∫ π

0

eız cos φ eıkφ dφ+i−k

∫ π

0

eız cos φ e−ıkφ dφ

=(−ı)−k

∫ 2π

π

e−ız cos φ′

eıkφ′

dφ′ +(−ı)−k

∫ π

0

e−ız cos φ′

eıkφ′

dφ′ .

Thekth-orderHankel transform of the 1D functiong(r) is defined by:

Gk(ρ) = 2π

∫ ∞

0

g(r)Jk(2πrρ)r dr . (CS-31)

Thekth-order Hankel transform and the 2D FT are related as follows:

f(r, θ) = g(r) eıkθ F2←→ F (ρ, φ) = eıkφ (−ı)kGk(ρ), (CS-32)

where we write the spectrum in polar coordinates as follows:F (ρ, φ) = F (ρ cos φ, ρ sin φ) (adopting the standard notationrecycling), whereρ =

ν2X

+ ν2Y

andφ = tan−1(νY/νX).

Proof:

F (ρ, φ) =

∫ ∞

−∞

∫ ∞

−∞

f(x, y) e−ı2π(xρ cos φ+yρ sin φ) dxdy =

∫ ∞

0

∫ 2π

0

f(r, θ) e−ı2πrρ(cos θ cos φ+sin θ sin φ) r dθ dr

=

∫ ∞

0

g(r)

[∫ 2π

0

eıkθ e−ı2πrρ cos(θ−φ) dθ

]

r dr = eıkφ

∫ ∞

0

g(r)

[∫ 2π

0

eık(θ−φ) e−ı2πrρ cos(θ−φ) dθ

]

r dr

= eıkφ

∫ ∞

0

g(r)

[∫ 2π

0

eıkθ e−ı2πrρ cos(θ) dθ

]

r dr = eıkφ (−ı)k2π

∫ ∞

0

g(r)Jk(2πρr) r dr = eıkφ (−ı)kGk(ρ).

Page 47: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.47

A function having the formf(r, θ) = g(r) eıkθ is calledcircularly harmonic , and the result (CS-32) shows that circularly har-monic functions have circularly harmonic transforms.

Separability (Polar)

If g(x, y) is separable in polar coordinates, i.e., if g(r, θ) = gR(r) gΘ(θ), then it is natural to express the 2D FT in polarcoordinates (although in general the 2D FT is not quite separable in those coordinates).

SincegΘ(θ) is a periodic function (with period2π), we use the 1D Fourier series to express it in terms of its angular harmonics:

gΘ(θ) =

∞∑

k=−∞

ck eıkθ , where ck =1

∫ 2π

0

gΘ(θ) e−ıkθ dθ .

Thus a polar separable functiong has the following 2D FT:

g(r, θ) =∞∑

k=−∞

ck

[gR(r) eıkθ

] F2←→ G(ρ, φ) =∞∑

k=−∞

ck eıkφ (−ı)kGk(ρ),

which is the sum of polar separable functions, but is not itself polar separable.

Circular Symmetry

By far the most frequent use of polar separability is in problems whereg(x, y) hascircular symmetry , so gΘ(θ) = 1 andg(x, y) = g(r). In this case only thek = 0 term above is nonzero, so the 2D FT is also circularly symmetric:

g(x, y) = g(r)F2←→ G(ρ, φ) = G(ρ) = 2π

∫ ∞

0

g(r)J0(2πρr) r dr,

whereJ0 is the 0th order Bessel function. Thus

G(ρ) = 2π

∫ ∞

0

g(r)J0(2πρr) r dr . Similarly: g(r) = 2π

∫ ∞

0

G(ρ)J0(2πρr) ρ dρ. (CS-33)

This is called theHankel Transform (of zero order). It is often called theFourier-Bessel transform in lens/diffraction theory.

Example:

Pillbox: rect(r)F2←→ jinc(ρ) ,

J1(πρ)

2ρ, Gaussian:e−πr2 F2←→ e−πρ2

Duality (for circularly symmetric functions)

g(r)F2←→ G(ρ) ⇐⇒ G∗(r)

F2←→ g∗(r).

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . .Exercise.Find a Parseval’s theorem appropriate for circularly symmetric functions.

What is the scaling property for the Hankel transform? ??

Recently,fast Hankel transform methods have been proposed [9] that facilitate the numerical use of (CS-31).

Page 48: 2D “Continuous Space” Signals and Systems

CS.48 c© J. Fessler, January 6, 2005, 23:23 (student version)

OTF and MTF

For LSI imaging systems, theoptical transfer function (OTF) is defined as the normalized frequency response

OTF(νX, νY) ,H(νX, νY)

H(0, 0),

and themodulation transfer function (MTF ) is defined as its magnitude:

MTF(νX, νY) , |OTF(νX, νY)| = |H(νX, νY) ||H(0, 0) | .

Why? See [10, p. 98].

2D FT Examples

Separable functionsFunction Spectrum

δ2(x, y) =1

πrδ2(r) 1

1 δ2(νX, νY)

comb2(x, y) comb2(νX, νY)

rect2(x, y) sinc2(νX, νY)

e−|x| e−|y| 2

1 + (2πνX)22

1 + (2πνY)2

Circularly symmetric functionsFunction Spectrum

δ(r − r0) 2πr0J0(2πr0ρ)

1

r

1

ρ

e−πr2

e−πρ2

rect(r) jinc(ρ)

circ(r) 2 jinc(2ρ)

e−ar 2πa

[(2πρ)2 + a2]3/2

sinc2(νX, νY) , sinc(νX) sinc(νY), sinc(t) ,

sin πt

πt , t 6= 01, t = 0.

−10

1

−10

10

0.5

1

xy −0.5 0 0.5 1

−0.5

0

0.5

1

−50

5

−50

50

0.5

1

−2 0 2 4

−2

0

2

4

νX

νX

ν Y

νY

g(x, y) = rect2(x, y)g(x, y) = rect2(x, y)

G(νX, νY) = sinc2(νX, νY)G(νX, νY) = sinc2(νX, νY)

Page 49: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.49

Other 2D transforms

A number of other 2D continuous-space transforms exist, such as the following.

2D Laplace transform

One could define a (bilateral)2D Laplace transform as follows:

G(s1, s2) =

∫ ∞

−∞

∫ ∞

−∞

g(x, y) e−(s1x+s2y) dxdy,

wheres1 ands2 are both complex numbers.

A primary use of 1D Laplace transforms is in the solution of 1Ddifferential-equations (and analysis of LTI systems described bydifferential-equations). Since 2D LSI systems are rarely described by differential equations, the 2D Laplace transform is much lessfrequently used.

Hartley transform

The 2DHartley transform and its inverse are defined by:

H(νX, νY) =

∫ ∞

−∞

∫ ∞

−∞

g(x, y) cas(2π(νXx + νYy)) dx dy

g(x, y) =

∫ ∞

−∞

∫ ∞

−∞

H(νX, νY) cas(2π(νXx + νYy)) dνX dνY,

wherecas(φ) , cos φ + sinφ. The Hartley transform of a real image is itself real, and fast algorithms exist,e.g., [9,11].

Radon transform

The Radon transform of a 2D imagef(x, y) is the collection of all “line integral projections” through that image, defined asfollows:

pφ(r) =

∫ ∞

−∞

f(r cos φ− ` sin φ, r sinφ + ` cos φ) d` .

This transform is the foundation for tomographic imaging likeX-ray computed tomography (CT).

Projection slice theorem

Sincepφ(r) is a 1D function ofr (for fixed φ), it has a 1D Fourier transformPθ(ν). Of course the 2D imagef(x, y) has a 2DFourier transformF (νX, νY) = F (ρ, φ). Theprojection slice theoremstates that the 1D FT ofpθ(r) is a “slice” through the 2DFourier transform off(x, y):

Pθ(ν) = F (ρ, θ)∣∣∣ρ=ν

.

The field of tomographic imaging essentially is built upon this property, since it shows that the set of line-integral projections (atall anglesφ) contain sufficient information to describe the 2D FT of an imagef(x, y), and hencef(x, y) itself.

Frequency distance principle

This is an interesting topic related to what happens if you take the 2D FT of a sinogrampθ(r). See [12–14].

Page 50: 2D “Continuous Space” Signals and Systems

CS.50 c© J. Fessler, January 6, 2005, 23:23 (student version)

Bandwidth and time-bandwidth products

1D bandwidth relationships

There are many definitions ofbandwidth (frequency domain) andpulse width (time domain).

For symmetric spectra,root mean-squared bandwidthor RMS bandwidth is a natural definition:

νrms ,

√√√√

∫∞

−∞ν2 |G(ν)|2 dν

∫∞

−∞|G(ν)|2 dν

. (CS-34)

Example. Gaussian signal. Fort0 > 0:

g(t) = e−π(t/t0)2 F←→ G(ν) = t0 e−π(νt0)

2

. (CS-35)

The RMS bandwidth is: (Use change of variablesx = νt0.)

νrms =

√√√√

∫∞

−∞ν2|G(ν)|2 dν

∫∞

−∞|G(ν)|2 dν

=

√√√√

∫∞

−∞ν2t20 e−2π(νt0)2 dν

∫∞

−∞t20 e−2π(νt0)2 dν

=

√√√√

1t0

∫∞

−∞x2 e−2πx2 dx

t0∫∞

−∞e−2πx2 dx

=1

t0

√√2/(8π)√

2/2=

1

t0

1

2√

π.

For symmetric signals,root mean-squared pulse widthor RMS pulse width is natural: trms ,

√√√√

∫∞

−∞t2 |g(t)|2 dt

∫∞

−∞|g(t)|2 dt

.

Example. Gaussian signal in (CS-35) above. The RMS pulse width is: (Use change of variablesx = t/t0.)

trms =

√√√√

∫∞

−∞t2 |g(t)|2 dt

∫∞

−∞|g(t)|2 dt

=

√√√√

∫∞

−∞t2 e−2π(t/t0)2 dt

∫∞

−∞e−2π(t/t0)2 dt

=

√√√√

t30∫∞

−∞x2 e−2πx2 dx

t0∫∞

−∞e−2πx2 dx

= t01

2√

π.

Time-bandwidth product

Using the Cauchy-Schwarz inequality, one can show [15, p. 178] (for signals satisfying certain regularity conditions):

νrmstrms ≥1

4π. (CS-36)

This uncertainty relation is similar to the Heisenberg uncertainty principle. For discrete-time and other extensions, see [16].

So a signal cannot be localized in both time and in frequency.Extreme cases:• impulse function - narrow in time, wide spectrum• sinusoid signal - periodic (infinite duration) in time, narrow spectrum• gaussian signal: time-bandwidth product is as narrow as possible

Example. For a Gaussian signal:2πνrmstrms = 1/2, which is “optimal” in a time-bandwidth sense.

Example. g(t) = tri(t)F←→ G(ν) = sinc2(ν).

t2rms =R

1

0t2(1−t)2 dt

R

1

0(1−t)2 dt

= 1/301/3 = 1

10 , sotrms = 1/√

10 ≈ 0.32.

2πνrms = 2π

√R

0ν2|sinc2(ν)|2 dν

R

0sinc4(ν) dω

=√

3 ≈ 1.73.

Thus2πνrmstrms =√

3/10 ≈ 0.548 ≥ 1/2, but fairly close.

n-dimensional case (with possibly assymetric signals and spectra)

For n-dimensional signals,νrms , inf~µ∈Rn

√√√√

∫∞

−∞‖~ν − ~µ‖2 |G(~ν)|2 d~ν∫∞

−∞|G(~ν)|2 d~ν

andtrms , inf~µ∈Rn

√√√√

∫∞

−∞‖~x− ~µ‖2 |g(~x)|2 d~x∫∞

−∞|g(~x)|2 d~x

are natural

definitions, where, forn = 2, ~x = (x, y) and~ν = (νX, νY). And one can show [17, p. 108] thatνrmstrms ≥n

4π.

Page 51: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.51

Sampling

Thus far we have described images, such as the output of an image capture system, as a continuous functionsg(x, y). This isconvenient for analysis, but in any digital imaging system,we can only record a (finite) 2D array of numbersgd[n,m] thatshould somehow representg(x, y).

A word about notation in this section is in order. When considering primarily continuous-space images, we useg(x, y) rather thanthe more cumbersomega(x, y). When considering primarily discrete-space images (later on), we will useg[n,m] rather than themore cumbersomegd[n,m]. But in this section we require both continuous- and discrete-space, so we include the subscripts forclarity. The following table summarizes the various functions considered.

Signal domain signal transform transform typeContinuous space ga(x, y) Ga(νX, νY) 2D FTImpulse synthesized gs(x, y) Gs(νX, νY) 2D FTDiscrete space gd[n,m] Gd(ωX, ωY) 2D DSFT

G[k, l] 2D DFT

As a realistic concrete example, in some digital mammography systems, the intensity of a transmitted X-ray beam is recorded in“analog” format on some continuous detector (e.g., photographic film, or a rewritable equivalent). The intensity that is recordedis ourga(x, y). Then a digitization device (such as a laser-scanning system or CCD camera) samplesga(x, y) over a regular grid,and sends (quantized) values to the digital computer.

Body Intensity

X-ray Source

Point SamplesDiscrete Detectorsgd[n,m]ga(x, y)

Example. An optical scanner is another device that converts the continuous, analog image on a piece of paper into a sampled,digital form.

Ideal uniform rectilinear sampling

The most common3 form of 2D sampling uses a 2D uniformly sampled grid, which matches raster-scan displays and printers, andis convenient for storage. (It is usually not the most efficient sampling scheme however, as shown in Lim Pr. 1.35.)

Let ∆X and∆Y be thesampling intervals in thex andy directions respectively, and define:

gd[n,m] = ga(n∆X,m∆Y) .

This equality represents idealized “point sampling.”

The ratios1/∆X and1/∆Y are called thesampling ratesin thex andy directions, respectively.

What are the units of the sampling rates? ??

Non-ideal sampling

Exercise. Generalize the three main results of Shannon’s ideal “impulse” sampling theory to the more realistic case where weaccount for finite detector size in the sampling relationship:

gd[n,m] =1

∆X∆Y

∫ (m+1/2)∆Y

(m−1/2)∆Y

∫ (n+1/2)∆X

(n−1/2)∆X

ga(x, y) dxdy .

3That is, the most common in digital systems. In human retinas, the “sampling” of rods and cones is systematically nonuniform (higher concentration in fovea),and some semiconductor sensors have been developed that mimic this nonuniform sampling property [18].

Page 52: 2D “Continuous Space” Signals and Systems

CS.52 c© J. Fessler, January 6, 2005, 23:23 (student version)

What are the questions to answer when analyzing sampling?

• Q1. ??• Q2. ??• Q3. ??• Q4. ??

For analysis, it is convenient to use a grid of impulse functions (“bed of nails”) to synthesize the following continuous-spacefunctiongs(x, y) from the samplesgd[n,m] . This manipulation is purely analytical—no such impulses exist in practice. Thehypothetical “sample carrying” continuous-space image isdefined by

gs(x, y) =

∞∑

n=−∞

∞∑

m=−∞

gd[n,m] ∆X∆Y δ2(x− n∆X, y −m∆Y) (CS-37)

= ga(x, y)∞∑

n=−∞

∞∑

m=−∞

∆X∆Y δ2(x− n∆X, y −m∆Y) by sampling property ofδ2(x, y)

= ga(x, y)

∞∑

n=−∞

∞∑

m=−∞

δ2(x/∆X − n, y/∆Y −m) by scaling property ofδ2(x, y)

= ga(x, y)

[

comb2

(x

∆X

,y

∆Y

)]

. (CS-38)

Since comb2(x, y)F2←→ comb2(νX, νY), it follows from the modulation and scaling properties of the 2D FT that the spectrum

Gs(νX, νY) of the hypothetical impulse sampled imagegs(x, y) is related to the spectrumGa(νX, νY) of the original imagega(x, y)as follows:

gs(x, y)F2←→ Gs(νX, νY) = Ga(νX, νY) ∗∗ [∆X∆Y comb2(νX∆X, νX∆Y)]

=

∞∑

k=−∞

∞∑

l=−∞

Ga(νX − k/∆X, νY − l/∆Y), (CS-39)

since

∆X∆Y comb2(νX∆X, νY∆Y) =

∞∑

k=−∞

∞∑

l=−∞

δ2(νX − k/∆X, νY − l/∆Y) .

ThusGs(νX, νY) consists of the sum of shifted copies of the spectrumGa(νX, νY) as illustrated below.

...

...

...

After sampling/synthesizingBefore

νXνX

νY

νY

νmaxX

νmaxY

1/∆X

1/∆Y

Gs(νX, νY)Ga(νX, νY)

Now we can answer the questions posed above.

Page 53: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.53

Q1. Can we recoverga(x, y) from gd[n,m]?

In general onecannotrecoverga(x, y) from the samplesgd[n,m], no matter how closely spaced. However, there are classes offunctions for which itis possible. One such class, perhaps the most important one, isthe class of band-limited functions.

We sayga(x, y) (or Ga(νX, νY)) is band-limited to (νmaxX

, νmaxY

) iff Ga(νX, νY) = 0 for |νX| ≥ νmaxX

or |νY| ≥ νmaxY

. (Picture)

Q2. How finely must we sample?

If Ga(νX, νY) is band-limited to (νmaxX

, νmaxY

) and if1/∆X > 2νmaxX

and1/∆Y > 2νmaxY

, then there is no overlap of the replicatesof Ga(νX, νY) in Gs(νX, νY). Overlap is calledaliasing (higher spatial frequencies will “alias” as lower spatial frequencies).2maxνmax

X, νmax

Y is called theNyquist sampling “rate” (twice the highest spatial frequency).

If ∆X < 1/(2νmaxX

) and∆Y < 1/(2νmaxY

) then we say the image (or system) isadequately sampled, otherwise we say the imageis undersampled.

Example. Consider sampling the imageg(x, y) = cos(

2π[ 12∆X

+ εX ]x + 2π[ 12∆Y

+ εY ]y)

with sampling intervals∆X and∆Y,

where0 < εX < 12∆X

and0 < εY < 12∆Y

. Then,g(x, y) is undersampled, producing samples

gd[n,m] = cos

(

2π[1

2∆X

+ εX ]n∆X + 2π[1

2∆Y

+ εY ]n∆Y

)

= cos(πn + εXn∆X + πn + εY n∆Y) .

At these sampling intervals, another lower frequency imagehas the same samples. Specifically, consider the signalf(x, y) =

cos(

2π[ 12∆X

− εX ]x + 2π[ 12∆Y

− εY ]y)

, whose samples are

fd[n,m] = cos

(

2π[1

2∆X

− εX ]n∆X + 2π[1

2∆Y

− εY ]n∆Y

)

= cos(πn− εX∆Xn + πn− εY ∆Yn)

= cos(εX∆Xn− πn + εY ∆Yn− πn) since cos(−θ) = cos(θ)

= cos([εX∆X + 2π]n− πn + [εY ∆Y + 2π]− πn)

= cos(εX∆Xn + πn + εY ∆Y + πn)

= gd[n,m] .

That is,f(x, y) andg(x, y) have the same samples. They are said to bealiasesof each other. Alternatively, we say thatg(x, y) hasaliasedto f(x, y).

Non-band-limited images

If ga(x, y) is not band-limited, then in general no algorithm can recover ga(x, y) from gd[n,m] perfectly.Other information (such as nonnegativity) would be required.

However, for “reasonably behaved” imagesg(x, y), one canapproximatelyrecoverg(x, y) from its samples by taking∆X and∆Y

sufficiently small. In fact, the energy betweeng(x, y) and the recovered approximation from the samples can be madearbitrarilysmall by making∆X and∆Y small enough. This is the subject ofapproximation theory and it is relevant to signal and imageprocessing because rarely are signals exactly band-limited.

Avoiding aliasing

How can we avoid aliasing for non-band-limited images? ??

Page 54: 2D “Continuous Space” Signals and Systems

CS.54 c© J. Fessler, January 6, 2005, 23:23 (student version)

Signal reconstruction/interpolation

Q3. How can we “recover” a (bandlimited) imagega(x, y) from its samplesgd[n,m]?(Of course we cannot storeall of ga(x, y) on a computer, but we might want values ofga(x, y) on a grid finer than the originalsampling. If the function is bandlimited and adequately sampled then this can be done!) Or we might like to design a suitable 2DD/A converter (i.e., a video monitor) that takes a digital input signalgd[n,m] and recreates the analogga(x, y) at its output.

The key to methods for recoveringga(x, y) from gd[n,m] is the following fact.If Ga(νX, νY) is bandlimited to(1/(2∆X), 1/(2∆Y)) (and hence adequately sampled), then

Ga(νX, νY) = Gs(νX, νY) [ rect2(νX∆X, νY∆Y)] . (CS-40)

This relationship follows directly from the form ofGs(νX, νY) given in (CS-39) above.The ideal lowpass filterH(νX, νY) = rect2(νX∆X, νY∆Y) selects out the central replicate. This replicate is precisely the spectrumGa(νX, νY) of the original signal. This is easily seen in the spectrum, but is perhaps puzzling in the space domain!

Frequency-domain reconstruction method:• Constructgs(x, y) from samplesgd[n,m].• Take 2D FT ofgs(x, y) to getGs(νX, νY)• TruncateGs(νX, νY) to the bandlimited region (set everything outside to zero) to getGa(νX, νY).• Take inverse Fourier transform to getga(x, y).

This method is impractical sinceGa(νX, νY) is continuous; on a computer one could store only a finite number of samples of thespectra, so one would not recoverga(x, y) exactlyat any coordinates. (However, a discrete approximation to this approach issometimes applied; see MATLAB ’s interpft routine.)

Space-domain reconstruction method:Taking the inverse 2D FT of key property (CS-40) above yields:

ga(x, y) = gs(x, y) ∗∗[

1

∆X∆Y

sinc2

(x

∆X

,y

∆Y

)]

=

[∞∑

n=−∞

∞∑

m=−∞

gd[n,m] ∆X∆Y δ2(x− n∆X, y −m∆Y)

]

∗∗[

1

∆X∆Y

sinc2

(x

∆X

,y

∆Y

)]

ga(x, y) =∞∑

n=−∞

∞∑

m=−∞

gd[n,m] sinc2

(x− n∆X

∆X

,y −m∆Y

∆Y

)

.

Thus we can recoverga(x, y) by interpolating the samplesgd[n,m] using sinc functions. This is calledsinc interpolation.

The sinc function has infinite extent, so in practice approximate interpolators are used more frequently (such as B-splines). SeeMATLAB ’s interp2 routine.

Page 55: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.55

The following figures compare sinc interpolation with some of the practical alternatives available with MATLAB ’s interp2routine.

x

y

Samples of ???

2 4 6 8 10

2

4

6

8

10

flop 24012

y

Nearest

5 10

2

4

6

8

10

flop 44971

y

Linear

5 10

2

4

6

8

10

flop 157201

y

Cubic

5 10

2

4

6

8

10

flop 2883225

y

Sinc2

5 10

2

4

6

8

10

x

y

True ga(x,y)

5 10

2

4

6

8

10

Why are MATLAB’s choices so poor in this example? ??

What causes the remaining artifacts in the sinc interpolated image? ??

One should not conclude from this example that sinc interpolation is always preferable!

Alternative reconstruction methods

Other reconstruction methods, generally referred to asinterpolation methods, will be discussed in Chapter 8.

Page 56: 2D “Continuous Space” Signals and Systems

CS.56 c© J. Fessler, January 6, 2005, 23:23 (student version)

Video monitors

Standard computer monitors “reconstruct” an analog image from discrete-space datagd[n,m], but they do not use the above sincinterpolation method. Typically these monitors use a 2D version of “sample and hold,” which is mathematically equivalent to

convolvinggs(x, y) with 1∆X∆Y

rect2

(x

∆X

, y∆Y

)

, where∆X ×∆Y is the pixel size. Thus the reconstructed image is

gr(x, y) = gs(x, y) ∗∗ 1

∆X∆Y

rect2

(x

∆X

,y

∆Y

)

=

∞∑

n=−∞

∞∑

m=−∞

gd[n,m] rect2

(x− n∆X

∆X

,y −m∆Y

∆Y

)

, (CS-41)

so

Gr(νX, νY) =

[∞∑

k=−∞

∞∑

l=−∞

G(νX − k/∆X, νY − l/∆Y)

]

sinc2(∆XνX,∆YνY) . (Picture) (CS-42)

This means that there can be some “aliasing” (imperfect reconstruction) in such a video display.

What happens ofga(x, y) is not bandlimited?

If ga(x, y) is not bandlimited or is otherwise sampled below the Nyquist rate,thenaliasing will occur. Aliasing means more thanone frequency component contributes to a single component of the Fourier transform.

Fortunately (from an aliasing perspective, but unfortunately from a resolution perspective) many imaging systems areintrinsicallynearly bandlimited, so aliasing can be minimized by appropriate sampling. However, the cost in terms of number of detectorelements may be high. For example, digital mammography systems are approaching 4K by 4K pixels, presenting a nontrivialdatastorage problem alone, as well as a challenge for fast image processing.

Physical objects are space-limited, so they cannot be band-limited! How to sample?

Sampling for non-band-limited signals

Aliasing is unavoidable in this case, but a practical rule-of-thumb that is sometimes used is to use a sample spacing thatis half theFWHM of the PSF.

(Picture) of triangular PSF and sinc2 spectrum.

Exercise. For the video monitor reconstruction example given in the notes, how much more finely than the Nyquist rate must onesample to guarantee that the amplitude of all aliased components will be attenuated down to an value that is less than 10% of theiroriginal values?Hint: this probably requires a small numerical calculationfor which fzero or fsolve may be useful.

What can be said about uniform sampling in polar coordinates? ??

Page 57: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.57

Computing Fourier transforms from sampled images

We have seen that abandlimitedimage can be reconstructed from its uniform rectilinear samples (provided the sampling intervalis small enough) using separable sinc interpolation:

ga(x, y) =∞∑

n=−∞

∞∑

m=−∞

gd[n,m] sinc2

(x− n∆X

∆X

,y −m∆Y

∆Y

)

.

It follows therefore that we can also find the 2D FT ofga(x, y) from its sampleswithout actually computingga(x, y) .

Taking the 2D FT of both sides of the preceding equation yields the following relationship between the object spectrumGa(νX, νY)and the samples:

Ga(νX, νY) =

∞∑

n=−∞

∞∑

m=−∞

gd[n,m] ∆X rect(∆XνX) e−ı2πn∆XνX ∆Y rect(∆YνY) e−ı2πm∆YνY

=

∞∑

n=−∞

∞∑

m=−∞

gd[n,m] ∆X∆Y e−ı2π(∆XνXn+∆YνYm) , |νX| ≤ 1/(2∆X), |νY| ≤ 1/(2∆Y)

0, otherwise.

The expression in braces is closely related to the2D discrete-space Fourier transform(DSFT) of a 2D discrete-space signalgd[n,m] is defined as follows:

Gd(ωX, ωY) =

∞∑

n=−∞

∞∑

m=−∞

gd[n,m] e−ı(ωXn+ωYm) . (CS-43)

(This is the 2D space domain analog of the DTFT). We will consider properties of this transform in detail later; for now we justnote that it is a periodic function with period(2π, 2π).

Thus, ifGa(νX, νY) is bandlimited to the range|νX| ≤ 1/(2∆X) and|νY| ≤ 1/(2∆Y), we have the following relationship betweenthe 2D FTGa(νX, νY) and the 2D DSFT:

Ga(νX, νY) = ∆X∆Y Gd(ωX, ωY)∣∣∣ωX=2πνX∆X,ωY=2πνY∆Y

rect2(νX∆X, νY∆Y)

= ∆X∆Y Gd(2πνX∆X, 2πνY∆Y) rect2(νX∆X, νY∆Y).

Taking the 2D FT of both sides of (CS-37) yields the followingrelationship between the spectrumGs(νX, νY) and the DSFT:

Gs(νX, νY) =

∞∑

n=−∞

∞∑

m=−∞

gd[n,m] ∆X∆Y e−ı2π(∆XνXn+∆YνYm) (CS-44)

= ∆X∆Y Gd(ωX, ωY)∣∣∣ωX=2πνX∆X,ωY=2πνY∆Y

= ∆X∆Y Gd(2πνX∆X, 2πνY∆Y) . (CS-45)

These equations are consistent with the result (CS-40) shown above.

If ga(x, y) is nearly, but not exactly, bandlimited, then the DSFT givesanapproximationto the 2D FT, which is often adequate.

One can also use discrete-time convolution to approximate continuous-time convolution. This is explored in a homeworkproblem.

Page 58: 2D “Continuous Space” Signals and Systems

CS.58 c© J. Fessler, January 6, 2005, 23:23 (student version)

The following figure illustrates the relationships betweenthe various spectra.

2D DSFT

Amplitude scaled byN2π

2π M

Sameamplitudeas

π

Sample object

12∆X

−12∆X

1/∆X

1/∆

Y

1/∆X ∆Y

l

kωX

ωY

νX

νX

νY

νY

νmaxX

νmaxY

G[k, l]

Ga(νX, νY)

Ga(νX, νY)

Gs(νX, νY)

Gd(ωX, ωY)

Page 59: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.59

Discrete Fourier Transform

Usually we only have available a finite number of samples, say, gd[n,m], for n = 0, . . . , N − 1, andm = 0, . . . ,M − 1. Insuch cases it usually would be pointless to computeGd(ωX, ωY) for anything even close to a continuum of frequency coordinates(ωX, ωY), since in fact we can recover the samplesgd[n,m] from certain values of the DSFT at the following uniformly-spaceddiscrete frequency components:

ωX =2π

Nk, k ∈ Z andωY =

Ml, l ∈ Z.

We use the notationG[k, l] to denote the samples of the DSFT at these frequency coordinates:

G[k, l] ,

N−1∑

n=0

M−1∑

m=0

gd[n,m] e−ı2π(kn/N+lm/M) . (CS-46)

This is called the (N,M -point)2D discrete Fourier transform (DFT) of gd[n,m], and is computed by MATLAB ’s fft2 routine.

If the object isspace limited, meaning thatgd[n,m] is nonzero only forn = 0, . . . , N − 1 andm = 0, . . . ,M − 1, then thefollowing relationship exists between the DSFT and DFT:

G[k, l] = Gd

(2π

Nk,

Ml

)

, k, l ∈ Z. (CS-47)

The DFT is periodic with periodN,M , i.e., G[k, l] = G[k + nN, l + mM ] for anyn,m ∈ Z, so to recovergd[n,m] from G[k, l]we really only needNM of theG[k, l] values.

The samplesgd[n,m] can be recovered exactly fromNM of theG[k, l]’s by theinverse 2D discrete Fourier transform:

gd[n,m] =1

NM

N−1∑

k=0

M−1∑

l=0

G[k, l] eı2π(kn/N+lm/M) , n = 0, . . . , N − 1, m = 0, . . . ,M − 1.

See theifft2 routine in MATLAB .

In light of (CS-45) and (CS-47), we have the following relationship between the DFT andGs(νX, νY):

G[k, l] =1

∆X

1

∆Y

Gs

(k

N∆X

,l

M∆Y

)

if space limited. (CS-48)

So far we have not made any approximations. However, we have also not yet directly relatedG[k, l] to Ga(νX, νY). Our goal wasto find such a relationship, since often we are interested in the spectrumGa(νX, νY) of an imagega(x, y), yet all we have availableis a finite set of samplesgd[n,m]N−1

n=0 M−1m=0 of that image. If we compare (CS-48) and (CS-40), then at firstit appears that we

should be able to directly relateG[k, l] to samples ofGa(νX, νY). Unfortunately, however, no exact relationship exists (for finiteN andM ) since (CS-48) requires the object to be space limited, whereas (CS-40) requires the object to be bandlimited. As shownin (CS-36) above, an image cannot be both space-limited and band-limited.

Fortunately, most real-world images areapproximatelybandlimited, even if they are space limited. Thus, providedthe finite sumcovers the entire nonzero part of image and provided the sample spacing is fine enough to yield minimal aliasing, we can combine(CS-48) and (CS-40) to form the following very important approximate relationship between the 2D DFT and the 2D FT:

G[k, l] ≈ 1

∆X

1

∆Y

Ga

(k

N∆X

,l

M∆Y

)

rect2

(k

N,

l

M

)

. (CS-49)

The rect functions imply that the above expression only applies if k ∈ 0,±1, . . . ,±N/2 and l ∈ 0,±1, . . . ,±M/2. Theaccuracy of this approximation generally improves asN andM increase and∆X and∆Y decrease.

Page 60: 2D “Continuous Space” Signals and Systems

CS.60 c© J. Fessler, January 6, 2005, 23:23 (student version)

Fast Fourier Transform

The 2D DFT can be computed rapidly using the2D Fast Fourier Transform (FFT), e.g., thefft2 routine in MATLAB .The Numerical Recipes book [20] gives a nice discussion, particularly aboutfftshift !

However, there is a subtle point that is often a source of confusion when working with the FFT. This point can be addressed usingthe 1D FFT as follows.

Most 1D FFT routines return coefficients as a vector ordered as follows:

[G0 G1 . . . GN/2−1 | GN/2 GN/2+1 . . . GN−1],

i.e., for k = 0, . . . , N − 1, where we have inserted the bar “|” to show the point that divides the vector into two pieces each withN/2 elements. This is not the same ordering as one might expect from (CS-49)! If you apply thefftshift command to the FFToutput, then the vector is re-ordered as follows:

[GN/2 GN/2+1 . . . GN−1 | G0 G1 . . . GN/2−1].

Since the DFT is periodic with periodN , this ordering is equivalent to:

[G−N/2 G−N/2+1 . . . G−1 | G0 G1 . . . GN/2−1].

This is very close to (CS-49), except that the pointk = N/2 is not included. It is not needed becauseGN/2 = G−N/2 due to theperiodicity of the DFT. Note that the above ordering may look“asymmetric,” but it is exactly the right sampling for the FFT. Notethat the DC value (G0) is just to the right of center.

Similar considerations apply in 2D. (The four quadrants areswapped around byfftshift .)

Caution: never use(-n/2):(n/2) or linspace(-pi,pi,n) anywhere near afft !!!

Summary of key relationships

Time domain:

gd[n,m] = ga(n∆X,m∆Y)

gs(x, y) =∞∑

n=−∞

∞∑

m=−∞

gd[n,m] ∆X∆Y δ2(x− n∆X, y −m∆Y) = ga(x, y)

[

comb2

(x

∆X

,y

∆Y

)]

ga(x, y) = gs(x, y) ∗∗[

1

∆X∆Y

sinc2(x∆X, x∆X)

]

(if suitably bandlimited)

ga(x, y) =

∞∑

n=−∞

∞∑

m=−∞

gd[n,m] sinc2

(x− n∆X

∆X

,y −m∆Y

∆Y

)

(if suitably bandlimited)

Frequency domain:

Gs(νX, νY) =

∞∑

k=−∞

∞∑

l=−∞

Ga(νX − k/∆X, νY − l/∆Y)

Ga(νX, νY) = Gs(νX, νY) [ rect2(νX∆X, νY∆Y)] (if suitably bandlimited)

Gs(νX, νY) = ∆X∆Y Gd(2π∆XνX, 2π∆YνY)

Ga(νX, νY) = ∆X∆Y Gd(2π∆XνX, 2π∆YνY) rect2(νX∆X, νY∆Y) (if suitably bandlimited)

G[k, l] = Gd

(2πk

N,2πl

M

)

(if suitably spacelimited)

G[k, l] =1

∆X

1

∆Y

Gs

(k

N∆X

,l

M∆Y

)

(if suitably spacelimited)

G[k, l] ≈ 1

∆X

1

∆Y

Ga

(k

N∆X

,l

M∆Y

)

, −N/2 ≤ k ≤ N/2, −M/2 ≤ l ≤M/2

Gd(ωX, ωY) =1

∆X∆Y

∞∑

k=−∞

∞∑

l=−∞

Ga

(ωX/2π − k

∆X

,ωY/2π − l

∆Y

)

Page 61: 2D “Continuous Space” Signals and Systems

c©J.F

essler,January6,2005,23:23

(studentversion)C

S.61

The

following

chartsumm

arizessom

eofthe

aboverelationsh

ips.

(bandlimited)

Impulses

Truncate(space limited)

Replicateand sum

2D Sinc

DT

FS

Convolution

Sampling

SamplingImpulse

2D Sinc(bandlimited)

Interpolation

FT

FT

LowpassFilter

(bandlimited)

Sample

DirichletInterpolation

(space limited)

DS

FT

Replicateand sum

DF

T

ga (x

,y)

gs (x

,y)

gd [n

,m]

g[n

,m]

Ga (ν

X ,νY )

Gs (ν

X ,νY )

Gd (ω

X ,ωY )

G[k

,l]

ωX

=2πν

X ∆X

ωY

=2πν

Y∆

Y

Page 62: 2D “Continuous Space” Signals and Systems

CS.62 c© J. Fessler, January 6, 2005, 23:23 (student version)

Appendix: Vector Spaces and Linear Operators

Linear systems are represented mathematically by linear transformations from one vector space to another.For completeness, we give below the definition of a vector space (in more generality then we will actually use).That definition uses the concept of a field of scalars, so we first review that.

Field of Scalars (from Applied Linear Algebra, Noble and Daniel, 2nd ed.)

A field of scalarsF is a collection of elementsα, β, γ, . . . along with an “addition” and a “multiplication” operator.

To every pair of scalarsα, β in F , there must correspond a scalarα + β in F , called thesumof α andβ, such that• Addition is commutative:α + β = β + α• Addition is associative:α + (β + γ) = (α + β) + γ• There exists a unique element0 ∈ F , calledzero, for whichα + 0 = α, ∀α ∈ F• For everyα ∈ F , there corresponds a unique scalar(−α) ∈ F for whichα + (−α) = 0.

To every pair of scalarsα, β in F , there must correspond a scalarαβ in F , called theproduct of α andβ, such that• Multiplication is commutative:αβ = βα• Multiplication is associative:α(βγ) = (αβ)γ• Multiplication distributes over addition:α(β + γ) = αβ + αγ• There exists a unique element1 ∈ F , calledone, or unity , or theidentity element, for which1α = α, ∀α ∈ F• For every nonzeroα ∈ F , there corresponds a unique scalarα−1 ∈ F , called theinverseof α for whichαα−1 = 1.

Simple facts for fields:• 0 + 0 = 0• −0 = 0

One example of a field is the set of rational numbers (with the usual definitions of addition and multiplication).

The only fields that we will need are the field of real numbersR and the field of complex numbersC.

Vector Spaces

A vector spaceor linear spaceconsists of• A field F of scalars.• A setV of entities calledvectors• An operation calledvector addition that associates asumx + y ∈ V with each pair of vectorsx,y ∈ V such that• Addition is commutative:x + y = y + x

• Addition is associative:x + (y + z) = (x + y) + z

• There exists a unique element0 ∈ V, called thezero vector, for whichx + 0 = x, ∀x ∈ V• For everyx ∈ V, there corresponds a unique vector(−x) ∈ V for whichx + (−x) = 0.

• An operation calledmultiplication by a scalar that associates with each scalarα ∈ F and vectorx ∈ V a vectorαx ∈ V,called theproduct of α andx, such that:• Associative:α(βx) = (αβ)x• Distributiveα(x + y) = αx + αy

• Distributive(α + β)x = αx + βx

• If 1 is the identify element ofF , then1x = x. ∀x ∈ V.• No operations are presumed to be defined for multiplying two vectors or adding a vector and a scalar.

Simple facts for vector spaces:• 0x = 0 for x ∈ V. Proof:x = 1x = (1 + 0)x = 1x + 0x = x + 0x, ∀x ∈ V. Thus0x = 0

• (−1)x = −x for x ∈ V. Proof:x + (−1)x = 1x + (−1)x = (1 + (−1))x = 0x = 0.• α0 = 0 for α ∈ F . Proof:α0 = α0+0 = α0+[α0+(−α0)] = [α0+α0]+(−α0) = α(0+0)+(−α0) = α0+(−α0) = 0.

Page 63: 2D “Continuous Space” Signals and Systems

c© J. Fessler, January 6, 2005, 23:23 (student version) CS.63

What are some examples?

Examples of Important Vector Spaces• Euclideann-dimensional spaceor n-tuple space: V = R

n. If x ∈ V, thenx = (x1, x2, . . . , xn) wherexi ∈ R.The field of scalars isF = R. Of coursex + y = (x1 + y1, x2 + y2, . . . , xn + yn), andαx = (αx1, . . . , αxn).• Complex Euclideann-dimensional space: V = C

n. If x ∈ V, thenx = (x1, x2, . . . , xn) wherexi ∈ C. The field of scalarsisF = C.Of coursex + y = (x1 + y1, x2 + y2, . . . , xn + yn), andαx = (αx1, . . . , αxn).• V = L2(R

3). The set of functionsf : R3 → C that aresquare integrable:

∫∞

−∞

∫∞

−∞

∫∞

−∞|f(x, y, z)|2 dxdy dz < ∞. The

field isF = R. Addition and scalar multiplication are defined in the natural way.To show show thatf, g ∈ L2(R

3) impliesf + g ∈ L2(R3), one can apply the triangle inequality:‖f + g‖ ≤ ‖f‖+ ‖g‖ where

‖f‖ = 〈f, f〉, and where it can be shown that〈f, g〉 =∫∞

−∞

∫∞

−∞

∫∞

−∞f(x, y, z)g∗(x, y, z) dx dy dz is a valid inner product.

• The set of functions on the planeR2 that are zero outside of the unit square.• The set of solutions to a homogeneous linear system of equationsAx = 0.

2.1 Linear Transformations and Linear Operators

Let U andV be two vector spaces over a common fieldF .A function A : U → V is called alinear transformation or linear mapping from U into V iff ∀u1,u2 ∈ U and all scalarsα, β ∈ F :

A(αu1 + βu2) = αA(u1) + βA(u2).

Example:• Let F = R and letV be the space of continuous functions onR. Define the linear transformationA by: if F = A(f) then

F (x) =∫ x

0f(t) dt. Thus integration (with suitable limits) is linear.

If A is a linear transformation fromV into V, then we sayA is a linear operator. However, the terminology distinguishing lineartransformations from linear operators is not universal, and the two terms are often used interchangeably.

Simple fact for linear transformations:• A[0] = 0. Proof:A[0] = A[00] = 0A[0] = 0. This is called the “zero in, zero out” property.

Caution! (From Linear Systemsby T. Kailath.) By induction it follows that

A

(n∑

i=1

αiui

)

=

n∑

i=1

αiA(ui)

for any finiten, but the abovedoes notimply in general that linearity holds for infinite summations or integrals.Further assumptions about “smoothness” or “regularity” or“continuity” of A are needed for that.This is usually no problem for real imaging systems, so we will use infinite sums whenever needed without further ado.

Although additional regularity conditions on the linear operatorA are necessary to ensure this, we assume hereafter that thesuperposition property holds even for infinite summations,including integrals. That is, if for eachω in a setΩ, the functionfω issquare integrable, then we assume

A

[∫

Ω

a(ω)fω dω

]

=

Ω

a(ω)A[fω] dω “strong” superposition property .

Thus we will exchange the order of integration and linear operators freely in our analysis.

Page 64: 2D “Continuous Space” Signals and Systems

CS.64 c© J. Fessler, January 6, 2005, 23:23 (student version)

Bibliography[1] R. Bracewell.The Fourier transform and its applications. McGraw-Hill, New York, 1978.[2] R. N. Bracewell.Two-dimensional imaging. Prentice-Hall, New York, 1995.[3] J. S. Lim. Two-dimensional signal and image processing. Prentice-Hall, New York, 1990.[4] P. E. Varberg. Change of variables in multiple integrals.Amer. Math. Monthly, 78(1), January 1971.[5] R. E. Williamson, R. H. Crowell, and H. F. Trotter.Calculus of vector functions. Prentice-Hall, New Jersey, 1972.[6] J. W. Goodman.Statistical optics. Wiley, New York, 1985.[7] D. G. Luenberger.Optimization by vector space methods. Wiley, New York, 1969.[8] M. Abramowitz and I. A. Stegun.Handbook of mathematical functions. Dover, New York, 1964.[9] J. A. Ferrari, D. Perciante, and A. Dubra. Fast Hankel transform of nth order.J. Opt. Soc. Am. A, 16(10):2582, October 1999.

[10] I. A. Cunningham. Applied linear-systems theory. In J. Beutel, H.L. Kundel, and R. L. Van Metter, editors,Handbook of Medical Imaging,Volume 1. Physics and Psychophysics, pages 79–160. SPIE, Bellingham, 2000.

[11] C. H. Paik and M. D. Fox. Fast Hartley transforms for image processing.IEEE Tr. Med. Imag., 7(2):149, June 1988.[12] R. M. Lewitt, P. R. Edholm, and W. Xia. Fourier method for correction of depth-dependent collimator blurring. InProc. SPIE 1092, Med.

Im. III: Im. Proc., pages 232–43, 1989.[13] S. J. Glick, B. C. Penney, M. A. King, and C. L. Byrne. Noniterative compensation for the distance-dependent detector response and photon

attenuation in SPECT.IEEE Tr. Med. Imag., 13(2):363–74, June 1994.[14] W. Xia, R. M. Lewitt, and P. R. Edholm. Fourier correction for spatially variant collimator blurring in SPECT.IEEE Tr. Med. Imag.,

14(1):100–15, March 1995.[15] R. Bracewell.The Fourier transform and its applications. McGraw-Hill, New York, 3 edition, 2000.[16] D. L. Donoho and P. B. Stark. Uncertainty principles and signal recovery.SIAM J. Appl. Math., 49(3):906–31, June 1989.[17] L. Grafakos.Classical and modern Fourier analysis. Pearson, NJ, 2004.[18] B. A. Wandell, A. E. Gamal, and B. Girod. Common principles of image acquisition systems and biological vision.Proc. IEEE, 90(1):5–17,

January 2002.[19] H. Stark. Sampling theorems in polar coordinates.J. Opt. Soc. Am., 69(11):1519–25, November 1979.[20] W. H. Press, B. P. Flannery, S. A. Teukolsky, and W. T. Vetterling. Numerical recipes in C. Cambridge Univ. Press, New York, 1988.