51
MIPR Lecture 2 Copyright Oleh Tretiak, 2004 1 QuickTime™ and a TIFF (Uncompressed) decompressor are needed to see this picture. Medical Imaging and Pattern Recognition Lecture 2 Images and Fourier Analysis Oleh Tretiak

MIPR Lecture 2 Copyright Oleh Tretiak, 2004 1 Medical Imaging and Pattern Recognition Lecture 2 Images and Fourier Analysis Oleh Tretiak

Embed Size (px)

Citation preview

MIPR Lecture 2Copyright Oleh Tretiak, 2004

1

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Medical Imaging and Pattern Recognition

Lecture 2 Images and Fourier Analysis

Oleh Tretiak

MIPR Lecture 2Copyright Oleh Tretiak, 2004

2

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Review

• Last lecture covered medical imaging modalities– X-ray– Computer Tomography– Magnetic Resonance Imaging– Ultrasound– Radioisotope Imaging– Fluorescence

MIPR Lecture 2Copyright Oleh Tretiak, 2004

3

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Examples of Medical Images

MIPR Lecture 2Copyright Oleh Tretiak, 2004

4

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

X-ray Image of Hand

MIPR Lecture 2Copyright Oleh Tretiak, 2004

5

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

X-ray Imaging: How it works.

X-ray shadow cast by an object Strength of shadow depends on composition and thickness.

MIPR Lecture 2Copyright Oleh Tretiak, 2004

6

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

CT (Computed Tomography)

CT Image of plane throughliver and stomach Projection image

from CT scans

MIPR Lecture 2Copyright Oleh Tretiak, 2004

7

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Computer Tomography:How It Works

Only one plane is illuminated. Source-subject motion provides added information.

MIPR Lecture 2Copyright Oleh Tretiak, 2004

8

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Functional Magnetic Resonance Imaging

From http://www.fmri.org/Picture naming task

Plane 3

Plane 6

MIPR Lecture 2Copyright Oleh Tretiak, 2004

9

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Detected Signal in MRI

Spinning magnetization induces a voltage in external coils, proportional to the size of magnetic moment and to the frequency.

H0

ω0

s(t)

MIPR Lecture 2Copyright Oleh Tretiak, 2004

10

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Ultrasound Imaging

Twin pregnancy during week 10

MIPR Lecture 2Copyright Oleh Tretiak, 2004

11

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Ultrasound Scanner

• A picture is built up from scanned lines.

• Echosonography is intrinsically tomographic.

• An image is acquired in milliseconds, so that real time imaging is the norm.

Transducer travel

Object

Image

MIPR Lecture 2Copyright Oleh Tretiak, 2004

12

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Single Photon Computed Tomography

Images on left show three sections through the heart.A radioactive tracer, Tc99m MIBI (2-methoxy isobutyl isonitride) is injected and goes to healthy heart tissue.

MIPR Lecture 2Copyright Oleh Tretiak, 2004

13

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Collimator

Only rays that are normal to the camera surface are detected.

MIPR Lecture 2Copyright Oleh Tretiak, 2004

14

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Fluorescence Microscopy

Image of living tissue culture cells. Three agents are used to form this image. They bond to the nucleus (blue), cytoskeleton (green) and membrane (red).

MIPR Lecture 2Copyright Oleh Tretiak, 2004

15

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Modality ComparisonModality Strength Weakness Safety

X-Ray Simple, versatile

Only Air-Tissue-Bone Ionizing

CT Sectional Images

Low Resolution Ionizing

MRI Can see many properties

Slow Safe

Ultrasound Real timeOnly abdomen, limbs Safe

Isotope FunctionalSlow, low resolution Ionizing

Fluorescence Can see many properties

Low penetration Not applicable

MIPR Lecture 2Copyright Oleh Tretiak, 2004

16

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Conclusions• Object - image - observer• Image should show the property of

