chapter 2: mathematical preliminaries · chapter 2: mathematical preliminaries binomial...

115
Chapter 2: Mathematical Preliminaries Iterative Reconstruction Methods NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Upload: others

Post on 30-Apr-2020

19 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Chapter 2: Mathematical PreliminariesIterative Reconstruction Methods

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 2: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Contents

• Reconstruction and general linear inverse problems

• Statistical description of the data

• Image reconstruction criteria

• General structure of iterative reconstruction methods

• Maximum Likelihood Expectation Maximization (MLEM)algorithm

• Other related reconstruction methods

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 3: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The inverse problem:

?

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019 Signals and Systems

General Inverse Problem and Image Reconstruction

• Given a set of measured output signal

• Given a known system response function

• Given the statistical description of the data

what should be the input signal that gave rise to the output data?

Page 4: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Projection Data from Early X-ray CT Systems

From Computed Tomography, Kalender, 2000.

b

a

dtt

dttIIeII

b

a )()/ln( 0

)(

0

:object the through passing

after beam the of intensity The

Data measured bytranslating the detector is atypical projection data.

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 5: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019 Signals and Systems

Radon Transform

×

x’

2-D integral

The value of the projection function p(x’)at this point is the integral of the functionof f(x,y) along the straight line:x’=xcos+ysin

dxdyxyxyxfxp )sincos(),(),(

The integral of a line impulse function and a given 2-D signal gives theprojection data from a given view …

Page 6: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Central Slice Theorem

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

http://engineering.dartmouth.edu/courses/engs167/12%20Image%20reconstruction.pdf

Page 7: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The nature of the 1/r blurring:Radon transform produced equally spaced radial sampling in Fourier domain.

Simple Back-projection and the 1/r Blurring

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 8: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Simple Back Projection from Projection Data

Projection data p(, x’)

y

xr x’

IncidentX-rays

f(x,y)

Detected p(, x’)

R

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

dxdyxyxyxf

xp

)sincos(),(

),(

Page 9: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Simple Back Projection from Projection Data

Page 10: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

From Medical Physics and Biomedical Engineering, Brown, IoP Publishing

Simple Back-projection and the 1/r Blurring

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 11: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Simple Backprojection and Inverse Radon Transform

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Crude Idea 1: Take each projection and smear it back along the lines of integration it was calculated over.

Result from a back projection from a single view angle:

b (x,y) = ∫ p (x’) (x cos + y sin - x’) dx’

Adding up all the back projections from all the angles gives,

fback-projection (x,y) = ∫ b (x,y) d

𝒇^

𝑥, 𝑦 𝑑𝜙 𝐹 𝐹 𝑝 𝑥′ 𝑤 𝛿 𝑥cos𝜙 𝑦sin𝜙 𝑥′ 𝑑𝑥′

𝒇^ 𝑥, 𝑦 𝑑𝜙 𝑝 𝑥′ 𝛿 𝑥cos𝜙 𝑦sin𝜙 𝑥′ 𝑑𝑥′

Page 12: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Review of Fourier Transform and Filtering Spectral Filtering

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 13: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Review of Fourier Transform and Filtering Spectral Filtering

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 14: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Filtered Back-projection

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 15: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Filtered Back-Projection

Sampled version

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 16: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Simple Backprojection, Inverse Radon Transform and Filtered Backprojection (FBP)

Result from a back projection from a single view angle:

b (x,y) = ∫ p (x’) (x cos + y sin - x’) dx’

Adding up all the back projections from all the angles gives,

fback-projection (x,y) = ∫ b (x,y) d

𝒇^

𝑥, 𝑦 𝑑𝜙 𝐹 𝐹 𝑝 𝑥′ 𝑤 𝛿 𝑥cos𝜙 𝑦sin𝜙 𝑥′ 𝑑𝑥′

𝒇^ 𝑥, 𝑦 𝑑𝜙 𝑝 𝑥′ 𝛿 𝑥cos𝜙 𝑦sin𝜙 𝑥′ 𝑑𝑥′

𝒇^

𝑥, 𝑦 𝑑𝜙 𝐹 𝐹 𝑝 𝑥′ 𝐻 𝑤 𝛿 𝑥cos𝜙 𝑦sin𝜙 𝑥′ 𝑑𝑥′

Page 17: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

As a matter of fact, FBP provides almost optimum image quality with goodquality projection data, but performs poorly when the projection datacontains significant noise.

Why?

Are we missing something in the design of the FBP or BPF methods?

Review of 2-D Analytical Reconstruction MethodsFiltered Back Projection

Page 18: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Problems of FBP:

Review of 2-D Analytical Reconstruction MethodsFiltered Back Projection

Based on somewhat idealistic geometry …

Lack of an accurate statistical description of the projection data …

Limitation of incorporating other physical effects associated with certainimaging modalities …

Imaging systems in real world have all kinds of imperfection …

Page 19: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

What is the Central Problem to be Solved with Statistical Imaging Reconstruction Methods?

Page 20: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

50 000 counts 100 000 counts 200 000 counts

500 000 counts 1 million counts 2 million counts

4.8mm 6.4mm

11.1mm

12.7 mm

The Importance of Counts

7.9 mm

9.5mm

Page 21: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Noise In PET Images Noise in PET images is dominated by the counting statistics of the

coincidence events detected. Noise can be reduced at the cost of image resolution by using an

apodizing window on ramp filter in image reconstruction (FBP algorithm).

105 106 107 counts

Unapodized ramp filter

Hanning window, 4mm

Hanning window, 8mm

Page 22: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Scatteredcoincidences component

Attenuation

Random coincidencescomponent

Detector efficiencyeffects True

coincidencescomponent

An Example of PET Image Reconstruction Data corrections are necessary

the measured projections are not the same as the projections assumed during image reconstruction

Object(uniformcylinder)

projectionmeasured

projectionassumed

integral of the activity along the line or tube of response

Page 23: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

An Example of PET Image Reconstruction

Figure 3: Comparison of EM reconstruction with FBP for different total counts. Note particular the streaking and noise appearance at low counts using FBP. Figures indicate the noise (standard deviation / mean) for a region in the liver.

http://web.uchile.cl/vignette/borrar3/alasbimn/CDA/sec_a/0,1205,SCID%253D470%2526PRT%253D455%2526LNID%253D10,00.html

Page 24: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Comparison of emission images when real clinical data were used: (a) FBP method; (b) ML‐EM method; (c) MAP method; (d) TV‐MAP method; (e) MC‐MAP method; and (f) GC‐MAP method.

Page 25: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Fig. 5. Enlargement part of the reconstructed images. Projections with 1× 106 counts Poisson noise. The iterative number is set to 40 for all algorithms: (a) synthetic phantom; (b) FBP; (c) ML‐EM; (d) MAP; (e) TV‐MAP; (f) MC‐MAP; and (g) GC‐MAP.

Page 26: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Analytical Methods

Advantages Fast Simple Predictable, linear behaviour

DisadvantagesNot very flexible Image formation process is not modelled image properties

are sub-optimal (noise, resolution)

Page 27: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Statistical Methods Advantages

Can accurately model the image formation process (use with non-standard geometries, e.g. not all angles measured, gaps)

Allow use of constraints and a priori information (non-negativity, boundaries)

Corrections can be included in the reconstruction process (attenuation, scatter, etc)

Disadvantages Slow Less predictive behaviour (noise? convergence?)

Page 28: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The solution:

Review of 2-D Analytical Reconstruction MethodsFiltered Back Projection

Put what ever we know about the system into the model.

Try to model the projection data with better accuracy.

Using iterative optimization methods to get around the numericalstability problem in large scale inverse (reconstruction) problem.

Page 29: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

A basic problem for image reconstruction in emission tomography

Image Reconstruction and General Linear Inverse Problem

Page 30: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

An Emission Tomography System

Image Reconstruction and General Linear Inverse Problem

Page 31: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

How Do We Describe the Problem?

Page 32: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Linear imaging systems – An alternative representation

Image Reconstruction and General Linear Inverse Problem

_

Page 33: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

How Do We Solve the Problem?

The Statistical Approach

Page 34: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The Basic Idea of Statistical Reconstruction

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

The likelihood function:

In very non-technical terms, the probability of the underlyingsource function that results in the measurement.

The basic idea of statistical reconstruction is simple:

We chose the solution (estimated source function) thatmaximizes the likelihood function, or

The solution that is the most likely to produce the measureddata.

Page 35: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The Basic Idea of Statistical Reconstruction

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

An simple example: estimate the source strength from the measured count rate

The answer? -- pick the source intensity that is most likely to give the observedcount rate.

What do we need to know? -- (a) The probability of a photon reaching thedetector surface (assuming 100% detection) and (b) how reliable is themeasurement (the statistical fluctuation of the counts measured)

Page 36: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Two Key Challenges

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Evaluating the likelihood. What is the likelihood of a givensource function that produces the measured data?

Finding the maximum likelihood solution. There are oftenan infinite number of possible source functions to chose from,each is associated with a likelihood (or a probability). How dowe search through the source space to decide which one givesthe maximum likelihood?

Page 37: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Source of Noise

Source of noise:

Measurement error, instrument malfunction …

Random fluctuation in the number of counts detected by detectors

Other additive noise

In emission tomography systems, detector readout noise is generally muchsmaller than the statistical fluctuation associated with the counting process.

Noise introduced by other physical effects. The general frame work ofiterative (or some-times called statistical) reconstruction methods allows oneto incorporate many other effects …

Page 38: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Chapter 2: Mathematical Preliminaries

Bernoulli ProcessConsider the radioactive disintegration process in a sample, it follows the followingfour conditions:

It consists of N trails.

Each trail has a binary outcome: success or failure (decay or not).

The probability of success (decay) is a constant from trail to trail – all atoms haveequal probability to decay.

The trails are independent.

In statistics, these four conditions characterize a Bernoulli process.

Page 39: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Binomial Distribution

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

The binomial distribution gives the discrete probability distribution ofobtaining exactly k successes out of N Bernoulli trials (where the result ofeach Bernoulli trial is true with probability p and false with probability 1-p ).The binomial distribution is therefore given by

)!(!!

)1(),(

kNkN

kNwhere

ppkN

pNkp kNk

Page 40: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Binomial Distribution and Imaging Applications

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Suppose we have a point source generated N gamma rays and we have apixilated detector for detecting these photons

kNk ppkN

pNkp

)1(),(

Each gamma ray photon has a fixed probability p of reaching a givendetector element. p is defined by the relative distance between the sourceand the pixel and the collimation configuration used.

So the probability of detecting k gamma rays on the pixel is given as

Furthermore, the number of counts detected on different pixels areindependent …

Page 41: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Chapter 6: Counting Statistics

Binomial Distribution

What are the mean and standard deviation of a Binomial distribution?

Page 42: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Chapter 2: Mathematical Preliminaries

Binomial Distribution

NpqPn

and

NpqPn

N

nn

N

nn

0

2

0

22

For a binomial distribution, the mean or the expectation of the number ofdisintegration in time t is given by

and the fluctuation on the number of disintegrations is given by the variance or thestandard deviation of the

NpqpnN

nPnN

n

nNnN

nn

00

Page 43: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Chapter 2: Mathematical Preliminaries

Binomial Distribution

t

t

epq

epp

11 is detectednot is particleresultant or the

tedisintegranot doeseither atoman ofy probabilit theand )1(

iscount detected ain results and tesdisintegra atoman ofy probabilit The

*

*

Considering a realistic case, in which we use an detector to measure the number ofcounts and use the measured count rate to infer to the activity of the source.

Given (a) each disintegration yield one single particle and (b) the detection efficiency ofthe detector is , then

The prob. of detecting a count within a time t is

Therefore, we can use the binomial distribution to describe the counting statistics as

Page 44: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Chapter 2: Mathematical Preliminaries

Binomial Distribution

The prob. of detecting n count within a time t is

The mean number of detected counts is

detector theof efficiencydetection : t timea within atesdisintergr atoman of prob. :

1*

p

ppnN

P nNnn

**

0

*22* qNpPnN

nn

NpqpnN

nPnN

n

nNnN

nn

0

**

0

*

and the variance on number of detected counts is

Page 45: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Chapter 2: Mathematical Preliminaries

Bernoulli ProcessConsider the radioactive disintegration process in a sample, it follows the followingfour conditions:

It consists of N trails.

Each trail has a binary outcome: success or failure (decay or not).

The probability of success (decay) is a constant from trail to trail – all atoms haveequal probability to decay.

The trails are independent.

In statistics, these four conditions characterize a Bernoulli process.

Page 46: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Poisson Distribution

The counting statistics related to nuclear decay processes is often more conveniently described by the Poisson distribution, is related to situations that involves a collection of multiple trails that satisfy the following conditions:

1. The number of trails, N, is very large, e.g. N>>1.2. Each trail is independent.3. The probability that each single trail is successful is a constant and approaching

zero, p<<1. So the number of successful trails is fluctuating around a finite number.

Page 47: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Poisson DistributionThe probability of having n successful trails can be approximated with the Poisson distribution.

en

nPn

!|

NpnStd )(

pNnMean )(

and the mean and the variance of number of successful trail are given by

Page 48: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 441, Principles of Radiation Protection, Spring 2016

Chapter 6: Counting Statistics

Poisson Distribution

Remember the conditions for Binomial distribution to be approximated by PoissonDistribution:

1. The number of trials, N, is very large, e.g. N>>1.

2. Each trial is independent.

3. The probability that each single trial is successful is a constant and approachingzero, p<<1. So the number of successful trials is fluctuating around a finitenumber.

Page 49: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Binomial and Poisson Random Variable

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

When N and p0, k follows the Poisson distribution, whose probabilityfunction is

Np

ek

kpppkN

pNkp

N

kkNk

lim as defined ariablePoission v theof valueexpected theis where

!)( )1(),(

Other examples of Poisson variables:The number of phone calls received by a telephone operator in a 10-minuteperiod.

Binomial

distribution

Poisson

distribution

The number of flaws in a bolt of fabric.

The number of typos per page.

Page 50: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The Basic Idea of Statistical Reconstruction

Page 51: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

An Emission Tomography System

Image Reconstruction and General Linear Inverse Problem

Page 52: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

An Emission Tomography System

Image Reconstruction and General Linear Inverse Problem

Page 53: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Image Reconstruction CriteriaMaximum Likelihood (ML)

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Suppose that for any given source function f, the probability of observing adata set g is given by a known probability law p(g|f).

p(g|f) is called the Likelihood function, which is sometimes denoted as L(f)or L(f,g).

A typical image reconstruction problem is that we have a set of measured datag, how to determine the original source function f?

The ML criterion:

Chose the source function f that maximize the likelihood function p(g|f).

Page 54: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Image Reconstruction CriteriaMaximum Likelihood (ML)

ff ˆE

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Properties of images reconstructed with the ML criterion:

• Asymptotically unbiased. If there are sufficiently large number ofcounts in the data g, then

• Asymptotically efficient. If there are sufficiently large number of counts inthe data g, the ML solution has the lowest variance amongst all possiblesolutions.

ggfgff dp )|()(ˆ ˆE

Page 55: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The Maximum Likelihood Reconstruction

)|()( fggf, pL

)(log)(function likelihood-log theis )( where

)( argmax)(logmaxargˆlyequivalentor

)( argmaxˆ

gf,gf,

gf,

gf,gf,f

gf,f

ffML

fML

Lll

lL

L

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Recall that the likelihood function, L(f,g), of a possible source function f is

So that the maximum likelihood solution (the image that maximizing thelikelihood function) can be found as

Page 56: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Poisson Statistics of the Projection Data

m# pixeldetector on counts ofnumber for the valueexpected theis where!

)()()|( 11

m

M

m

g

m

gm

M

mm

g

egggppp m

m

gfg

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Measured no. ofcounts on detectorpixel m.

The probability of a given projection data g=(g1, g2, g3,…, gM) is

Page 57: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The Maximum Likelihood Reconstruction

M

mmmmm

M

m

g

m

gm

M

mm gggge

gggp

pLl

m

m

111

!loglog!

log)(

)|(log)(log )( fggf,gf,

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

For data that follows Poisson distribution, the likelihood function, L(f,g), ofa possible source function f is

m. pixeldetector on counts ofnumber measured theis

m. pixeldetector on counts ofnumber expected theis ,

!)()|()(

1

11

m

N

nnmnm

M

m

g

m

gm

M

mm

g

pfg

egggppL m

m

fggf,

The log-likelihood function is

Page 58: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Linear imaging systems – An alternative representation

Image Reconstruction and General Linear Inverse Problem

_

N

nnmnm pfg

1

Page 59: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

An Typical Imaging System Described in Matrix Form

The source object.

The number of photons

being emitted from each

source voxel

Everything we know about the

imaging system – The system

response function

Expected number of

photons detected on each

detector element

NMNMMM

N

N

N

M f

fff

pppp

pppppppppppp

g

ggg

M

L

MOMMM

L

L

L

M3

2

1

321

3333231

2232221

1131211

3

2

1

Page 60: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Poisson Statistics of the Projection Data

m# pixeldetector on counts ofnumber for the valueexpected theis where!

)()()|( 11

m

M

m

g

m

gm

M

mm

g

egggppp m

m

gfg

NMNMMM

N

N

N

M f

fff

pppp

pppppppppppp

g

ggg

M

L

MOMMM

L

L

L

M3

2

1

321

3333231

2232221

1131211

3

2

1

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

N

nnmnm pfg

1Remember that

Measured no. ofcounts on detectorpixel m.

The probability of a given projection data g=(g1, g2, g3,…, gM) is

In the context of emissiontomography, pnm is theprobability of a gamma raygenerated at a source pixel n isdetected by detector element m.

Page 61: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The Maximum Likelihood Reconstruction

M

mmmmm

M

m

g

m

gm

M

mm gggge

gggp

pLl

m

m

111

!loglog!

log)(

)|(log)(log )( fggf,gf,

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

For data that follows Poisson distribution, the likelihood function, L(f,g), ofa possible source function f is

m. pixeldetector on counts ofnumber measured theis

m. pixeldetector on counts ofnumber expected theis ,

!)()|()(

1

11

m

N

nnmnm

M

m

g

m

gm

M

mm

g

pfg

egggppL m

m

fggf,

The log-likelihood function is

N

nnmnm pfg

1

Page 62: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The Maximum Likelihood Reconstruction

M

mmmm

m

M

mmmmm

gggl

g

ggggl

1

1

logmaxarg)( maxargˆ

get we, offunction not is since

!loglogmaxarg )(maxargˆ

ffML

ffML

gf,f

f

gf,f

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

So the ML reconstruction for Poisson distributed data is

Page 63: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The Maximum Likelihood Expectation Maximization (MLEM) Algorithm

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

The source (image) function f that has the maximum likelihood of giving riseto the observed data g can be found by the following iterative updatingscheme

m pixeldetector in counts ofnumber observed the:melement detector by the detected and

pixel sourcein generatedray gamma a ofy probabilit the: pixel source theof estimate updated the:

pixelin function source theof estimatecurrent the:pixelsobject source ofindex theis ,...,2,1

system imaging in the elementsdetector ofindex theis ,...,2,1

,

)(

)(

1

1

)(

1

)()(

m

nm

newn

oldn

M

mnmN

n

oldnmn

mM

mnm

oldnnew

n

g

npnf

nfNnMm

where

1,2,...,Nnpfp

g

p

ff

Page 64: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The Maximum Likelihood Expectation Maximization (MLEM) Algorithm

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Each iteration updates all elements in the source function f sequentially.

1,2,...,Nnpfp

g

p

ffM

mnmN

n

oldnmn

mM

mnm

oldnnew

n

,1

1

)(

1

)()(

Each iteration is guaranteed to provide a new image function that has anincreased likelihood compared to the previous image function (unless themaximum likelihood solution has been achieved).

Page 65: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Structure of MLEM Algorithm

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

M

mnmN

n

oldnmn

mM

mnm

oldnnew

n pfp

g

p

ff1

1

)(

1

)()(

Page 66: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Properties of MLEM Algorithm

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Advantages

• Relatively simple but highly useful.

• Provides room for incorporating a wide range of physical effects anddetector system characteristics and therefore provide an improvedimage quality for low statistics data.

• Consistent and predictable behavior.

• Automatically incorporates non-negativity constraint. So the imagevalues are always non-negative.

• Provides theoretically optimum solution (Please be careful whensaying this!!).

Page 67: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Properties of MLEM Algorithm

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Shortcomings

• Relatively slow convergence. For typical 3-D reconstruction, it takesseveral tens of iterations to converge. In principle, each iteration takessimilar amount of computation to that for a complete FBP reconstruction!

• Tends to yield noisy reconstructions when projection data has lowstatistics.

What exactly is the problem?

The algorithm tends to fit to the noise in the (observed) projection data!

Page 68: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Properties of MLEM Algorithm

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

With noise free data

With noisy data

With noisy data

MLEM and filtering

Page 69: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Properties of MLEM Algorithm

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

How to improve?

Adding extra (or sometime called a priori) information in the reconstructionprocess.

This can be done using two numerically equivalent approaches

• This can be done by trying to discourage possible image solutions that has large fluctuations (noisy images). – Penalized Maximum Likelihood (PML) methods.

• Using the Bayes’ law to incorporate the a priori information – Maximum a posteriori (MAP) methods.

Page 70: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Further Improvements – Penalized ML Algorithms

)()( argmaxˆ fgf,ff

Ul

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

The basic idea:

Instead of finding the original image by maximizing the likelihood function:

We can use a different selection criterion

)( argmax)|(argmaxˆ gf,fgfff

lp

Probability of a measurement ggiven the underlying image f

The so-called log-likelihood

function

The so-called penalty function that

has increased value when an

undesired imaging feature

presents in the solution.

is a scaling constant that controls

“how strong the penalty is for the

presence of a given feature”

So by minimizing, we are selecting an

image by dis-encouraging the undesired

features to be presented in the image.

Penalized Maximum Likelihood (PML) reconstruction …

Page 71: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Further Improvements –Maximum A Posteriori (MAP) Algorithms

)()()()(

gff|g

g|fp

ppp

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

We have to change our mind a little bit … by considering that the image to beestimated is itself an random variable that follows some statistical law p(f).

The Bayis’s law:

Suppose we know something about the

underlying image and we can describe

this knowledge with a statistical law

This leads to the maximum a posteriori (MAP) approach…

And, we know that if the underlying image

is f, the probability of observing a given

measurement g is

The a posteriori probability.

So the underlying image can be best

estimated by maximizing this

probability

Page 72: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Further Improvements –Maximum A Posteriori (MAP) Algorithms

)()( if ff Up

)(log)( log argmax )(

)()(log argmax)(logargmaxˆ

ff|g

gff|g

g|ff

f

ffMAP

ppp

ppp

)(log)( log argmaxˆ)()( log argmaxˆ ff|gfff|gff

MAPf

PML ppUp

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

The a priori probability of the data. This is

where you can fold in your prior knowledge

about the underlying image … for example, the

image “should” be relatively smooth …

The maximum a posteriori (MAP) approach…

The likelihood function

This is numerically equivalent to PML approach is we recognize that

Page 73: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

The simplest form of imaging problem:

Isotropic point source, single detector,

How to estimate the source intensity from the measured number of counts/sec?

The answer? -- pick the source intensity that is most likely to give the observedcount rate.

What do we need to know? -- (a) The probability of a photon is detected by theand (b) how reliable is the measurement (the statistical fluctuation of the countingerror)

Summarizing the Key Concepts (1)The Basic Image Reconstruction Problem

Page 74: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Summarizing the Key Concepts (2)

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Many common imaging system can be represented in simple linear systemform.

The model H tells that for a signal (agamma ray) generated in any givenlocation in the object, what is theprobability of this signal being detectedby each detector element

Page 75: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Summarizing the Key Concepts (3)The System Response Function Matrix (H)

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

as defined average), weighted(theoperator n expectatio theis E where

3

2

1

321

3333231

2232221

1131211

3

2

1

3

2

1

NMNMMM

N

N

N

MM f

fff

pppp

pppppppppppp

g

ggg

E

g

ggg

M

L

MOMMM

L

L

L

MM

The system response function matrix governs the transform between the underlying image parameters and the measured projection data.

Page 76: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Summarizing the Key Concepts (4)Commonly Used Statistical Models for Projection Data

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 77: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Binomial Distribution and Imaging Applications

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Suppose we have a point source generated N gamma rays and we have apixilated detector for detecting these photons

kNk ppkN

pNkp

)1(),(

Each gamma ray photon has a fixed probability p of reaching a givendetector element. p is defined by the relative distance between the sourceand the pixel and the collimation configuration used.

So the probability of detecting k gamma rays on the pixel is given as

Furthermore, the number of counts detected on different pixels areindependent …

Page 78: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Binomial and Poisson Random Variable

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

When N and p0, k follows the Poisson distribution, whose probabilityfunction is

Np

ek

kpppkN

pNkp

N

kkNk

lim as defined ariablePoission v theof valueexpected theis where

!)( )1(),(

Binomial

distribution

Poisson

distribution

Page 79: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Binomial and Poisson Random Variable

m# pixeldetector on counts ofnumber for the valueexpected theis where

!)()(

11

m

M

m

g

m

gm

M

mm

g

egggpp m

m

g

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

For an imaging system that contains M detector elements, observing aprojection data that has g=(g1, g2, g3, … gM) counts in each detector elementis

Poisson distribution is normally a good description of the counting statisticsfor an imaging system.

Page 80: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Poisson Statistics of the Projection Data

m# pixeldetector on counts ofnumber for the valueexpected theis where!

)()( 11

m

M

m

g

m

gm

M

mm

g

egggpp m

m

g

NMNMMM

N

N

N

M f

fff

pppp

pppppppppppp

g

ggg

M

L

MOMMM

L

L

L

M3

2

1

321

3333231

2232221

1131211

3

2

1

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

N

nnmnm pfg

1Remember that

Measured no. ofcounts on detectorpixel m.

The probability of a given projection data g=(g1, g2, g3,…, gM) is

In the context of emissiontomography, pnm is theprobability of a gamma raygenerated at a source pixel n isdetected by detector element m.

Page 81: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Gaussian Statistics of the Projection Data

ek

kpk

!)(

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

For a random variable follows Poisson distribution, whose probabilityfunction is defined as

When is greater than 20, the distribution of k can be approximated as aGaussian distribution, so that

on.distributi theofdeviation standard the: variable theof valueexpected the:

where21)(

2

2

)(21

x

exp

Page 82: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Gaussian Statistics of the Projection Data

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

The probability of observing a particular set of projection data is

constant. scaling a is where

)()( 1

22

21

1

21

1

A

AeeAgppM

m m

mm

m

mmgggM

m

gggM

mm

g

Gaussian statistics is a good approximation for the random counting noise onprojection data when in high count rate imaging situation. For example in X-ray CT case…

This equation holds only when the observed

counts on deferent detector elements are

independent to each other …

Page 83: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Summarizing the Key Concepts (5)Criteria for Estimate the Underlying Image

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 84: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The Maximum Likelihood Reconstruction

)|()( fggf, pL

)(log)(function likelihood-log theis )( where

)( argmax)(logmaxargˆlyequivalentor

)( argmaxˆ

gf,gf,

gf,

gf,gf,f

gf,f

ffML

fML

Lll

lL

L

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Recall that the likelihood function, L(f,g), of a possible source function f is

So that the maximum likelihood solution (the image that maximizing thelikelihood function) can be found as

Page 85: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

The Maximum Likelihood Reconstruction

M

mmmm

m

M

mmmmm

gggl

g

ggggl

1

1

logmaxarg)( maxargˆ

get we, offunction not is since

!loglogmaxarg )(maxargˆ

ffML

ffML

gf,f

f

gf,f

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

So the ML reconstruction for Poisson distributed data is

Page 86: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Further Improvements – Penalized ML Algorithms

)()( argmaxˆ fgf,ff

Ul

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

The basic idea:

Instead of finding the original image by maximizing the likelihood function:

We can use a different selection criterion

)( argmax)|(argmaxˆ gf,fgfff

lp

Probability of a measurement ggiven the underlying image f

The so-called log-likelihood

function

The so-called penalty function that

has increased value when an

undesired imaging feature

presents in the solution.

is a scaling constant that controls

“how strong the penalty is for the

presence of a given feature”

So by minimizing, we are selecting an

image by dis-encouraging the undesired

features to be presented in the image.

Penalized Maximum Likelihood (PML) reconstruction …

Page 87: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Further Improvements –Maximum A Posteriori (MAP) Algorithms

)()()()(

gff|g

g|fp

ppp

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

We have to change our mind a little bit … by considering that the image to beestimated is itself an random variable that follows some statistical law p(f).

The Bayis’s law:

Suppose we know something about the

underlying image and we can describe

this knowledge with a statistical law

This leads to the maximum a posteriori (MAP) approach…

And, we know that if the underlying image

is f, the probability of observing a given

measurement g is

The a posteriori probability.

So the underlying image can be best

estimated by maximizing this

probability

Page 88: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Further Improvements –Maximum A Posteriori (MAP) Algorithms

)()( if ff Up

)(log)( log argmax )(

)()(log argmax)(logargmaxˆ

ff|g

gff|g

g|ff

f

ffMAP

ppp

ppp

)(log)( log argmaxˆ)()( log argmaxˆ ff|gfff|gff

MAPf

PML ppUp

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

The a priori probability of the data. This is

where you can fold in your prior knowledge

about the underlying image … for example, the

image “should” be relatively smooth …

The maximum a posteriori (MAP) approach…

The likelihood function

This is numerically equivalent to PML approach is we recognize that

Page 89: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

1,2,...,Nnpfp

g

p

ffM

mnmN

n

oldnmn

mM

mnm

oldnnew

n

,1

1

)(

1

)()(

The Maximum Likelihood Expectation Maximization (MLEM) Algorithm

Summarizing the Key Concepts (6)

Methods to Estimate the Underlying Image

Page 90: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

A Final Remark for Reconstruction Methods

So far, we have discussed several reconstruction methods such as FBP,MLEM, PML and MAP.

It should be remember that it is not the reconstruction method that makesthe differences between the resulting images.The keys to a good reconstruction is How well you know your imagingsystem and How faithful is your model to the system.

Page 91: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

A Brief Introduction on Matlab Functions Related to Image Processing

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 92: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

OverviewGetting Help2D Matrix / Image

• Coordinate system• Display• Storing images

2D FunctionsDiscrete Fourier Transform

• 1D DFT• fftshift• 2D DFT: zero-filling and shifting the image

Page 93: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Getting Help in Matlab

Online Help

• Help Browser (? In toolbar or >>helpbrowser)

• Help Functions ( >>help functionname )• Matlab website: www.mathworks.com

• Demos

Documentation

• Online as pdf files

Page 94: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

2D Matrix2D matrix has M rows and N columns

Example• >>m=zeros(400,200);• >>m(1:50,1:100) = 1;

Note:• Index 1 to M, not 0 to M-1• Origin of coordinate system is in upper

left corner• Row index increases from top to bottom• Coordinate system is rotated in respect

to ‘standard’ x-y coordinate system

123

M

1 2 3 N…

…r

c

Page 95: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Image TypesMedical images are mostly represented asgrayscale images

• Human visual system resolveshighest spatial resolution forgrayscale contrast

• Color is sometimes used tosuperimpose information onanatomical data

Page 96: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Save Image MatrixMATLAB binary format

• >>save example -> writes out example.mat

Standard image format (bmp,tiff,jpeg,png,hdf,pcx,xwd)

• >>imwrite(m,’example.tif ’,’tif ’)-> writes out example.tif

• Warning: imwrite expects data in range [0…1]• If data range outside this [0…1], use

mat2gray• >>m_2 = mat2gray(m);• >>imwrite(m_2,’example.tif ’,’tif ’)

Page 97: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Save Figure (incl. labels etc)

Save in Matlab Figure Format: • >File>Save As> in Figure Window

-> writes out example.figStandard image formats

• >File>Export in Figure Window• E.g. jpg, tif, png, eps, …

• Alternatively, use print, e.g.>>print –deps2 example.eps

Page 98: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Loading 2D Data and Images

Load matrix from MATLAB binary format>>load example (loads example.mat)

Load matrix from standard image format>>m_in = imread(’example.tif ’,’tif ’);

To check on an image: >>imfinfo(’example.tif ’,’tif ’)

Load figure from Matlab Figure Format (*.fig): • >File>Open> ‘example.fig’ in Figure Window

->Check loaded matrices• >>whos

Page 99: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Some Common Image Formats• TIF (TIFF)

• Very common, compatible, all purpose image format• Allows for lossless compression

• JPEG• Allows for lossy compression (small file size)• Very common for internet

• PNG (portable network graphics)• Good for saving MATLAB images for importing into Microsoft documents such as

Word• Dicom

• THE medical imaging format• Lots of header information (patient name & ID, imaging parameters, exam date,

…) can be stored• Allows for lossy and lossless compression• Matlab function ‘dicomread’, ‘dicomwrite’

• EPS (Encapsulated Postscript)• Graphics format rather than an image format• Great for best quality print results• Large file size

Page 100: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

2D Functions• Create a matrix that evaluates 2D Gaussian: exp(-

p/2(x2+y2)/s2)• >>ind = [-32:1:31] / 32;• >>[x,y] = meshgrid(ind,-1*ind);• >>z = exp(-pi/2*(x.^2+y.^2)/(.25.^2));• >>imshow(z)• >>colorbar

x’

y’

x

y

64x64 matrix

-1

0

31/32-1

Page 101: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Discrete Fourier Transform in 1-D Revisited

0uu- esfrenquenci negative the toingcorrespond are 1-N..., N/2,nuu0 esfrenquenci positive the toingcorrespond are 1-N/21,...,n

zero) is frenquency (spatialcomponent DC the toingcorrespond 0n

1-1,2,...N,0n ,

c

c

1

0

2

N

k

Nnkj

kn efF

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

The discrete Fourier transform (DFT) is defined as

And the inverse DFT is defined as

1-1,2,...N,0k ,1 1

0

2

N

n

Nnkj

nk eFN

f

Page 102: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

FT Conventions - 1D1D Fourier Transform

• >>l = z(33,:);• >>L = fft(l);

sample #

10 20 30 40 50 600

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

l

10 20 30 40 50 600

2

4

6

8

10

12

10 20 30 40 50 60-4

-2

0

2

4

sample #

phas

e (L

)ab

s (L

)

1 33 64

u0 fNfN/2

1 33 64

x [Matlab]0 xmax

Page 103: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

1D FT - fftshift

Use fftshift>>L1 = fft(fftshift(l));

sample #

l

sample #

phas

e (L

1)ab

s (L

1)

1 33 64

0 fNfN/2

1 33 64

0 xmax

10 20 30 40 50 600

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

10 20 30 40 50 600

2

4

6

8

10

12

10 20 30 40 50 60-4

-2

0

2

4

x [Matlab]

Page 104: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

1D FT - 2xfftshift

Center Fourier Domain: >>L2 = fftshift(fft(fftshift(l)));

phas

e (L

2)ab

s (L

2)10 20 30 40 50 60

0

2

4

6

8

10

12

10 20 30 40 50 60-4

-2

0

2

4

sample #1 33 64

0-fN/2u

(N-1)/N*fN/2

Page 105: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

fftshift in 2D

Use fftshift for 2D functions >>smiley2 = fftshift(smiley);

Page 106: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

2D Discrete Fourier Transform

20 40 60

20

40

60

20 40 60

20

40

600

50

100

-2

-1

0

1

2x 10-14

Real (Z) Imag (Z)

• >>Z=fftshift(fft2(fftshift(z)));• >>whos• >>figure• >>imshow(real(Z))• >>imshow(real(Z),[])• >>colorbar

• >>figure• >>imshow(imag(Z),[])• >>colorbar

Page 107: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

2D DFT - Zero FillingInterpolating Fourier space by zerofilling in image space

• >>z_zf = zeros(256);• >>z_zf(97:160,97:160) = z;• >>Z_ZF = fftshift(fft2(fftshift(z_zf)));• >>figure• >>imshow(abs(Z_ZF),[])• >>colorbar

• >>figure• >>imshow(angle(Z_ZF),[])• >>colorbar

50 100 150 200 250

50

100

150

200

250-3

-2

-1

0

1

2

3

50 100 150 200 250

50

100

150

200

2500

20

40

60

80

100

120

Magnitude (Z_ZF) Phase (Z_ZF)

Page 108: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

2D DFT - Voxel ShiftsShift image: 5 voxels up and 2 voxels left

• >>z_s = zeros(256);• >>z_s(92:155,95:158) = z;• >>Z_S = fftshift(fft2(fftshift(z_s)));• >>figure• >>imshow(abs(Z_S),[])• >>colorbar

• >>figure• >>imshow(angle(Z_S),[])• >>colorbar

-3

-2

-1

0

1

2

3

50 100 150 200 250

50

100

150

200

250

0

20

40

60

80

100

120

Magnitude (Z_S) Phase (Z_S)

50 100 150 200 250

50

100

150

200

250

Page 109: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Review of functions …

Input / Output• >>imread• >>imwrite• >>imfinfo

Image Display• >>imshow

Others• >>axis• >>colorbar• >>colormap• >>meshgrid• >>fft, fft2• >>fftshift

Page 110: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

More useful functions …Image Display

• >>title• >>xlabel, ylabel• >>subimage• >>zoom• >>mesh

Others• >>imresize• >>imrotate• >>imhist• >>conv2• >>radon• >>roipoly

Demos in Image Processing Toolbox• >>help imdemos

Page 111: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Matlab Examples

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 112: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Matlab Examples

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 113: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Matlab Examples

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 114: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Matlab Examples

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019

Page 115: Chapter 2: Mathematical Preliminaries · Chapter 2: Mathematical Preliminaries Binomial Distribution t t q p e p e 1 or the resultant particle is not detected is and the probability

Matlab Examples

NPRE 435, Principles of Imaging with Ionizing Radiation, Fall 2019