concern– Fracture in bone– Blood flow to heart– Blood clot in brain

• No single best imaging method

MIPR Lecture 2Copyright Oleh Tretiak, 2004

17

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

This Lecture

• Fourier Analysis– Analysis of imaging systems– Measurement of imaging system

properties– Design of imaging system

MIPR Lecture 2Copyright Oleh Tretiak, 2004

18

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Lesson Plan

• One-dimensional signals– Frequency decomposition– Fourier series– Signals and systems– Sampling– Quantization

• Two dimensions– Spatial frequencies– (Topics same as above)

MIPR Lecture 2Copyright Oleh Tretiak, 2004

19

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

One-Dimensional Signals and Frequencies

• A signal can be a time function, s(t), but at the same time we think of it as being composed of many frequencies.

• AM radio– Signal (time function) received by an antenna– Radio waves contain many channels

• Music– Acoustic pressure waveform at a person’s ear– Combination of different notes

MIPR Lecture 2Copyright Oleh Tretiak, 2004

20

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

MIPR Lecture 2Copyright Oleh Tretiak, 2004

21

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Frequency Composition of a Signal

Ak - amplitude of component

k - frequency

k - phase

T - period, = 1/T - frequency.

s(t) = Ak cos(2πfkt + φk )k

-1 -0.5 0 0.5 1 1.5 2 2.5 3

T

MIPR Lecture 2Copyright Oleh Tretiak, 2004

22

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Fourier Analysis

• Named after Josef Fourier, 1786-1830

• Basic idea: approximate function by a sum of sine/cosine functions

• Very powerful technique with many applications

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

MIPR Lecture 2Copyright Oleh Tretiak, 2004

23

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Formula for Fourier Series

s(t) = A0 + Ak cos 2πkt /T( ) + Bk sin 2πkt /T( )( )k=1

∑ , − T /2 < t < T /2

A0 =1

Ts(t)dt

−T / 2

+T / 2

∫ , Ak =2

Ts(t)cos 2πkt /T( )dt

−T / 2

+T / 2

∫ , k ≠ 0

Bk =2

Ts(t)sin 2πkt /T( )dt

−T / 2

+T / 2

How to compute the Fourier Series coefficients:

MIPR Lecture 2Copyright Oleh Tretiak, 2004

24

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Example of Fourier Approximation

Function

Fourier series, ca. 30 are nonzero

Sum of first 10 Fourier coeff. Not to good

Sum of first 20 Fourier coeff.Pretty good

MIPR Lecture 2Copyright Oleh Tretiak, 2004

25

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Systems and Signal• Examples of signal reproducing systems:

– Sound systems• Telephone, Radio, Stereo

– Bioelectric activity• Electrocardiograms

– Bioacoustic system• Heart sounds

• System modeling– Input, system, output

hx(t) y(t)

MIPR Lecture 2Copyright Oleh Tretiak, 2004

26

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Fourier Property of Linear Time-Invariant Systems

• If a system is linear and time-invariant, then sinusoidal inputs produce sinusoidal outputs

hcos(ft) A(f)cos(ft t–f))

MIPR Lecture 2Copyright Oleh Tretiak, 2004

27

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Signal Bandwidth

• The bandwidth of a signal is the interval of frequencies that contains most of the signal’s content

Frequency

Fourier Components

MIPR Lecture 2Copyright Oleh Tretiak, 2004

28

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Example: Mystery Speech Signal

MIPR Lecture 2Copyright Oleh Tretiak, 2004

29

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

System Function and System Bandwidth

• Typical systems have a low-pass system function.

• W, the bandwidth of the system is the frequency range over which the system function is constant.

Frequency

System Function

W

Frequency

System Function

W Ideal low-pass filter

MIPR Lecture 2Copyright Oleh Tretiak, 2004

30

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Bandwidth Theorem• The signal is faithfully reproduced if the signal

bandwidth is less than the system bandwidth

FrequencyInput Signal

System Function

Output Signal

FrequencyInput Signal

System Function

Output Signal

Adequate system bandwidth Inadequate bandwidth

MIPR Lecture 2Copyright Oleh Tretiak, 2004

31

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Examples

• Conclusion: Speech is understandable if Wh ≥ 2 kHz

0.5 kHz

1.0 kHz

2.0 kHz

4.0 kHz

MIPR Lecture 2Copyright Oleh Tretiak, 2004

32

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Digital Signal Processing• Most signals are processed digitally

– Example: mp3 encoding and playback of music, sound in cellular telephone

• The signal must be sampled

s(t), 0 < t < Tmax → s(kT0), 1 < k ≤ n = Tmax /T0

T0 ~ time between samples

f0 =1/T0 ~ sampling frequency or sampling rate

0 T 2T 3T TkT

f(T )

f(kT )f(3T )f(2T )

MIPR Lecture 2Copyright Oleh Tretiak, 2004

33

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Sampling Theorem

• Frequency 2W is called the Nyquist sampling rate (Nyquist rate)

• A signal with no components at frequencies above W is called bandlimited.

• In practice, signals are approximately bandlimited.• In practice, we sample at a rate (1+a)2W. This is called

oversampling. 50% oversampling (a = 0.5) is simple and safe.

If x(t) has no components at frequency higher than W then it can be

recovered without error from samples taken at sampling rate f0 if

f0 > 2W .

MIPR Lecture 2Copyright Oleh Tretiak, 2004

34

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Cardinal Series

• x(t) is a bandlimited signal, W is the bandwidth

• xs(k) = x(kT) is the sequence of samples.

xr(t) = x(kT)sin(π (t − kT) /T)

π (t − kT) /Tk=−∞

• If f0=1/T > 2W, then xr(t) = x(t)

MIPR Lecture 2Copyright Oleh Tretiak, 2004

35

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Example of Cardinal Series

-0.5

0

0.5

1

1.5

2

-4 -3 -2 -1 0 1 2 3 4

f(-2) = 0.5, f(-1) = 1.0, f(0) = 1.5, f(1) = 1, f(2) = 0.5Sum of cardinal series is in black.

MIPR Lecture 2Copyright Oleh Tretiak, 2004

36

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Two-Dimensional Fourier Analysis

s(u,v) = Ak cos(2π [ξ ku + η kv] + φk )k

Two-dimensional frequency components of signal:

u, v are horizontal and vertical spatial coordinates, are horizontal and vertical spatial frequencies.If units of u, v are millimeters, units of are cycles per millimeter.

MIPR Lecture 2Copyright Oleh Tretiak, 2004

37

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Space and Spatial Frequency

v u

f (u,v) = cos 2π (1× u + 2 × v)[ ]

ξ = u, η = v.

0.5 1.0

MIPR Lecture 2Copyright Oleh Tretiak, 2004

38

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Example of 2D Fourier Transform

f (u,v) = exp(− | au | − | bv |)

ˆ f (ξ ,η ) =4 | ab |

(2πξ )2 + a2[ ] (2πη )2 + b2

[ ]

uv

Plots for a = 1, b = 2.

MIPR Lecture 2Copyright Oleh Tretiak, 2004

39

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Examples of 2DFT

a

b

c

a

bc

Image Fouriertransform

MIPR Lecture 2Copyright Oleh Tretiak, 2004

40

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Two-Dimensional Systems

• In analogy to one-dimensional systems, we use two-dimensional system models.

hx(u,v) y(u,v)

• If the system is linear and shift-invariant, when the input is sinewave, the output is also a sinewave.

If x(u,v) = cos(2π [ξu + ηv])

then y(u,v) =| H(ξ ,η ) | cos(2π [ξ ku + η kv] + φ(ξ ,η ))

MIPR Lecture 2Copyright Oleh Tretiak, 2004

41

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

‘Typical’ 2-D System Function

• The system function multiplies frequency component at spatial frequency .

• Typically, the response in the horizontal direction is different than the response in the vertical direction.

H(ξ ,η ) = exp −π (ξ /a)2 + (η /b)2[ ]{ }

MIPR Lecture 2Copyright Oleh Tretiak, 2004

42

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Image and System Bandwidth

• Spatial bandwidth theorem– An image is reproduced faithfully if the

system function is constant for all frequencies present in the image.

In the example on the right, the frequency content in the x direction is greater than that in the h direction. The frequency content in the diagonal directions is smaller.

MIPR Lecture 2Copyright Oleh Tretiak, 2004

43

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Examples of SystemsAdequate Bandwidth Inadequate Bandwidth

MIPR Lecture 2Copyright Oleh Tretiak, 2004

44

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Image Sampling

• Many images are produced by digital systems– Digital photography, Computer Tomography

• Images are converted to arrays of numbers by sampling

s(u,v), 0 < u ≤ Umax , 0 < v ≤ Vmax → s(kH, lV ), 1≤ k ≤ n,1≤ l ≤ m.

H,V ~ distance between samples, n = Umax /H, m = Vmax /V .

ξ 0 =1/H ~ horizontal sampling rate, η 0 =1/V ~ vertical sampling rate.

MIPR Lecture 2Copyright Oleh Tretiak, 2004

45

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

2-D Sampling Pattern

u

v

H

V

x

h

x =1/H

h =1/V

Sampling grid in space

Sampling frequencies

MIPR Lecture 2Copyright Oleh Tretiak, 2004

46

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

2-Dimensional Sampling Theorem

If x(u,v) has no frequency components for

>Wh and > Wv then it can be perfectly recovered from samples taken with horizontal sampling rate 0 > 2Wh and vertical sampling rate 0 > 2Wv. The horizontal sample spacing H and the vertical sample spacing V must satisfy

H < 1/Wh, V < 1/Wv.

MIPR Lecture 2Copyright Oleh Tretiak, 2004

47

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

2-Dimensional Sampling Theorem Diagram

x

h

h0> 2W

x0> 2W

W

W

Nonzero frequencies in the signal

MIPR Lecture 2Copyright Oleh Tretiak, 2004

48

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

2-Dimensional Cardinal Series

• x(u,v) is a bandlimited signal, Wh and Wv are the horizontal and vertical bandwidths

• xs(k, l) = x(kH, lV) is the array of samples.

xr(u,v) = xs(k, l)sin(π (u − kH) /H)sin(π (u − lV ) /V )

π (u − kH)(u − lV ) /HVk=−∞

∑l=−∞

• If 0=1/H > 2Wh, and 0=1/V > 2Wv then xr(u,v) = x(u,v)

MIPR Lecture 2Copyright Oleh Tretiak, 2004

49

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Summary - Fourier Analysis

• Signals are composed of sinewaves (Fourier components).

• The effect of a linear time (or space)-invariant system is to multiply the components by factors that depend on frequency.

• These results apply in one and in two dimensions.

• In two dimensions, frequency is a vector (it has horizontal and vertical components).

MIPR Lecture 2Copyright Oleh Tretiak, 2004

50

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Conclusions - more

• Signals and systems have bandwidth• If the system bandwidth is greater than

the signal bandwidth, the signal is accurately reproduced.

• If the system bandwidth is less than the signal bandwidth, the signal is distorted.

• In two dimensions, bandwidth is more interesting.

MIPR Lecture 2Copyright Oleh Tretiak, 2004

51

QuickTime™ and aTIFF (Uncompressed) decompressor

are needed to see this picture.

Concluding Conclusions

• If a signal is sampled at a high enough rate, it can be reproduced from the samples.

• The required sampling rate is twice the maximum frequency.

• In two dimensions, sampling rates in two directions be different.