+ All Categories
Home > Documents > Radon Transform in Tomographic Image Reconstruction

Radon Transform in Tomographic Image Reconstruction

Date post: 18-Jan-2017
Category:
Upload: lamdan
View: 229 times
Download: 2 times
Share this document with a friend
115
Radon Transform in Tomographic Image Reconstruction Ditte Iben Marcussen Camilla H. Trinderup Kongens Lyngby 2009 IMM-B.Sc.-2009-1
Transcript
Page 1: Radon Transform in Tomographic Image Reconstruction

Radon Transform in TomographicImage Reconstruction

Ditte Iben MarcussenCamilla H. Trinderup

Kongens Lyngby 2009IMM-B.Sc.-2009-1

Page 2: Radon Transform in Tomographic Image Reconstruction

Technical University of DenmarkInformatics and Mathematical ModellingBuilding 321, DK-2800 Kongens Lyngby, DenmarkPhone +45 45253351, Fax +45 [email protected]

IMM-B.Sc.: ISSN 0909-3192

Page 3: Radon Transform in Tomographic Image Reconstruction

Abstract

There are different methods for approaching the inverse problem of reconstruct-ing a tomographic image from its sinogram. The filtered backprojection, FBP,is one of them and is a widely used method in both engineering and especiallymedical science. But there are also other ways to reconstruct these images.

Two other methods for reconstructing are the SVE/SVD and the ART methods.The first one is based on the singular value expansion of an operator, andthe second one is based on constructing a linear system of equations, with asparse matrix and then solving this with the iterative CGLS method. Both theSVE/SVD method and the ART method gives good results, and it is easy tocompute these solutions when the preliminary work has been done. For thefirst method it is easy to determine a truncation parameter and decrease theeffect the noise has on the image. For the second method the quality of thesolution can be increased by increasing the number of iterations in the CGLSsolver. Comparing simulated reconstructions from all three methods gives aclear picture of which to prefer.

Page 4: Radon Transform in Tomographic Image Reconstruction

ii

Page 5: Radon Transform in Tomographic Image Reconstruction

Resume

Der findes flere forskellige metoder til løse det inverse problem, der bestar af atreconstruere et tomografisk billede fra dets sinogram. Filtered backprojectioner den af de metoder, der er mest udbredt, især inden for billedbehandlingen iden medicinske verden. Men der findes ogsa andre metoder til at rekonstruere.

To andre er SVE/SVD og ART metoderne. Den første er baseret pa en singulærværdi ekspansion af en operator, og den anden er baseret pa at konstruere etlineært ligningssystem med en ’sparse’ matrix, som sa kan løses med den iterativeCGLS metode. Bade SVE/SVD’en og ART metoden giver gode resultater, ogdet er let at beregne disse løsninger, nar forarbejdet er gjort godt. For denførste metode er det let at finde en god trunkeringsparameter, som nedsætterstøjens effekt pa billedet. For den anden metode fas de gode løsninger da det ermuligt at vælge antallet af iterationer for CGLS metoden, sa løsningen kommernumerisk tæt pa den eksakte løsning.

En sammenligning af simulerede rekonstruktioner fra hver af de tre metoder, vilhurtigt give et billede af hvilken der er at foretrække.

Page 6: Radon Transform in Tomographic Image Reconstruction

iv

Page 7: Radon Transform in Tomographic Image Reconstruction

Contents

Abstract i

Resume iii

1 Introduction 1

2 Tomography 32.1 Basic Idea of Computed Tomography . . . . . . . . . . . . . . . . 3

3 The Radon Transform 73.1 The Radon Transform . . . . . . . . . . . . . . . . . . . . . . . . 73.2 Sinogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4 Filtered Backprojection 134.1 The Fourier Slice Therorem . . . . . . . . . . . . . . . . . . . . . 134.2 Real Measurements . . . . . . . . . . . . . . . . . . . . . . . . . . 154.3 Deriving the FBP Method . . . . . . . . . . . . . . . . . . . . . . 15

5 Singular Value Expansion 235.1 One-dimensional SVE . . . . . . . . . . . . . . . . . . . . . . . . 235.2 The Picard Condition . . . . . . . . . . . . . . . . . . . . . . . . 255.3 Discrete Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 265.4 Two-dimensional SVE . . . . . . . . . . . . . . . . . . . . . . . . 285.5 SVE of the Radon Transform . . . . . . . . . . . . . . . . . . . . 295.6 Analytical results . . . . . . . . . . . . . . . . . . . . . . . . . . . 305.7 Numerical results . . . . . . . . . . . . . . . . . . . . . . . . . . . 335.8 The Picard condition and the SVD of the Radon Transform . . . 355.9 Regularization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355.10 Truncated SVD of the Radon Transform . . . . . . . . . . . . . . 37

Page 8: Radon Transform in Tomographic Image Reconstruction

vi CONTENTS

5.11 Reconstruction from the SVD . . . . . . . . . . . . . . . . . . . . 38

6 Algebraic Reconstruction Technique 416.1 Algebraic Problem . . . . . . . . . . . . . . . . . . . . . . . . . . 416.2 Discrete problem . . . . . . . . . . . . . . . . . . . . . . . . . . . 426.3 CGLS Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436.4 Reconstruction using the CGLS Method . . . . . . . . . . . . . . 47

7 Comparison 497.1 Comparison of the three reconstruction methods . . . . . . . . . 49

8 Conclusion 59

A Sinograms 61

B FBP 63B.1 FBP Reconstruction . . . . . . . . . . . . . . . . . . . . . . . . . 63

C Singular functions 65C.1 Control of the Singular Functions . . . . . . . . . . . . . . . . . . 65

D Picard Condition 67D.1 Picard Plots from Noise-free Data . . . . . . . . . . . . . . . . . 67D.2 Picard Plots from Noisy Data . . . . . . . . . . . . . . . . . . . . 69

E Reconstruction using SVE/SVD 73E.1 Jacobi Polynomial . . . . . . . . . . . . . . . . . . . . . . . . . . 73E.2 Analytical Reconstruction . . . . . . . . . . . . . . . . . . . . . . 74E.3 Numerical Reconstruction . . . . . . . . . . . . . . . . . . . . . . 77

F ART Method 83F.1 Function to find the sparse matrix . . . . . . . . . . . . . . . . . 83F.2 CGLS function from the Tools programme package. . . . . . . . 87F.3 Script for reconstruction . . . . . . . . . . . . . . . . . . . . . . . 90

G Comparison code 93G.1 Function to make numerical singular functions and values . . . . 93G.2 Function to make an image with objects . . . . . . . . . . . . . . 94G.3 Function to make an image with circles . . . . . . . . . . . . . . 95G.4 Script for constructing images for comparison . . . . . . . . . . . 96

Page 9: Radon Transform in Tomographic Image Reconstruction

Chapter 1

Introduction

Tomography is a widely used technology in a lot of different areas within bothengineering and medical science. The focus of this project is computed to-mography (CT) and the object is to understand the underlying mathematicsbehind the image reconstruction of this technology. The project will deal withthe mathematics of three different methods of reconstruction and look at somesmall examples. In the end results from each method will be discussed andcompared.

There are two aspects of the problem in reconstructing the tomographic images.One aspect is the computation time. An example could be a CT scan of aninjured person at a hospital. It can be crucial if the image reconstruction of theCT scan takes too long time. Implementation of the reconstruction method isa big issue here, but the mathematics of each method also has a great impacton the computation time. The other aspect is the correctness of the image.The aim is always to make a good reconstruction, but is it better to have ashort computation time and a less sharp image? The two aspects are closelyrelated, so to gain an insight in these problems it is important to have a thoroughunderstanding of the mathematical background of the methods.

The project is an attempt to make a pedagogical presentation about the prob-lems and solutions of the inverse problem that consists of reconstructing a tomo-graphic image from its Radon transform. The project is written in a language,

Page 10: Radon Transform in Tomographic Image Reconstruction

2 Introduction

where the reader is expected to have a basic mathematical background. Bothwritters have taken equally part in the whole process, but the main responsibil-ities for certain sections are distributed in the following way:

Ditte Iben Marcussen (062234): 4.3, 5.1-5.3, 7

Camilla H. Trinderup (062200): 4.1-4.2, 5.4 - 5.6, 5.9-5.11, 6

Page 11: Radon Transform in Tomographic Image Reconstruction

Chapter 2

Tomography

The word tomography originates from the Greek word tomos, which means aslice or a section. Tomography is the imaging of this slice. Tomography is usedin a lot of different sciences; medicine, geophysics and material science, just tomention a few. In this project focus will be on the computed tomography with X-rays used in medicine, but the theory can easily be transfered to other sciences.The problem consists of reconstructing the image of a slice of a patient’s body,for instance to see a tumor or a fracture, from the data obtained from thescan. [7]

2.1 Basic Idea of Computed Tomography

In hospitals around the world CT scanners are widely used for different kinds ofinternal examinations. The patient lies on a table, which is rolled into a gantry.The gantry is also referred to as ”the big doughnut” and is illustrated in figure2.1 [1].

In the gantry the X-ray source and the detectors are placed opposite each other.The most common scanning geometry is the so-called fan beam geometry. Thebasic idea is that a single source is delivering several X-ray beams that is de-tected by a number of receivers. In this project another scanning geometry is

Page 12: Radon Transform in Tomographic Image Reconstruction

4 Tomography

Figure 2.1: Illustration of a CT scanner.

considered - the parallel beam geometry. Instead of only having one source as inthe fan beam geometry, there is now several source-receiver pairs. The differencebetween these two geometries is sketched in figure 2.2.

receivers

receivers

sources

sources

Figure 2.2: Fan and parallel beam geometry.

The source and detectors rotate symmetrically within the gantry. For eachposition of the source the X-rays will only pass through a slice of the body,depending on the size of the beam. A scan of a given position is called a view.To create an image of a slice a lot of views are needed. If a three-dimensionalimage is wanted, several images are made and organised in layers. To obtain agood three-dimensional image the distance between the images have to be verysmall.

Page 13: Radon Transform in Tomographic Image Reconstruction

2.1 Basic Idea of Computed Tomography 5

The raw data obtained from a scan is organised in a two-dimensional grid ofpixels. In practice it is not possible to make a scan in only two dimensions,but the slice will have a small height and it will correspond to a layer in thethree-dimensional image. A thin slice is around 1-2 mm thick. Even though athin slice will give a more accurate image, it also has some disadvantages. Tomention one, the radiation dose that the patient is exposed to will grow, sincemore slices will be necessary to cover a specific area. [5]

When the X-rays passes through the body an amount of energy, depending onthe density of the tissue, is attenuated. The raw data is then processed and animage of the slice of the body can be seen on a screen. Processing the data is theessential problem in this project. The problem can be solved in different ways,and this project will clarify each method and the differences between them.

Page 14: Radon Transform in Tomographic Image Reconstruction

6 Tomography

Page 15: Radon Transform in Tomographic Image Reconstruction

Chapter 3

The Radon Transform

When a CT scan is made the X-rays are absorbed by the tissue and bones inthe body. The absorption is described by a linear attenuation function, whichat a fixed point has the value of the linear attenuation coefficient of the tissue.The linear attenuation function is approximately proportional to the density ofthe body, so it is this function we want to have displayed by reconstructing fromthe data obtained. This chapter is based on section 8.2 in [2].

3.1 The Radon Transform

When an X-ray beam is sent through a body, we assume that it follows a straightline, L, from a source S to a detector R. The linear attenuation function willbe denoted f , and is a function of the position x = (x1, x2) in a Cartesiancoordinate system. If the intensity of the beam at a point x is described byI(x), the loss of intensity within a distance dl along the line L can be describedas

Page 16: Radon Transform in Tomographic Image Reconstruction

8 The Radon Transform

dI(x) = −f(x)I(x)dl⇔ (3.1)dI(x)I(x)

= −f(x)dl. (3.2)

The following expression is a solution to the differential equation and is calledBeer’s law[8]:

ln(I(x)) =∫L

−f(x)dl. (3.3)

Since the intensity of the beam at the source, denoted as IS , is known, thedifference in intensity from where the beam is emerged to a point on the line Lwill be given as:

ln(IS)− ln(I(x)) = −∫L

−f(x)dl⇔ (3.4)∫L

f(x)dl = ln(ISI

). (3.5)

The above described process is repeated on parallel lines. When actually doinga scan, there will be a finite number of lines corresponding to the number ofsource-receiver pairs. Hereby a number of integrals as (3.5), are obtained. Theinverse problem is to recover f(x) from these equations. This is in the math-ematical litterature called the inverse Radon transform, and otherwise imagereconstruction from projections. Obtaining the integrals means that a slice ofthe object has now been investigated in a certain direction. The integrals rep-resent the projection of f(x). Defining a new direction other projections areobtained. This concept is illustrated in figure 3.1.

When a CT scan is made, and the sources and receivers move as described, therewill be a point of rotation in the middle of gantry. Considering a single slice, itis therefore natural to set origo of the Cartesian coordinate system, the x-plane,in this point. The Cartesian axes are choosen so the x1-axis is parallel to theinitial direction of the source-receiver pair’s movement. This idea is illustratedin figure 3.2. Furthermore the figure illustrates how a new coordinate systemappear, when the source and receiver are moved an angle φ ∈ [0, 2π] from thex1-axis. This direction is defined by the vector θ, so

Page 17: Radon Transform in Tomographic Image Reconstruction

3.1 The Radon Transform 9

R

R

S

S

O

Figure 3.1: Illustration of projections.

x1

x2

!!!

O

!

x

t

s

Figure 3.2: The geometry of the Radon transform.

Page 18: Radon Transform in Tomographic Image Reconstruction

10 The Radon Transform

θ = cosφ, sinφ (3.6)

θ⊥ = − sinφ, cosφ. (3.7)

The s-axis will be parallel to the line where the sources are placed, and t isparallel to the lines of the rays. The dotted line x represents one of these lines.(3.6) and (3.7) imply that for a given s any line in the Cartesian coordinatesystem can be written as x = sθ + tθ⊥ for t ∈ R. This leads to the fact thatthe projection of f in the direction θ is given by

(Rφf)(s) =∫Lφ,s

f(x)dl (3.8)

=∫ ∞−∞

f(sθ + tθ⊥)dt. (3.9)

Here Rφ denotes the Radon transform for a specific direction of θ. Looking atall possible directions of θ we find a function of two variables given by:

(Rf)(s, φ) = (Rφf)(s). (3.10)

So all in all the inverse problem consists of recovering a function of two variablesfrom its line integrals.

3.2 Sinogram

Expressing (3.10) only in terms of s and φ gives:

(Rf)(s, φ) =∫ ∞−∞

f(s cosφ− t sinφ, s sinφ+ t cosφ) (3.11)

Plotting Rf as a function of s and φ gives a sinogram, when the values of f arerepresented as grey scale levels. When doing a CT scan, the measured values ofthe Radon transform will be discrete and noisy.

Page 19: Radon Transform in Tomographic Image Reconstruction

3.2 Sinogram 11

phi

s

Sinogram of the single object

100 200 300

50

100

150

200

250

300

350

Phantom

x1

x 2

50 100 150 200 250

50

100

150

200

250

phi

s

Sinogram of Phantom

100 200 300

50

100

150

200

250

300

350

Single Object

x1

x 2

50 100 150 200 250

50

100

150

200

250

Figure 3.3: Sinograms of a single white pixel and of the Phantom image.

Page 20: Radon Transform in Tomographic Image Reconstruction

12 The Radon Transform

The density function f is assumed to have support within a disc of radius a. Thismeans that the sinogram will have a support of a rectangle with −a ≤ s ≤ a and−π < φ < π. For every point in the sinogram, there is a corresponding straightline in the x-plane. For all the lines passing through a fixed point x0 = (x0

1, x02),

the corresponding points in the sinogram will describe a sinusoidal curve in the(s, φ)-plane. This curve is described by s = x ·θ = x0

1 cosφ+x02 sinφ. To derive

this result consider the special case of f(x) = δ(x−x0), a delta function at thefixed point x0 . The Radon transform of this function is:

Rf(φ, s) =∫ ∞−∞

f(sθ + tθ⊥)dt (3.12)

=∫ ∞−∞

δ(sθ + tθ⊥ − x0)dt (3.13)

=∫ ∞−∞

δ

(s cosφ− t sinφ− x0

1

s sinφ+ t cosφ− x02

)dt. (3.14)

The values of φ and s for which Rf 6= 0 are thus given by:

s cosφ− t sinφ = x01 (3.15)

s sinφ+ t cosφ = x02. (3.16)

Isolating t in (3.15) and using this expression in (3.16) gives:

s sinφ+(s

cosφsinφ

− x01

sinφ

)cosφ = x0

2 (3.17)

s(sin2 φ+ cos2 φ

)= x0

1 cosφ+ x02 sinφ (3.18)

s = x01 cosφ+ x0

2 sinφ. (3.19)

From the two top images in figure 3.3, it is seen that for an image with only onenonzero pixel, the Radon transform will give a single curve. In the two bottomimages, it is illustrated how the sinogram of an image, with a lot of pixels withnonzero values, looks like. For every pixel with a nonzero value there is a sinuscurve.

Page 21: Radon Transform in Tomographic Image Reconstruction

Chapter 4

Filtered Backprojection

The first method for solving the inverse problem to be explored is the filteredbackprojection, FBP. This chapter will focus on the continuous mathematichsbehind the method as it is described in section 11.2 and 11.3 in [2]. For discreteproblems the MATLAB function iradon is applied. Before jumping right intothe FBP deriviation it is important to gain understanding of the Fourier slicetheorem, since it forms the base of the FBP method.

4.1 The Fourier Slice Therorem

Earlier we saw that the Radon transform can be expressed as (3.9). Since weobtain measured values of the Radon transform, the projection of f on s forvalues of φ can be seen as a linear system of equations:

Rf = g, (4.1)

where g = g(s, φ). This means that for a given value of φ, the projection of f

Page 22: Radon Transform in Tomographic Image Reconstruction

14 Filtered Backprojection

can be described by

gφ(s) =∫ ∞−∞

f(sθ + tθ⊥

)dt. (4.2)

To derive the Fourier slice theorem it is necessary to look at the two-dimensionalFourier transform of f :

F (ω, τ) =∫ ∞−∞

∫ ∞−∞

f(sθ + tθ⊥

)e−2πi(sω+tτ)dsdt. (4.3)

Here ω and τ are parallel to respectively the s- and t-directions. For every angleφ there is a (ω, τ)-system, just as it is the case with the (s, t)-system. Since s ischosen to be the projection line, defined by φ, a slice according to this projectionwill in the Fourier domain be placed so τ = 0. From this the slice is:

F (ω, 0) =∫ ∞−∞

∫ ∞−∞

f(sθ + tθ⊥

)e−2πisωdsdt (4.4)

=∫ ∞−∞

(∫ ∞−∞

f(sθ + tθ⊥

)dt

)e−2πisωds (4.5)

=∫ ∞−∞

gφ(s)e−2πisωds (4.6)

= gφ(ω). (4.7)

We see that this slice corresponds to making a one-dimensional Fourier trans-form of the projection, which is illustrated in figure 4.1.This is known as theFourier slice theorem. When not looking at a specific slice, the Fourier transformof g(s, φ) will be a function depending on both ω and φ: g(ω, φ).

g!(s)

s

g!(!)

!

Figure 4.1: One-dimensional Fourier transform.

Page 23: Radon Transform in Tomographic Image Reconstruction

4.2 Real Measurements 15

For every Fourier transform gφ of gφ, we will get a straight line in the Fourierdomain. This line has the same angle φ with the ω1-axis, as the s-axis has withthe x1-axis in the x-plane. This concept is illustrated in figure 4.2.

4.2 Real Measurements

In the two previous figures it is also illustrated how the real measurementsare obtained. It is not possible to actually do measurements for all anglesφ ∈ [0, 2π], and besides this there will be a finite number of source-receiverpairs. This results in a finite number of samplings with equal distance on theinterval s ∈ [−a; a] for every angle φ.

The big problem arises when the image has to be reconstructed. The reconstruc-tion will in the x-plane be on a grid, where each square will represent a pixel.But from figure 4.2 it is seen that the transformed data are not representedin the correct grid. The measurements are concentrated in the center of theFourier domain. Using a regular inverse Fourier transform to solve this problemwill lead to wrong results, since the transformed data is in a polar coordinatesystem, and the unknown function, f(x), is in a Cartesian coordinate system.To deal with this divergence the filtered backprojection method will be usedinstead.

4.3 Deriving the FBP Method

To find an expression for the filtered backprojection method a new operator isat first introduced. It is called the backprojection operator R#, and for a givenfunction g(s, φ), for −∞ < s <∞ and 0 ≤ φ < 2π, it is defined as

(R#g)(x) =∫ 2π

0

g(s, φ)dφ. (4.8)

The backprojection operator will transform g, which represents the sinogram,into a function of x. The difference between the Radon transform and thebackprojection operator is that while the Radon transform integrates over allpoints in a straight line x = sθ+tθ⊥, the backprojection operator integrates overall straight lines through a specific point (x1, x2) in the Cartesian coordinate

Page 24: Radon Transform in Tomographic Image Reconstruction

16 Filtered Backprojection

x1

x2

!

!!

! s

ss

s

!1

!2

!

!

!

! !

!!

!

Figure 4.2: Two-dimensional Fourier transform.

Page 25: Radon Transform in Tomographic Image Reconstruction

4.3 Deriving the FBP Method 17

system. This means that the integral in (4.8) integrates over the sinusoidalcurves in the sinogram. These curves are described by s = x1 cosφ+ x2 sinφ.

To get to the exact formulation of the filtered backprojection method, the inverseFourier transform in polar coordinates has to be introduced. Letting gφ(ω) =g(ω, φ) gives:

f(x) =∫ 2π

0

(∫ ∞0

ωg(ω, φ)e2πiωsdω

)dφ. (4.9)

Here ω = |ω| is the Jacobian determinant. When g(ω, φ) is a 2π-periodic func-tion of φ it is possible to replace φ with φ + π. The general rules for sine andcosine then says that

(cos(φ+ π), sin(φ+ π)) = (− cosφ,− sinφ) = −θ. (4.10)

With these changes the expression will be

f(x) =∫ 2π

0

(∫ ∞0

ωg(−ω, φ)e−2πiωsdω

)dφ (4.11)

=∫ 2π

0

(∫ 0

−∞|ω|g(ω, φ)e2πiωsdω

)dφ. (4.12)

Going from (4.11) to (4.12) a replacement of ω with −ω results in a changeof boundaries for the inner integral. Since an expression for f is wanted withintegral boundaries ±∞, equation (4.9) is added to equation (4.12). This leadsto the following expression for f :

2f(x) =∫ 2π

0

(∫ ∞−∞|ω|g(ω, φ)e2πiωsdω

)dφ⇔ (4.13)

f(x) =12

∫ 2π

0

(∫ ∞−∞|ω|g(ω, φ)e2πiωsdω

)dφ. (4.14)

This expression is central in the filtered backprojection algorithm. The use ofthe backprojection operator can easily be shown if G(s, φ) is defined as

Page 26: Radon Transform in Tomographic Image Reconstruction

18 Filtered Backprojection

G(s, φ) =∫ ∞−∞|ω|g(ω, φ)e2πiωsdω. (4.15)

Then equation (4.14) can now be expressed in terms of the backprojection op-erator.

f(x) =12

∫ 2π

0

G(s, φ)dφ (4.16)

=12(R#G

)(x). (4.17)

This means by using the backprojection operator on the projections in equation(4.15) the function f can be found. To summarize, the FBP method consists ofthe following steps:

• Compute the Fourier transform of g(s, φ) for every angle φ and multiplywith the Jacobian determinant |ω|.

• Find G(s, φ) by inverse Fourier transform of |ω|g(ω, φ).

• At last use the backprojection operator on G(s, φ).

In figure 4.3 the backprojection is applied to the image Phantom that can befound in MATLAB. The sinograms of both a noisy and a noise-free version of theimage is shown in the top.

The multiplicative factor |ω| can amplify the high frequency noise, which resultsin unusable reconstructions. Sampled data is noisy and therefore given by:

g = Rf + noise. (4.18)

So the inverse Fourier transform is made on a noisy signal. This can be expressedas:

Page 27: Radon Transform in Tomographic Image Reconstruction

4.3 Deriving the FBP Method 19

Sinogram without noise

Phi

s

50 100 150

50

100

150

200

250

300

350

Sinogram with noise

Phi

s

50 100 150

50

100

150

200

250

300

350

Rec. without noise

x1

x 2

50 100 150 200 250

50

100

150

200

250

Rec. with noise

x1

x 2

50 100 150 200 250

50

100

150

200

250

Figure 4.3: Reconstructions of Phantom with and without noise.

Page 28: Radon Transform in Tomographic Image Reconstruction

20 Filtered Backprojection

f(x) =∫ 2π

0

(∫ ∞−∞|ω|(g(ω) + noise) dω

)dφ (4.19)

=∫ 2π

0

(∫ ∞−∞|ω|g(ω)dω +

∫ ∞−∞|ω|noise dω

)dφ. (4.20)

From figure 4.4 it is then seen that as ω → ±∞ the noise is on a constantlevel, white noise. But since the noise is multiplied with the increasing function|ω|, the second term in the parenthesis in (4.20) is an undefined integral. Thissymptom can be avoided by using a low-pass filter that gives high frequencynoise less importance. Instead of only multiplying g(ω, φ) with the Jacobian inthe second step of the process, the Fourier transformed data is also multipliedwith a low-pass filter, WΩ(|ω|).

−10 −8 −6 −4 −2 0 2 4 6 8 100

1

2

3

4

5

6

7

8

9

10

w

JacobianNoise

Figure 4.4: White noise and Jacobian.

It is necessary to use the low-pass filter to get any useful results from the back-projection method. But it also makes the result of the method an approximationto f , denoted fω. A low-pass filter has a certain cut-off frequency as illustratedin figure 4.5. This type of low-pass filter is called a Butterworth filter, butmany others could be applicable. The dotted line in the figure represents thepure Jacobian |ω|. The term WΩ(|ω|) will tend to zero as ω → ±∞, but thecut-off frequency decides how fast the decay is. Using a filter like this, will leadto an acceptable solution.

In figure 4.6 four reconstructions of the Phantom image is seen. The top leftimage is similar to the reconstruction of the noisy sinogram in figure 4.3. Thethree other reconstructions are made by applying different filters to the noisysinogram. The filters are a part of the iradon method in MATLAB. From thisit is seen that the reconstructions using a filter are better than the one without

Page 29: Radon Transform in Tomographic Image Reconstruction

4.3 Deriving the FBP Method 21

!0

!0

!0

!0/2

!0/2!!0/2!

00!!0

!0/2

x0

Figure 4.5: Butterworth low-pass filter.

any filter. Especially the Hamming and the Hann filters seem to be workingwell.

The reconstructions using the Hamming and the Hann filter are almost similar.This becomes clear, when looking at the mathematical expressions for thesefilters. The Hann filter is defined as

hn =

0.5− 0.5 cos(

2πL n)

0 ≤ n ≤ L− 10 otherwise . (4.21)

Here L is the length of the filter - the cut-off frequency. The Hamming filter isdefined as

wH(n) =

0.54− 0.46 cos(

2πL n)

0 ≤ n ≤ L0 otherwise . (4.22)

The two filters are plotted in figure 4.7 and it is seen that they are almostsimilar, From the plot it is obvious that the noise will not be amplified usingthese filters. The Hamming filter is chosen to be used in later use of iradon.

Page 30: Radon Transform in Tomographic Image Reconstruction

22 Filtered Backprojection

No filter

x1

x 2

50 100 150 200 250

50

100

150

200

250

Hamming filter

x1x 2

50 100 150 200 250

50

100

150

200

250

Hann filter

x1

x 2

50 100 150 200 250

50

100

150

200

250

Cosine filter

50 100 150 200 250

50

100

150

200

250

Figure 4.6: Reconstructions of Phantom with different filters.

−3 −2 −1 0 1 2 30

1

2

3

4

5

6

7

8

9

10

Hann filterHamming filter

Figure 4.7: Different filters.

Page 31: Radon Transform in Tomographic Image Reconstruction

Chapter 5

Singular Value Expansion

In this section focus will be on the singular value expansion (SVE). First theSVE in one dimension will be in focus, then in two dimensions and finally theSVE of the Radon transform will be described. Furthermore the reconstructionbased on this theory will be carried out with consideration of the necessaryprecautions. The chapter is based on chapter 2 and 3 in [3] and chapter 9 in [2].

5.1 One-dimensional SVE

The Fredholm integral equation of the first kind is given by

∫ 1

0

K(s, t)f(t)dt = g(s). (5.1)

Here the functions K and g are known. Often g will be measured data ata given time, angle or similar. The kernel K could for instance be a pointspread function, when working with image deblurring. The inverse problemthen consists of computing f from the knowledge of K and g.

Page 32: Radon Transform in Tomographic Image Reconstruction

24 Singular Value Expansion

From section 2.3 in [3] it is known that the kernel K can be expressed as

K(s, t) =∞∑i=1

µiui(s)vi(t), (5.2)

where the inner products of ui and vi are

〈ui, uj〉 =∫ 1

0

ui(s)uj(s)ds = δij (5.3)

〈vi, vj〉 =∫ 1

0

vi(t)vj(t)dt = δij . (5.4)

Here δij is Kronecker’s delta, which is defined as

δij =

1 if i = j0 if i 6= j

. (5.5)

The values µi are called the singular values, and the functions ui and vi are calledthe left and right singular functions. The singular values form a non-increasingsequence, which means that

µ1 ≥ µ2 ≥ ... ≥ 0.

Both ui∞i=1 and vi∞i=1 form orthonormal bases. The definition in (5.2) is nowused on the left hand side of the integral equation, (5.1), whereby the followingresult is obtained:

∫ 1

0

K(s, t)f(t)dt =∫ 1

0

∞∑i=1

µiui(s)vi(t)f(t)dt (5.6)

=∞∑i=1

µiui(s)∫ 1

0

vi(t)f(t)dt (5.7)

=∞∑i=1

µiui(s)〈vi, f〉. (5.8)

Page 33: Radon Transform in Tomographic Image Reconstruction

5.2 The Picard Condition 25

Since both ui∞i=1 and vi∞i=1 are orthonormal bases in separate domains, thefunctions f and g can be expressed in terms of the singular functions:

f(t) =∞∑i=1

〈vi, f〉vi(t) (5.9)

g(s) =∞∑i=1

〈ui, g〉ui(s). (5.10)

Continuing with the results from (5.8) and (5.10) the integral equation (5.1) willnow be

∞∑i=1

〈vi, f〉µiui(s) =∞∑i=1

〈ui, g〉ui(s). (5.11)

The left and right hand sides in (5.11) have the same orthonormal base, andtherefore it follows that

〈vi, f〉µi = 〈ui, g〉, i = 1, 2, . . . (5.12)

Hereby an expression for 〈vi, f〉 is obtained. Using this result in (5.9) leads tothe following solution to the integral equation:

f(t) =∞∑i=1

1µi〈ui, g〉vi(t). (5.13)

So the solution to the inverse problem (5.1) can be found using singular func-tions.

5.2 The Picard Condition

The solution found in (5.13) is only valid if the sum converges. Therefore it isnecessary to have a condition, which ensures that this is the case. The Picard

Page 34: Radon Transform in Tomographic Image Reconstruction

26 Singular Value Expansion

condition expresses how the 2-norm of f must be bounded, to have a squareintegrable solution - a converging solution. The 2-norm of f is defined as

‖f‖22 =∫ 1

0

f(t)2dt. (5.14)

The right hand side can be expressed as a series expansion of the inner productbetween the singular functions vi and f :

∫ 1

0

f(t)2dt =∫ 1

0

( ∞∑i=1

〈vi, f〉vi(t))dt (5.15)

=∞∑i=1

(〈vi, f〉2

∫ 1

0

vi(t)2dt

)(5.16)

=∞∑i=1

〈vi, f〉2〈vi, vi〉. (5.17)

(5.18)

Since 〈vi, vi〉 = δii = 1 the Picard condition can be expressed as:

‖f‖22 =∞∑i=1

〈vi, f〉2 =∞∑i=1

(1µi〈ui, g〉

)2

<∞. (5.19)

To satisfy this condition we see that 〈ui, g〉 must decay faster to zero than thesequence of singular values. When working with measured data this conditionis often violated because of noise in the data. This violation leads to instabilityin the solutions of the Fredholm integral equations of the first kind. A way tohandle instability is to make a truncated SVE instead.

5.3 Discrete Problem

The SVE gives a good idea about computing the solution of the Fredholm inte-gral equation of the first kind. But working with real data and matrices, whichare finite-dimensional, the singular value decomposition (SVD) is a good tool.

Page 35: Radon Transform in Tomographic Image Reconstruction

5.3 Discrete Problem 27

In the following the inner product of two vectors is defined as

〈x,y〉 = xTy. (5.20)

The objective is to solve a linear system of equations

Ax = b, (5.21)

where A ∈ Rm×n is a rectangular matrix with m ≥ n. The SVD for this matrixis

A = UΣV T =n∑i=1

µiuivTi , (5.22)

where Σ is a square matrix with n singular values in the diagonal. The columnsof U ∈ Rm×n and V ∈ Rn×n are the singular vectors, ui respectively vi. Bothmatrices form orthonormal bases, which means that UTU = V TV = I and thecolumns of the matrices are orthonormal. Similar to the SVE, x and b can beexpressed in terms of the orthonormal bases.

x =n∑i=1

vTi xvi (5.23)

b =n∑i=1

uTi bui. (5.24)

Using (5.24) along with the SVD of A, as given in (5.22), leads to a solutionof the linear system of equations. First we see that Ax =

∑ni=1 µiuiv

Ti x.

Therefore it follows that:

n∑i=1

µiui vTi x =

n∑i=1

uTi bui. (5.25)

Page 36: Radon Transform in Tomographic Image Reconstruction

28 Singular Value Expansion

Both sides of the equation in (5.25) are expressed by the same orthonormal base,thus is

vTi x =1µiuTi b. (5.26)

This result can be used in (5.23) and a solution of the linear system of equationsis hereby obtained:

x =n∑i=1

1µiuTi b vi. (5.27)

5.4 Two-dimensional SVE

Looking at a two-dimensional case of the SVE the operator K will map fromx = (x1, x2)T to y = (y1, y2)T , see figure 5.1. This could for instance bef(x) representing an exact image and g(y) representing a blurred version of theimage.

x1

x2 y2

y1

f(x) g(y)

Figure 5.1: Mapping from x to y.

The two-dimensional integral equation is

∫Ωx

K(y,x)f(x)dx = g(y), y ∈ Ωy, (5.28)

where Ωx is the integration area.

Page 37: Radon Transform in Tomographic Image Reconstruction

5.5 SVE of the Radon Transform 29

The singular value expansion of K will in this case be

K(y,x) =∞∑i=1

µiui(y)vi(x). (5.29)

The inner products of the singular functions of the two-dimensional SVE arenow given as

〈vi, vj〉 =∫

Ωx

vi(x)vj(x)dx = δij (5.30)

〈ui, uj〉 =∫

Ωy

ui(y)uj(y)dy = δij . (5.31)

Again δij represents Kronecker’s delta.

Similar to the result in the previous section, the unkown function f can bereconstructed by

f(x) =∞∑i=1

〈ui, g〉µi

vi(x). (5.32)

This section will form the basis of the derivation of the SVE of the Radontransform in the next section.

5.5 SVE of the Radon Transform

Earlier when looking at the Radon transform the integration area for a specificangle φ, was along a straight line passing through a disc with radius a, where thedensity function f was defined. When deriving the SVE of the Radon transformthe integration area will be a disc of radius 1 and only the line segment passingthrough this disc. This concept is illustrated in figure 5.2. It is always possibleto make the domain a unit circle by rescaling the space variables.

Page 38: Radon Transform in Tomographic Image Reconstruction

30 Singular Value Expansion

x1

x2

!s

w(s)1

Figure 5.2: Radon transform on a unit circle.

5.6 Analytical results

In the figure the marked line segment is denoted w, and since the domain is aunit circle it is given as a function of s:

w(s) = (1− s2)1/2 |s| ≤ 1. (5.33)

Since f has support within a unit circle, it is only necessary to integrate alongthe straight line within the disc. Therefore the Radon transform for a givenangle φ is in this domain given by

(Rφf)(s) =∫ w(s)

−w(s)

f(sθ + tθ⊥)dt, |s| ≤ 1. (5.34)

By refering to section 4.1 the function g can be expressed as a series expansion:

g(s, φ) =∞∑m=0

αm(φ)w(s)Um(s), (5.35)

where αm is an arbitrary square integrable function and Um is the Chebyshev

Page 39: Radon Transform in Tomographic Image Reconstruction

5.6 Analytical results 31

polynomial of the second kind. These polynomials are defined as

Um(s) =sin ((m+ 1) arccos s)

sin(arccos s), m = 0, 1, 2, . . . (5.36)

From [2] the Chebyshev polynomials are known to be orthogonal functions withrespect to the weight functions w(s), so

∫ 1

−1

w(s)Um(s)Um′(s)ds = δm,m′ . (5.37)

For the Radon transform the singular values, µm, can have muliplicity largerthan one. As a consequence of this it will be complicated to express the SVE ofR, since it will depend on both the singular value and its multiplicity. Omittingfurther details of the derivation the SVE of R is:

K(x1, x2, φ, s) =∞∑m=0

m∑k=0

µmum,k(φ, s)vm,k(x1, x2), (5.38)

where µm are the singular values, um,k and vm,k are singular functions. Thesingular values are given by

µm =(

4πm+ 1

)1/2

. (5.39)

The index k corresponds to the highest possible multiplicity of the m’th singularvalue, which means that highest multiplicity of the m’th singular value is m+1.

The index m in (5.38) will, when working with real data, be limited. So insteadof being an index for m = 0, 1, . . . ,∞ it will be m = 0, 1, . . . ,M . How to choseM will be treated later on.

The singular functions um,k are given in terms of the Chebyshev polynomial ofthe second kind and a function Yl given by

Yl(φ) =

1√2π

cos(lφ) l ≥ 01√2π

sin(lφ) l < 0 . (5.40)

Page 40: Radon Transform in Tomographic Image Reconstruction

32 Singular Value Expansion

The functions Yl are orthonormal in L2(0, 2π), because

∫ 2π

0

Yl(φ) · Yl′(φ)dφ =

1 l = l′ = 012 l = l′ 6= 00 l 6= l′

(5.41)

The singular functions um,k are defined as

um,k(s, φ) =

√2πw(s)Um(s)Ym−2k(φ), k = 0, 1, . . . ,m, (5.42)

and it follows from the orthonormality of Um and Ym−2k that um,k is alsoorthonormal. The other singular functions, vm,k, are also expressed in terms of(5.40) and Jacobi polynomials of degree n, P (α,β)

n :

vm,k(x) =√

2m+ 2‖x‖|m−2k|2 P

(0,|m−2k|)12 (m+|m−2k|)(2‖x‖

22 − 1)Ym−2k

(arctan

(x2

x1

)),

(5.43)

where k = 0, 1, . . . ,m.

Defining the inner product between um,k and g as

〈um,k, g〉 =∫ 2π

0

∫ 1

0

um,k(s, φ)g(s, φ)dsdφ, (5.44)

and referring to section 5.4, the image can then be reconstructed in terms of thesingular values and functions as:

f(x) =∞∑m=0

m∑k=0

〈um,k, g〉µm

vm,k(x). (5.45)

In figure 5.3 examples of the singular functions are plotted, these are foundnumerically - see next section for further explanation. Both singular functionsare sampled on a 29 × 29 grid. It is seen how the singular functions vm,k areonly defined within a circle. For the um,k functions each circle represents anoscillation. It is almost the same for the vm,k functions where the osciallations

Page 41: Radon Transform in Tomographic Image Reconstruction

5.7 Numerical results 33

are within the circle. As m increases the number of oscillations of the singularfunctions also increase. Therefore the reconstruction can be improved by in-creasing m. Though it can have fatal consequences to let the sum be infinite ifthe data is noisy. This will be thoroughly investigated in section 5.8.

5.7 Numerical results

When testing the expressions of the singular functions in MATLAB some prob-lems arose. The singular functions um,k and vm,k were not orthonormal, al-though the theory says they should be, which in the end will lead to wrongreconstructions. Equation (5.45) is only valid if the singular functions are or-thonormal. To help this the normalisation is carried out using the Frobeniusnorm in the implementation, see appendix E.2. But the normalisation was notthe only problem, since the reconstruction still did not work.

To check whether the singular functions were correct, the MATLAB functionsvd was used. As seen earlier the problem of reconstructing the image can betreated as a linear system of equations, Rf = g. The operator matrix R canbe constructed by looking at an image of just a circle with a constant value,and then for every pixel in this image use the radon function. If ei representsthe i’th unit vector, the matrix R is constructed so Rei = gi, where gi is thesinogram of the i’th pixel in the original image. On R the svd can be used, andthe output of this call will give three matrices: U and V with sampled singularfunctions in each column and one diagonal matrix S with the singular values.By using the reshape function on each column it is possible to construct thesingular functions on the grids specified by the Radon transform and the initialimage. The implementation can be seen in appendix C.1.

The control showed that the way the singular functions um,k are formulatedin 5.42 are correct. But the test also showed that the vm,k functions are notformulated correct. In spite of a lot of time-consuming troubleshooting nothingseemed to work. It was not possible to make the analytical and numerical foundsingular functions match. Because of divergence between the literature and thepractical results, the rest of the report, especially figures and calculations, willbe based on the numerical results, whenever the SVE of the Radon transformis used. Therefore it will be referred to as the SVD of the Radon transform.

Page 42: Radon Transform in Tomographic Image Reconstruction

34 Singular Value Expansion

Um,k

5 10 15 20 25

5

10

15

20

25

Um,k

5 10 15 20 25

5

10

15

20

25

Um,k

5 10 15 20 25

5

10

15

20

25

Um,k

5 10 15 20 25

5

10

15

20

25

Um,k

5 10 15 20 25

5

10

15

20

25

Um,k

5 10 15 20 25

5

10

15

20

25

Vm,k

5 10 15 20 25

5

10

15

20

25

Vm,k

5 10 15 20 25

5

10

15

20

25

Vm,k

5 10 15 20 25

5

10

15

20

25

Vm,k

5 10 15 20 25

5

10

15

20

25

Vm,k

5 10 15 20 25

5

10

15

20

25

Vm,k

5 10 15 20 25

5

10

15

20

25

Figure 5.3: Singular functions um,k and vm,k for different values of m = 0, 1, 2.

Page 43: Radon Transform in Tomographic Image Reconstruction

5.8 The Picard condition and the SVD of the Radon Transform 35

5.8 The Picard condition and the SVD of theRadon Transform

Above in equation (5.45) the solution to the reconstruction is seen. Accordingto the Picard condition in section 5.2 the solution is only valid, when the 2-normof the solution f is bounded. To satisfy this condition the inner product of um,kand g must decay faster than the singular values.

Since the look of the singular functions only depend on the grid they are sampledon can the singular functions be used for reconstructing any N × N image. Itis important to point out that the reconstructed image will be defined withinthe unit circle, because of the domain for the singular functions vm,k. In figure5.4 two Picard plots are seen. One based on noise-free data and one based onnoisy data. In the first plot the Picard condition is not violated, since the innerproducts decay faster than the singular values. Though it is hard to see in theseplots, the singular values form a kind of stair function with longer and longersteps. The longer and longer steps are due to the multiplicity of the singularvalues. On the other hand, if the Picard plot is based on noisy data the Picardcondition is violated. since the values of the inner products quickly stabilise,while the singular values still decrease. This implies that 〈um,k,g〉µm

increases asmore and more terms are included in (5.45). After a specific number of terms the2-norm can therefore not be bounded anymore. The violation is also clear whenlooking at the fractions 〈um,k,g〉µm

. In the first plot these values are a decreasingsequense, while in the second plot they quickly starts increasing.

The Picard plots can be used to find a truncation value for the SVD of theRadon transform, and will be used in section 5.10 and 5.11.

5.9 Regularization

As seen earlier it is possible to find a mathematical model that will work whenreconstructing an image from the knowledge of its sinogram. But computingthese ’naive’ solutions can give bad results, since the problems are ill-posed.Regularization methods are made to compute approximate solutions, but aremuch less sensitive to perbutations in the data, for instance noise, than the’naive’ solution is.

When solving a linear system of equationsAx = b, where the matrixA ∈ Rm×nwith m ≥ n the ’naive’ solution is different if A has full rank or not. If m > n

Page 44: Radon Transform in Tomographic Image Reconstruction

36 Singular Value Expansion

200 400 600 800 1000 1200

10−5

10−4

10−3

10−2

10−1

100

101

Picard plot without noise

µm

⟨ umk , g ⟩

⟨ umk , g ⟩ / µm

200 400 600 800 1000 1200

10−3

10−2

10−1

100

101

Picard plot with noise

µm

⟨ umk , g ⟩

⟨ umk , g ⟩ / µm

Figure 5.4: Top: Picard plot without noise. Bottom: Picard plot with noise,

Page 45: Radon Transform in Tomographic Image Reconstruction

5.10 Truncated SVD of the Radon Transform 37

the ’naive’ solution will be the least squares solution, and when m = n the’naive’ solution is to compute x = A−1b.

The condition number for A when dealing with a discrete problem is given interms of its singular values:

cond(A) =µ1

µn. (5.46)

Since the singular values decay fast, the condition number for A will be high.From [4] it is known that the difference between the exact solution to the linearsystems of equations, x∗, and the approximated solution x is bounded:

‖x∗ − x‖2‖x∗‖2

≤ cond(A)‖e‖2‖b∗‖2

. (5.47)

But since the condition number can be very high, (5.47) implies that the exactand the approximated solution can be very far from eachother.

5.10 Truncated SVD of the Radon Transform

As seen earlier the problem of reconstructing an image from the knowledge ofits sinogram can be seen as a linear system of equations:

Rf = g. (5.48)

g represents the data including measurement noise, g = g∗ + noise.

Earlier we saw that the SVE of the Radon transform will give the right solutionto the linear system of equations by finding the singular functions and values.When working with a dicrete problem the singular functions are sampled ongrids corresponding to the domains, (s, φ) and (x1, x2). The ’naive’ solutionwill then be:

F =∞∑m=0

m∑k=0

〈Um,k,G〉µm

Vm,k, (5.49)

Page 46: Radon Transform in Tomographic Image Reconstruction

38 Singular Value Expansion

where the matrix inner product is defined as

〈Um,k,G〉 ≡n∑j=1

m∑l=1

(Um,k)j,lGj,l. (5.50)

As seen in section 5.2 both the singular values and the inner product betweenUm,k and G will decay. This means that the inner products corresponding tothe smaller singular values, will be much more affected by noise, than the innerproducts for larger singular values. This problem can be avoided by setting atruncation parameter M , so the approximated solution to 5.48 can be found bylooking at the first k components of (5.49). The truncated SVE of the Radontransform will then be

FM =M∑m=0

m∑k=0

〈Um,k,G〉µm

Vm,k, (5.51)

5.11 Reconstruction from the SVD

The Picard plots in section 5.8 are made from a nonsymmetric image. ThePicard plots of the Phantom image is seen in figure 5.5. From these plots it ispossible to choose a truncation parameter as described above, so the image canbe reconstructed. With a noise level of 0.1 a good truncation parameter couldbe to include around 2600 terms in the innersum of (5.51). It is important tochoose the truncation parameter in a way, so it does not break in the middle of acluster of singular values which means that for a singular value with multiplicitym+ 1, all m+ 1 singular values must be in the reconstruction.

In figure 5.6 the reconstruction of the Phantom image is seen both with andwithout noise. Both reconstructions are great, but the computation time ispretty tough. This will be investigated further in chapter 7.

Page 47: Radon Transform in Tomographic Image Reconstruction

5.11 Reconstruction from the SVD 39

0 500 1000 1500 2000 2500 3000 350010

−6

10−5

10−4

10−3

10−2

10−1

100

101

102

µm

⟨ um,k, g ⟩

⟨ um,k, g ⟩/ µm

0 500 1000 1500 2000 2500 3000 350010

−6

10−5

10−4

10−3

10−2

10−1

100

101

102

µm

⟨ um,k, g ⟩

⟨ um,k, g ⟩/ µm

Figure 5.5: Picard plots of the Phantoim image with and without noise on a69x69 grid.

Page 48: Radon Transform in Tomographic Image Reconstruction

40 Singular Value Expansion

Sinogram without noise

20 40 60

10

20

30

40

50

60

Sinogram with noise

20 40 60

10

20

30

40

50

60

Reconstruction without noise

20 40 60

10

20

30

40

50

60

Reconstruction with noise

20 40 60

10

20

30

40

50

60

Figure 5.6: Reconstruction with the SVD on a 69x69 grid.

Page 49: Radon Transform in Tomographic Image Reconstruction

Chapter 6

Algebraic ReconstructionTechnique

So far two methods for reconstructing a tomography image have been described- the FBP and the SVE/SVD. In this chapter a third way of reconstructingwill be reviewed. The algebraic reconstruction technique - ART - is based ona linear system of equations, with a sparse matrix. A way to solve the linearsystem is with the iterative CGLS method, that will be introduced later in thischapter. The chapter is based on section 7.8 in [3] and the article [6].

6.1 Algebraic Problem

In the two previous reconstruction methods the density function f had supportwithin a disc, which lead to an integration domain with the same shape. Insteadthis reconstruction method considers a square domain, Ω = [0, 1] × [0, 1]. Thedensity function, which has to be reconstructed, is given by f(x) = f(x1, x2).It is necessary to assume that when a ray passes through the density function,the damping of the ray will be proportional to the covered distance. This meansthat for a ray at position x, an infinitesimally small distance dt will result in adamping of f proportional to f(x)dt. For every rayi penetrating the domain,

Page 50: Radon Transform in Tomographic Image Reconstruction

42 Algebraic Reconstruction Technique

there is a corresponding observation bi, for i = 1, . . . ,m. The observation is thedamped signal. The parameter representation for the rayi is given by

xi(t) = sθi + tθ⊥i , t ∈ R. (6.1)

Because of the above described proportionality the ith observation is given by

bi =∫rayi

f(xi(t))dt (6.2)

=∫rayi

f(sθi + tθ⊥i )dt, i = 1, . . . ,m. (6.3)

The inverse problem then consists of recovering f from the observations. Theway the problem is formulated in (6.3) reminds a lot of the Radon transformin chapter 3. But the Radon transform looks at the attenuation for differentangles of the ray, this formulation instead looks at each ray individually.

6.2 Discrete problem

To be able to compute the problem it has to be formulated as a discrete problem.This is done by dividing the domain Ω into a N×N grid of pixels. It is assumedthat in each pixel the density function is constant. The axes are each dividedin N intervals, given by Ik = [(k − 1)/N, k/N ], k = 1, . . . , N and similar for Il.This means that each pixel has a constant value defined as:

f(x) = fkl for x1 ∈ Ik, x2 ∈ Il. (6.4)

Defining the length of rayi in the pixel (k, l) as ∆L(i)kl will lead to the following

for the ith observation

bi =∑

(k,l)∈rayifkl∆

(i)kl , for i = 1, . . . ,m. (6.5)

Page 51: Radon Transform in Tomographic Image Reconstruction

6.3 CGLS Method 43

These equations form a linear system of equations with N2 unknowns. To clarifythis y is introduced. It has the length N2 and contains all the unknowns, fkl,in the following way:

yj = fkl, j = (k − 1)N + l (6.6)

With this definition of y the expression for the observations is:

bi =N2∑j=1

aijyj , i = 1, . . . ,m, (6.7)

where aij = ∆L(i)kl if (k, l) ∈ rayi and 0 otherwise. This results in a linear

system of equation of the form Ay = b, where A is a m×N2 sparse matrix.

6.3 CGLS Method

A good way to solve the linear system of equations, is to use the iterativeconjugate gradient method, hereafter denoted as CGLS - conjugated gradientleast squares method,

A quadratic form is a function of a vector x having the form

f(x) =12xTAx− bTx+ c. (6.8)

From [6] it is known that this quadratic function is minimized by the solutionto the linear system of equations, Ax = b.

Since this method for solving the linear equation system is based on conjugatedgradients, and an introduction of these are at first necessary. The gradient of(6.8) is

Page 52: Radon Transform in Tomographic Image Reconstruction

44 Algebraic Reconstruction Technique

∇f(x) =

d

dx1f(x)

d

dx2f(x)

...d

dxnf(x)

. (6.9)

In the image reconstruction problem A is in general not symmetric. ThereforeCGLS will find the solution of the system 1

2 (AT +A)x = b, where the matrix12 (AT +A) is symmetric.

Working in two dimensions the shape of the quadratic function depends on theelements of A. These shapes are seen in table 6.1. Therefore it is useful if thematrix A is positive definite, since that will always result in just one solutionto the minimizing problem.

A Shape of f(x)Positive definite ConvexNegative definite Concave

In-definite Saddle pointSingular No unique solution

Table 6.1: Table of the correlation between the matrix A and the shape of thequadratic function.

6.3.1 Steepest Descent Method

To get to the CGLS method we will at first have a quick look at the methodof steepest decent. The essence of this method for finding the minimum ofthe quadratic function is to have a starting point of the iteration, x0 and thenstep by step walk in the direction where the functions decreases the most, andthen finally land at a point that satisfies a stopping criteria. For every stepwe will land in a new point xi, where a new steepest direction is found. Themost increasing direction is f ′(xi), so the most decreasing direction must be−f ′(xi). If A had been symmetric this direction would have been equal tori = b−Axi, where ri is the residual. This means that for symmetric matriceswill ri = −f ′(xi). When the direction, ri has been found, the next question ishow far we should go in this direction. This distance, α, is found by line search,

Page 53: Radon Transform in Tomographic Image Reconstruction

6.3 CGLS Method 45

and is expressed in terms of the residuals and the matrix A:

αi =rTi rirTi Ari

. (6.10)

Therefore the iterative steps in the steepest descent method will look like

xi+1 = xi + αri, i = 0, 1, . . . (6.11)

6.3.2 Conjugate Directions Method

Next thing up before arriving at the CGLS method is to look at the conjugatedirections method. The idea of this method is to choose some A-orthogonalsearch directions, also called conjugate directions, d0,d1, . . . ,dn−1. Two direc-tions are conjugate if dTi Adj = 0. Then demanding that the error-term ei+1 isconjugate to di. When the search directions are conjugate the step length canbe found by

αi =dTi ridTi Adi

. (6.12)

The iterative conjugate direction steps will therefore be

xi+1 = xi + αidi. (6.13)

In the implementation of the conjugate gradient method it is possible to limitthe number of matrix-vector products, by using the following recurrence:

ri+1 = ri − αiAdi. (6.14)

This result will also be used in the next section, where we will finally arrive atthe conjugate gradient method.

To compute the conjugate directions, the conjugate Gram-Schmidt process, GS,can be used, The GS process is simple. Start by choosing n linearly independent

Page 54: Radon Transform in Tomographic Image Reconstruction

46 Algebraic Reconstruction Technique

vectors, uo,u1, . . . ,un−1, and set d0 = u0. Hereafter the conjugated directionscan be found as

di = ui +i−1∑k=0

βikdk, (6.15)

where βik is defined as long as i > k. The values of βik are defined in terms ofthe conjugate gradients and the conjugate directions:

βik = −uTi AdjdTj Adj

. (6.16)

6.3.3 Conjugate Gradient Method

The conjugate gradient method is basically a combination of steepest descentand conjugate gradient methods. Concerning the steepest descent method, itwas seen that putting the search direction equal to the residual would giveconverging iterations. So therefore in the conjugated gradient method the searchdirections will be found by conjugating the residuals. The residual will always beorthogonal to the previous residual, and in fact, also all the previous residuals,so

rTi rj = 0, i 6= j. (6.17)

As seen in (6.14) every residual is a linear combination of the previous residualand search direction. Since di−1 ∈ Di, where Di is the i’th subspace, (6.14)implies that a new subspace Di+1 will be a union of the old subpace Di and thesubspace ADi. This kind of subspace has great properties since it assures that,because the next residual ri+1 will be orthogonal to D, ri+1 will beA-orthogonalto Di. Since the orthogonality is now in place, the conjugate gradient methodcan be stated.

The starting search direction will be set to d0 = r0 = b−Ax0, where x0 is thestarting point. The iterative steps will hereafter be

Page 55: Radon Transform in Tomographic Image Reconstruction

6.4 Reconstruction using the CGLS Method 47

di+1 = ri+1 + βi+1di (6.18)xi+1 = xi + αidi, (6.19)

where the step direction and step length can be found as

αi =rTi ridTi Adi

(6.20)

βi+1 =rTi+1ri+1

rTi ri. (6.21)

The method of conjugate gradients has nice convergence properties. In theoryit will converge in n iterations, but because of rounding errors it will causeproblems. The search directions will not always be A-orthogonal, but it ispossible to reach an approximated solution in a fair computation time.

6.4 Reconstruction using the CGLS Method

After this short introduction to the CGLS method, it is now possible to use itin reconstructing an image. As with the last two reconstruction methods, it isalso the Phantom image that will be reconstructed now.

In the implementation of the CGLS method it is possible to specify the numberof iterations, so the solution can only become as good as the iteration num-ber allows. In figure 6.1 the reconstruction of Phantom is seen along with thesinograms made from the sparse matrix A and the original image. The imple-mentation of the CGLS method is provided by Per Christian Hansen, and thescript, where the matrix A in the linear system of equations is constructed, isalso provided by Per Christian Hansen and modified by Jakob Heide Jørgensen.

Page 56: Radon Transform in Tomographic Image Reconstruction

48 Algebraic Reconstruction Technique

Sinogram from b = A*x

10 20 30 40

20

40

60

80

100

120

140

Noisy sinogram

10 20 30 40

20

40

60

80

100

120

140

Reconstruction without noise

10 20 30 40

10

20

30

40

Reconstruction with noise

10 20 30 40

10

20

30

40

Figure 6.1: Reconstruction with the CGLS method on a 49x49 grid.

Page 57: Radon Transform in Tomographic Image Reconstruction

Chapter 7

Comparison

After working with three different reconstruction methods concerning the sameproblem a logical question to ask is: Which method gives the best results? Inthis section the answer to this question is seeked by comparing the reconstructedimages. Throughout this section the images dealt with will all be 49×49 pixels.This is due to a long compution time, if the image gets larger.

7.1 Comparison of the three reconstruction meth-ods

In the chapters where the different reconstruction methods were described, thePhantom image was reconstructed. The three different reconstructions withoutnoise are showed in figure 7.1. From this figure it is clear that the CGLSmethod is very good at handling an image without noise. It is difficult to seea difference between the reconstruction and the original image. The Radonmethod constructs a blurred version of the image. In the SVD reconstructionit is possible to sense the unit circle, where the singular functions are definedwithin. Besides this the reconstruction is also good, Looking at the Picard plotof this problem, the truncation parameter is found to be close to the maximum,N2, because there is no noise present in the image.

Page 58: Radon Transform in Tomographic Image Reconstruction

50 Comparison

Original, 492 = 2401 pixels

10 20 30 40

10

20

30

40

Radon, 6909 beams

20 40 60 80

20

40

60

80

Reconstruction with SVD

10 20 30 40

10

20

30

40

CGLS, 6909 beams

10 20 30 40

10

20

30

40

Figure 7.1: Reconstruction of the noise-free Phantom image with three differentmethods.

Page 59: Radon Transform in Tomographic Image Reconstruction

7.1 Comparison of the three reconstruction methods 51

Talking about reconstructing an image, it will only make sense to reconstructfrom noisy data, since this will reflect realistic situations. Adding noise tothe sinograms of the Phantom image, the reconstructions are seen in figure 7.2.There are margin differences between the three reconstructed images. It is worthnoticing that the Radon reconstruction seems to give the worst reconstruction.Obviously it is affected by noise. Of the two other reconstructions it seems to bethe SVD, which reconstructs most detailed. Because of the noise the truncationparameter is smaller than before and the unit circle is more distinct, but theresult is still acceptable. When comparing this reconstruction with the one insection 5.11 where the grid is 69 × 69 the difference is huge. In figure 7.2 thereconstruction of the Phantom with noise is significantly worse than in figure5.6 in section 5.11. This is due to the higher amount of pixels. So it is now clearthat when increasing the size of the image, the quality of the reconstruction alsoincreases. It is important to notice, that in figure 5.6 SVD method handles thenoise well. It is in fact impossible to see the difference in the reconstructionswith and without noise. But when using the 69 × 69 grid the computationtime increases significantly. It is therefore important to consider how much thequality improves versus the longer computation time.

The reconstructed image with the CGLS method seems to have reconstructedthe white oval well, but the mass inside this is more blurred than in the re-construction with the SVD. Before concluding anything specific about the threereconstruction methods more comparisons must be made.

At first a simple test image, consisting of three objects, a square, a triangle anda circle with different constant values and a surrounding area with value zero, iscomputed. This geometry ensures that the image both contains sharp edges andsoft lines. It will be interesting to see how each method handles this geometry.The original image and the three reconstructions are seen in figure 7.3. Againthe FBP reconstruction is deficient and significantly worse than the two othermethods. Comparing the last two methods with the results of the Phantomreconstruction, the SVD method is now superior in every way. All the edges inthe SVD image is clear and the truncation parameter is chosen so the noise isnot dominating the image. In the reconstruction of the objects with CGLS thenoise is present.

The last testing image consists of circles in different sizes and values. Theconstruction of this image is to investigate the three methods’ way to handlesmall objects. The reconstructions are seen in figure 7.4.

Again the SVD method is the best - in fact this time it is very good. It recon-structs the big white circle almost precisely. It also reconstructs the smallestcircle, which disappears in the two other reconstructions because of the noise.It is worth pointing out that the truncation parameter is higher now than when

Page 60: Radon Transform in Tomographic Image Reconstruction

52 Comparison

Original, 492 = 2401 pixels

10 20 30 40

10

20

30

40

FBP, 6909 beams

20 40 60 80

20

40

60

80

Reconstruction with SVD

10 20 30 40

10

20

30

40

CGLS, 6909 beams

10 20 30 40

10

20

30

40

Figure 7.2: Reconstruction of the Phantom image with three different methods.

Page 61: Radon Transform in Tomographic Image Reconstruction

7.1 Comparison of the three reconstruction methods 53

Original, 492 = 2401 pixels

10 20 30 40

10

20

30

40

FBP, 6909 beams

20 40 60 80

20

40

60

80

Reconstruction with SVD

10 20 30 40

10

20

30

40

CGLS, 6909 beams

10 20 30 40

10

20

30

40

Figure 7.3: Reconstruction of the image with different figures using three dif-ferent methods.

Page 62: Radon Transform in Tomographic Image Reconstruction

54 Comparison

Original, 492 = 2401 pixels

10 20 30 40

10

20

30

40

FBP, 6909 beams

20 40 60 80

20

40

60

80

Reconstruction with SVD

10 20 30 40

10

20

30

40

CGLS, 6909 beams

10 20 30 40

10

20

30

40

Figure 7.4: Reconstruction of the images with circles using three different meth-ods.

Page 63: Radon Transform in Tomographic Image Reconstruction

7.1 Comparison of the three reconstruction methods 55

reconstructing the two previous images. This can be explained by the symme-try in the image. Because of the computer accuracy a lot of the inner products’land’ on values close to 10−16. If it had been possible to calculate the ex-act values they would have been zero. This means that the fraction in (5.51)will have several values very close to zero. When more terms are included thesingular functions vm,k will have a lot of oscillations, and that is close to thehigh-frequency noise. But since some of the terms will be close to zero, theimage will be less dominated by noise.

Another way to compare the three different methods is to look at the relativeerror for each image and compare them. But the implementation of built-inMATLAB function iradon does not reconstruct a N ×N image, so the relativeerror for this method cannot be computed. Besides this it can be concluded afterjust a quick look at the reconstructions that this method is always deficient. Butfor the two other methods the relative errors can be found. These are listed intable 7.1. As seen in the reconstructed images the relative errors show that thebest results for these three images is found by using the SVD method. Therelative error is found by both the Frobenius norm and a variant of this. Therelative error using the Frobenius norm is defined as:

rF =‖Xexact −Xrec‖F‖Xexact‖F

(7.1)

The other way of finding the relative error is defined as

rµF =‖Xexact −Xrec‖µF‖Xexact‖µF

, (7.2)

where

‖X‖µF = ‖X − µones‖F . (7.3)

The constant µ is defined as the mean value of the elements in X. By sub-stracting the mean from the elements in X it will give a more consistent normevaluation.

In table 7.1 it is seen that for all three images the relative error is smaller forthe SVD reconstructions than for the CGLS. Especially the relative error forthe image with circles is significantly small. This is consistent with the goodreconstruction from figure 7.4.

Page 64: Radon Transform in Tomographic Image Reconstruction

56 Comparison

Image Method Relative error with ‖ · ‖F Relative error with ‖ · ‖µFPhantom SVD 0.3831 0.4393Phantom CGLS 0.4449 0.5101Objects SVD 0.1019 0.1117Objects CGLS 0.4356 0.4775Circles SVD 0.0443 0.0454Circles CGLS 0.3364 0.3446

Table 7.1: Relative errors for SVD and CGLS method.

To summarize the CGLS method seems to be reconstructing very well, whenthe image is noise-free, but it is easily affected by noise. Still it is a good re-constructing method and obviously better than the built-in MATLAB functioniradon. This observation can cause curiosity, since the FBP method is com-monly used. The results have just showed that the FBP method is actually theworst in all cases. The reconstructions showed that the numerical SVD methodwill be preferable. Though using the this method it is important to take thecomputation time into account. The way this method is implemented makes itdifficult for the method to handle larger images, since the stored operator matrixhas the dimension N2×N2. Besides this the computation time for constructingthe operator matrix grows rapidly as the image size increases.

If it had been possible to sample the singular functions from the analyticalexpressions the reconstructions would have been similar to the ones achievedwith the numerical method. But then it would not be necessary to computethe large operator matrix and store it. This could imply a shorter computationtime. This time aspect is also a good comparison factor, and since it is notpossible to find the running time for the SVE, counting flops - floating pointoperations - is a good replacement.

When the truncation parameter M is set to a specific value, the sum in (5.51)will contain 1

2M2 + 3

2M + 1 terms. In a simple implementation, for examplesee appendix E, all singular functions will therefore be evaluated this manytimes. The evaluations of the singular values and the Chebyshev polynomialswill only happen M times. In the simple implementation the Jacobi polynomialis evaluated each time in a for-loop. This means that the same polynomialwill be evaluated several times. An improvement could be to evaluate all thedifferent polynomials before the for-loops and store these in an array.

In table 7.2 the distribution of flops are seen for an image of size N ×N .

The flop count shows that if this method should be implemented for practicaluses, it would be an advantage to always reconstruct on the same grid. Then

Page 65: Radon Transform in Tomographic Image Reconstruction

7.1 Comparison of the three reconstruction methods 57

# evaluationsSimple arithmetic operations 5N2M + (13N2 − 1) ·

(12M

2 + 32M + 1

)Complicated operations 6N2M + 5N2 ·

(12M

2 + 32M + 1

)Evaluating the Jacobi polynomial 4N2 ·

(12M

2 + 32M + 1

)2Table 7.2: Flop count for the analytical SVE of the Radon transform.

the singular functions could be calculated in advance and stored, ready for use.Otherwise the computation time for a large image will be too long, and themethod will be useless.

Page 66: Radon Transform in Tomographic Image Reconstruction

58 Comparison

Page 67: Radon Transform in Tomographic Image Reconstruction

Chapter 8

Conclusion

Working with the three different methods for reconstructing images showedthat a wide mathematical literacy is necessary to accomplish a thorough un-derstanding. To understand the methods good analytical skills are required,but an important ability is also being able to convert the theory into numericalmathematics and finallly into practice.

The filtered backprojection method showed that it was important to includea filter when solving the inverse problem. Otherwise the noise in the datawould be amplified and result in poor reconstructions. Due to this project’stime limit it was not possible to implement the FBP method ourselves so whenreconstructing the built-in MATLAB function iradon was used. By using aappropriate filter this method lead to acceptable reconstructions.

Although the SVE reconstruction method caused some problems, in the endsome good results came out. It is important to point out that even thoughthe reconstructions are based on numerically found singular functions, the sameresults would have been achieved if it had been possible to find the correctanalytical expressions of the singular functions. It was possible to find goodtruncation parameters from the Picard plots and therefore the reconstructionsof different images were acceptable, and with very little noise affecting them. Infact they were better than the reconstructions with the FBP method. The SVDmethod has one big disadvantage; it is very time consuming when the image size

Page 68: Radon Transform in Tomographic Image Reconstruction

60 Conclusion

exceeds around 2500 pixels. A way to avoid the long compuation time would beto have sampled values of the singular functions stored along with the singularvalues. Thus it is then necessary to reconstruct on the same image size everytime.

Finally the reconstructions made from the linear system of equations and eval-uated with the CGLS method was reviewed. The formulation of the inverseproblem was almost identical to the formulation of the Radon transform, butstill had some differences. If the project had had a longer duration the imple-mentation for creating the sparse matrix of the linear system and the CGLSmethod would have been carried out. As it is the case with the SVD, wheresingular functions and values could be stored to decrease the computation time,the sparse matrix of this problem can also be stored if the same grid is usedat every reconstruction. This will improve the computation time of the CGLSmethod radically. The comparison with the reconstructions from the two othermethods showed that it was better than the iradon function and almost on thesame level as the SVD method.

In the comparison focus was on the quality of the reconstructed images. Anotheraspect when comparing methods which was slighty discussed is the computationtime. This aspect is crucial when the methods have to be used in practice, forexample in the reconstruction of a CT scan at a hospital. The computationtime is highly dependent on the implementation of the methods. If it had beenpossible to implement the theory in chapter 5, it might had been able to competewith the FBP on this aspect. It surgently beats the FBP concerning the qualityof the reconstructed image. So both the SVE/SVD and the CGLS method beatsthe FBP method in quality, and as described simple modifications can be madeto make the SVE/SVD and CGLS faster reconstruction methods. This fact isnot widely known since the FBP method is the most common reconstructionmethod.

During the project some unexpected problems arose. This has given an insightin how to trouble shoot. Furthermore it has given another approach to relateto the literature. Learning that everything written is not always correct andmight has to be modified, resulted in a whole new way of thinking. This ofcourse caused a lot of time and frustration, but that is also a part of a learningprocess.

Page 69: Radon Transform in Tomographic Image Reconstruction

Appendix A

Sinograms

1 % Sinograms2

3 % Making a 256x256 matrix, where only one pixel is non-zero:4

5 X = zeros(256);6 X(100,100) = 255;7

8 figure(1)9 subplot(2,2,1)

10 imagesc(X), colormap(gray), title(’Single Object’), axis square11 xlabel(’x_1’), ylabel(’x_2’)12

13 theta = 0:359;14 Y = radon(X,theta);15

16 subplot(2,2,2)17 imagesc(Y), colormap(gray), xlabel(’phi’), ylabel(’s’), axis square18 title(’Sinogram of the single object’);19

20 % Using the Phantom-image to see more sinograms in one image21

22 X = phantom(256);

Page 70: Radon Transform in Tomographic Image Reconstruction

62 Sinograms

23

24 subplot(2,2,3)25 imagesc(X), colormap(gray), title(’Phantom’), axis square26 xlabel(’x_1’), ylabel(’x_2’)27

28 Y = radon(X,theta);29

30 subplot(2,2,4)31 imagesc(Y), colormap(gray), xlabel(’phi’,’LineWidth’,5), axis square32 ylabel(’s’), title(’Sinogram of Phantom’);

Page 71: Radon Transform in Tomographic Image Reconstruction

Appendix B

FBP

B.1 FBP Reconstruction

1 % Script to investigate the iradon method in Matlab2 % and make reconstructions with it.3

4 close all5

6 %Degree interval7 theta = 1:180;8

9 %Size of image10 N = 256;11

12 %Original image13 X = phantom(N);14

15 %Radon transform of image16 W = radon(X,theta);17

18 %Making a noisy image19 Wnoisy = W + 3*randn(size(W));

Page 72: Radon Transform in Tomographic Image Reconstruction

64 FBP

20

21 %Reconstrucion without filter22 Xrec = iradon(W,theta,’linear’,’none’,N); % regular reconstruction23 Xnoisyrec = iradon(Wnoisy,theta,’linear’, ’none’,N); %noisy reconstruction24

25 %Displaying sinograms and reconstructed images26 figure(1)27 imagesc(X), colormap(’gray’)28 figure(2)29 subplot(2,2,1)30 imagesc(W), colormap(’gray’), title(’Sinogram without noise’)31 xlabel(’Phi’), ylabel(’s’), axis square32 subplot(2,2,2)33 imagesc(Wnoisy), colormap(’gray’), title(’Sinogram with noise’)34 xlabel(’Phi’), ylabel(’s’), axis square35

36 %Regular reconstruction37 Xfil = iradon(W,theta,N);38 %Noisy reconstruction39 Xnoisyfil = iradon(Wnoisy,theta,N);40

41 subplot(2,2,3)42 imagesc(Xfil), colormap(’gray’), title(’Rec. without noise’)43 axis square, xlabel(’x_1’), ylabel(’x_2’)44 subplot(2,2,4)45 imagesc(Xnoisyfil), colormap(’gray’), title(’Rec. with noise’)46 axis square, xlabel(’x_1’), ylabel(’x_2’)47

48 figure(3)49 Xfilt = iradon(Wnoisy,theta,’Hamming’,N);50 Xfilt2 = iradon(Wnoisy,theta,’Hann’,N);51 Xfilt3 = iradon(Wnoisy,theta,’Cosine’,N);52 subplot(2,2,1)53 imagesc(Xnoisyfil), colormap(’gray’),title(’No filter’), axis square54 xlabel(’x_1’), ylabel(’x_2’)55 subplot(2,2,2)56 imagesc(Xfilt), colormap(’gray’),title(’Hamming filter’), axis square57 xlabel(’x_1’), ylabel(’x_2’)58 subplot(2,2,3)59 imagesc(Xfilt2), colormap(’gray’),title(’Hann filter’), axis square60 xlabel(’x_1’), ylabel(’x_2’)61 subplot(2,2,4)62 xlabel(’x_1’), ylabel(’x_2’)63 imagesc(Xfilt3), colormap(’gray’),title(’Cosine filter’), axis square

Page 73: Radon Transform in Tomographic Image Reconstruction

Appendix C

Singular functions

C.1 Control of the Singular Functions

1 clear2 N = 29; % Preferably odd.3

4 dx = 2/(N);5 x = (-1+dx/2):dx:(1-dx/2); %Defining the grid6 [X1, X2] = meshgrid(x);7

8 %Defining the unit circle9 absx = sqrt(X1.^2+X2.^2);

10 J = find(absx <= 1);11 F= zeros(N);12 F(J) = 1;13

14 phi = ((1:N)-0.5)*360/N;15

16 %Initialisation17 A = zeros(N^2);18 I = 0;19 %Constructing the A matrix

Page 74: Radon Transform in Tomographic Image Reconstruction

66 Singular functions

20 for i=1:N21 for j=1:N22 I = I+1;23 FF = zeros(N);24 FF(i,j) = F(i,j);25 [GG,s] = radon(FF,phi);26 p = size(GG,1);27 GG = GG((p-N)/2+1:(p+N)/2,:);28 g = GG(:);29 A(:,I) = g;30 end31 end32

33 [U,S,V] = svd(A);34

35 q = 4;36 %Plotting the singular functions V_m,k and U_m,k37 figure(1)38 for i=1:639 subplot(2,3,i)40 imagesc(reshape(V(:,i),N,N)), title(’V_m,k’ ),colormap jet, axis image41 end42

43 figure(2)44 for i=1:645 subplot(2,3,i)46 imagesc(reshape(U(:,i),N,N)), title(’U_m,k’), colormap jet, axis image47 end48

49 %Plotting the singular values50 figure(3)51 s = diag(S);52 plot(s(1:q^2),’o’), title(’\sigma_m’)

Page 75: Radon Transform in Tomographic Image Reconstruction

Appendix D

Picard Condition

D.1 Picard Plots from Noise-free Data

1 % Picard plot with numerically found singular functions and values.2

3

4 clear all5 close all6 N = 49; % Preferably odd.7

8 %F = phantom(N);9 %F = fspecial(’disk’,(N-1)/2);

10 dx = 2/(N);11 x = (-1+dx/2):dx:(1-dx/2);12 [X1, X2] = meshgrid(x);13

14 %Defining the unit circle15 absx = sqrt(X1.^2+X2.^2);16 %The first circle17 J = find(absx <= 1);18 F= zeros(N);19 F(J) = 1;

Page 76: Radon Transform in Tomographic Image Reconstruction

68 Picard Condition

20

21 phi = ((1:N)-0.5)*360/N;22 [G,s] = radon(F,phi);23 p = size(G,1);24 G = G((p-N)/2+1:(p+N)/2,:);25 [P Q] = size(G);26

27 A = zeros(N^2);28 I = 0;29 for i=1:N30 for j=1:N31 I = I+1;32 FF = zeros(N);33 FF(i,j) = F(i,j);34 [GG,s] = radon(FF,phi);35 p = size(GG,1);36 GG = GG((p-N)/2+1:(p+N)/2,:);37 g = GG(:);38 A(:,I) = g;39 end40 end41

42

43 %Finding the singular functions and values from the SVD44 [U,S,V] = svd(A);45

46 %Non-symmetric image47 F = zeros(N);48 PF = fspecial(’disk’, 3)49 F(3:9, 4:10) = PF;50 %Sinogram of the non-symmetric image.51 G = radon(F, phi);52 G = G((p-N)/2+1:(p+N)/2,:);53

54 counter = 0;55 maxcounter = ((N+1)*(N+2))/2;56 h = waitbar(0,’Please wait’);57

58 for i = 1:N^259 s(i) = S(i,i);60 Umk = reshape(U(:,i), P, Q);61 ipUg(i) = Umk(:)’*G(:);62 counter = counter+1;63 waitbar(counter/maxcounter, h);

Page 77: Radon Transform in Tomographic Image Reconstruction

D.2 Picard Plots from Noisy Data 69

64 end65

66 close(h);67

68 close all69 figure(1)70 semilogy(s(1:1300), ’rd’)71 hold on72 semilogy(abs(ipUg(1:1300)), ’bp’)73 ratio = ipUg’./s;74 semilogy(ratio(1:1300), ’g^’)75 axis tight76 legend(’\mu_m’, ’\langle u_mk , g \rangle’, ’\langle u_mk , g \rangle / \mu_m’)77 title(’Picard plot without noise’)

D.2 Picard Plots from Noisy Data

1 % Picard plot with numerically found singular functions and values.2

3 clc4 clear all5 close all6 N = 21; % Preferably odd.7

8 dx = 2/(N);9 x = (-1+dx/2):dx:(1-dx/2);

10 [X1, X2] = meshgrid(x);11

12 % Defining the unit circle13 absx = sqrt(X1.^2+X2.^2);14

15 % The first circle16 J = find(absx <= 1);17 F= zeros(N);18 F(J) = 1;19

20 % Defining the phi-axis21 phi = ((1:N)-0.5)*360/N;22

23 %Initialisation24 A = zeros(N^2);

Page 78: Radon Transform in Tomographic Image Reconstruction

70 Picard Condition

25 I = 0;26

27 for i=1:N28 for j=1:N29 I = I+1;30 FF = zeros(N);31 FF(i,j) = F(i,j);32 [GG,s] = radon(FF,phi);33 p = size(GG,1);34 GG = GG((p-N)/2+1:(p+N)/2,:); %cropping the image35 g = GG(:);36 A(:,I) = g;37 end38 end39

40

41 %Finding the singular functions and values from the SVD42 [U,S,V] = svd(A);43

44 %Non-symmetric image45 % F = zeros(N);46 % PF = fspecial(’disk’, 3)47 % F(3:9, 4:10) = PF;48

49 F = phantom(N);50

51 %Sinogram of the non-symmetric image.52 G = radon(F, phi);53 G = G((p-N)/2+1:(p+N)/2,:);54

55 % Adding noise to the sinogram56 G = G + randn(P,Q);57

58 counter = 0;59 maxcounter = ((N+1)*(N+2))/2;60 h = waitbar(0,’Please wait’);61

62 %Construction the inner products63 for i = 1:N^264 s(i) = S(i,i);65 Umk = reshape(U(:,i), P, Q);66 ipUg(i) = Umk(:)’*G(:);67 counter = counter+1;68 waitbar(counter/maxcounter, h);

Page 79: Radon Transform in Tomographic Image Reconstruction

D.2 Picard Plots from Noisy Data 71

69 end70

71 close(h);72

73 %Making the Picard plots74 close all75 figure(1)76 semilogy(s(1:end), ’rd’)77 hold on78 semilogy(abs(ipUg(1:end)), ’bp’)79 ratio = ipUg’./s;80 semilogy(ratio(1:end), ’g^’)81 axis tight82 legend(’\mu_m’, ’\langle u_mk , g \rangle’, ’\langle u_mk , g \rangle / \mu_m’)83 title(’Picard plot with noise’)

Page 80: Radon Transform in Tomographic Image Reconstruction

72 Picard Condition

Page 81: Radon Transform in Tomographic Image Reconstruction

Appendix E

Reconstruction usingSVE/SVD

E.1 Jacobi Polynomial

1 function P = jacobi_gamma(n, alpha, beta, X)2 %This functions returns P as a matrix of the n’th Jacobi Polynomial.3 %n is the degree of the Jacobi Polynomial4 %alpha and beta are constants5 %X is a matrix6

7 %Initization8 c1 = alpha + beta + n +1 ;9 c2 = alpha + n + 1;

10 constant = gamma(c2)/(factorial(n)*gamma(c1));11

12 P = zeros(size(X));13

14 for m = 0:n15 c3 = factorial(n)/(factorial(m)*factorial(n-m)); % Binomial cofficient16 c4 = alpha + beta + n + m + 1;17 c5 = alpha + m + 1;

Page 82: Radon Transform in Tomographic Image Reconstruction

74 Reconstruction using SVE/SVD

18

19 P = P + c3*gamma(c4)/gamma(c5)*(0.5*(X-1)).^m;20 end21

22 P = P*constant;

E.2 Analytical Reconstruction

1 %Script to reconstruct the image phantom from the knowledge of the SVD of2 %the Radon transform.3

4 close all5 clear all6

7 N = 256;8

9 %Loading the image:10 F = phantom(N);11

12 %Defining the x-axes13 %x = linspace(-1,1,N);14 dx = 2/N;15 x = (-1+dx/2):dx:(1-dx/2);16 [X1, X2] = meshgrid(x);17

18 %Defining the unit circle where the SVE is defined within19 absx = sqrt(X1.^2+X2.^2);20 phix = atan2(X2,X1);21 I = find(absx >1);22

23 F(I) = 0;24

25 figure(1)26 imagesc(F), colormap(gray)27

28 %Making the sinogram with the Radon transform29 theta = linspace(0,359,N);30 [G, sradon] = radon(F,theta);31

32 % Cropping the sinogram, so abs(s) <= 1. This means that the sinogram33 % is of dimension NxN.

Page 83: Radon Transform in Tomographic Image Reconstruction

E.2 Analytical Reconstruction 75

34 p = size(G,1);35 G = G((p-N)/2+1:(p+N)/2,:);36

37 %Displaying the sinogram38 figure(2)39 imagesc(G), colorbar40

41 %Defining the s- and phi-axis42 ds = 2/N;43 s = -1+ds/2:ds:1-ds/2;44 ds = s(2)-s(1);45

46 phi = theta*pi/180;47 dphi = phi(3)-phi(2);48

49 [Phi, S] = meshgrid(phi,s);50

51 %Initialization52 Innersum = zeros(N);53 Frec = zeros(N);54

55 const1 = 1/pi;56 const3 = 1/sqrt(2*pi);57

58 Jinput = 2*absx.^2-1; %argument to jacobi_poly59 alpha = 0; %alpha argument to the jacobi_poly function60 counter = 0;61

62 M = 50; %truncation parameter63

64 %waitbar65 maxcounter = ((M+1)*(M+2))/2;66 h = waitbar(0,’Please wait’);67

68 for m = 0:M69 %Defining the singular values70 sigma = sqrt(4*pi/(m+1));71

72 %Calculating the weight function times the Chebyshev polynomials for73 %the u_m,k-functions74 wUm = (1-S.^2).^(0.25) .* sin((m+1)*acos(S)) ./ sin(acos(S));75

76 %Calculating the constant for the v-functions77 const2 = (2*m+2)^0.5;

Page 84: Radon Transform in Tomographic Image Reconstruction

76 Reconstruction using SVE/SVD

78

79 for k=0:m80 %the singular functions u_m,k are found81

82 nok = m-2*k;83 if nok>=084 Yu = const1*cos((m-2*k)*Phi);85 else86 Yu =const1*sin((m-2*k)*Phi);87 end88

89 %Evaluating the singular functions u_m,k90 Umk = wUm.*Yu;91

92 integralU = ds*dphi*norm(Umk, ’fro’)^2;93 Umk = Umk/sqrt(integralU);94 ipUg = ds*dphi*Umk(:)’*G(:);95

96 %The singular functions v_m,k are found97

98 beta = abs(m-2*k); %beta argument to the jacobi_poly function99 n = 0.5*(m+beta); %degree of jacobi polynomial

100

101 Pmk = jacobi_polynomial(n,alpha, beta, Jinput);102 Qmk = absx.^beta.*Pmk;103

104 Qmk(I) = 0;105

106 nok = m-2*k;107 if nok>=0108 Yv =const3*cos((m-2*k)*phix);109 else110 Yv =const3*sin((m-2*k)*phix);111 end112

113 %Evaluating the singular functions v_m,k114 Vmk = const2*Qmk.*Yv;115 Vmk(I) = 0;116

117 IntegralV = dx^2*norm(Vmk,’fro’)^2;118 Vmk = Vmk/sqrt(IntegralV);119

120 Innersum = Innersum + ipUg*Vmk;121

Page 85: Radon Transform in Tomographic Image Reconstruction

E.3 Numerical Reconstruction 77

122 counter = counter + 1;123 waitbar(counter/maxcounter,h);124 end125

126 Frec = Frec + Innersum*(1/sigma);127 end128

129 close(h);130

131 figure(3)132 imagesc(Frec1), colormap(’gray’), axis image, colorbar133 title(’Rec. with singular values’)

E.3 Numerical Reconstruction

1 % Reconstruction of the Phantom image, based on numerically found singular2 % values and functions.3

4 clear5 N = 69; % Preferably odd.6

7 %F = fspecial(’disk’,(N-1)/2);8 dx = 2/(N);9 x = (-1+dx/2):dx:(1-dx/2);

10 [X1, X2] = meshgrid(x);11

12 %Defining the unit circle13 absx = sqrt(X1.^2+X2.^2);14 %The first circle15 J = find(absx <= 1);16 F = zeros(N);17 F(J) = 1;18

19 %Defining the axis of the angles.20 phi = ((1:N)-0.5)*360/N;21

22 %Initialization23 A = zeros(N^2);24 I = 0;25

26 %for loop: for every pixel in F, do the radon transform.

Page 86: Radon Transform in Tomographic Image Reconstruction

78 Reconstruction using SVE/SVD

27 for i=1:N28 for j=1:N29 I = I+1; %Counter30 FF = zeros(N);31 FF(i,j) = F(i,j);32 [GG,s] = radon(FF,phi);33 p = size(GG,1);34 GG = GG((p-N)/2+1:(p+N)/2,:);35 g = GG(:); % vec(GG)36

37 A(:,I) = g; %Defining the matrix A, as a data set in each column.38 end39 end40

41 %SVD of A, the data matrix! A is sparse42 [U,S,V] = svd(A);43

44 %The singular values are found from the diagonal matrix.45 for i = 1:N^246 s(i) = S(i,i);47 end48

49 %Image to reconstruct:50

51 F = phantom(N);52

53 %Doing the Radon transform of this image.54

55 [G,st] = radon(F,phi);56 p = size(G,1);57 G = G((p-N)/2+1:(p+N)/2,:);58

59 %Defining the grid size of the U_m,k functions.60 [P Q] = size(G);61

62 %Putting noise on the picture.63 nlevel = 0.11;64 e = nlevel*randn(size(G));65 e = e/norm(e);66

67 Gnoise = G + e;68

69 %Initialization before reconstruction.70 Frec = zeros(N);

Page 87: Radon Transform in Tomographic Image Reconstruction

E.3 Numerical Reconstruction 79

71 Frecnoise = Frec;72

73 counter = 0;74 maxcounter = ((N+1)*(N+2))/2;75 h = waitbar(0,’Please wait’);76

77 %Reconstructing with noise78 for l = 1:255679 %Singular functions u_m,k80 Umk = reshape(U(:,l),P,Q);81

82 %Singular functions v_m,k83 Vmk = reshape(V(:,l),N,N);84

85 %Inner product between u_m,k and g.86 %ipUg = Umk(:)’*G(:);87 ipUgnoise = Umk(:)’*Gnoise(:);88

89 %Summing up the images90 %Frec = Frec + (ipUg/s(l))*Vmk;91 Frecnoise = Frecnoise + (ipUgnoise/s(l))*Vmk;92

93 %Waitbar94 counter = counter + 1;95 waitbar(counter/maxcounter,h);96 end97

98 close(h);99

100 %Initialasation101 counter = 0;102 maxcounter = ((N+1)*(N+2))/2;103 h = waitbar(0,’Please wait’);104

105 %Reconstructing without noise106 for l = 1:2850107 %Singular functions u_m,k108 Umk = reshape(U(:,l),P,Q);109

110 %Singular functions v_m,k111 Vmk = reshape(V(:,l),N,N);112

113 %Inner product between u_m,k and g.114 ipUg = Umk(:)’*G(:);

Page 88: Radon Transform in Tomographic Image Reconstruction

80 Reconstruction using SVE/SVD

115

116 %Summing up the images117 Frec = Frec + (ipUg/s(l))*Vmk;118

119 %Waitbar120 counter = counter + 1;121 waitbar(counter/maxcounter,h);122 end123

124 close(h);125

126

127 % %The two fractions of the reconstructions128 % ratio = ipUg’./s;129 % rationoise = ipUgnoise’./s;130 %131 % figure(1)132 % semilogy(s, ’g^’)133 % hold on134 % semilogy(ipUg, ’ro’)135 % semilogy(ratio, ’bs’)136 % legend(’\mu_m’,’\langle u_m,k, g \rangle’,’\langle u_m,k, g \rangle/ \mu_m’)137 %138 % figure(2)139 % semilogy(s, ’g^’)140 % hold on141 % semilogy(ipUgnoise, ’ro’)142 % semilogy(rationoise, ’bs’)143 % legend(’\mu_m’,’\langle u_m,k, g \rangle’,’\langle u_m,k, g \rangle/ \mu_m’)144

145 %Turning and flipping the image146 Frec = imrot90(Frec,3);147 Frec = fliplr(Frec);148

149 Frecnoise = imrot90(Frecnoise, 3);150 Frecnoise = fliplr(Frecnoise);151

152 %displaying the solutions153 figure(1)154 subplot(2,2,1)155 imagesc(G), title(’Sinogram without noise’), axis square, colormap gray156

157 subplot(2,2,2)158 imagesc(Gnoise), title(’Sinogram with noise’), axis square

Page 89: Radon Transform in Tomographic Image Reconstruction

E.3 Numerical Reconstruction 81

159

160 subplot(2,2,3)161 imagesc(Frec), title(’Reconstruction without noise’), axis square162

163 subplot(2,2,4)164 imagesc(Frecnoise), title(’Reconstruction with noise’), axis square165

Page 90: Radon Transform in Tomographic Image Reconstruction

82 Reconstruction using SVE/SVD

Page 91: Radon Transform in Tomographic Image Reconstruction

Appendix F

ART Method

F.1 Function to find the sparse matrix

1 function [A,b,x] = tomoP2(N, numAngles, delta, isDisp)2 %TOMO Create a 2D tomography test problem3 %4 % [A,b,x] = tomoP2(N, numAngles, delta, isDisp);5 %6 % This function creates a simple two-dimensional tomography test problem.7 % A 2D domain [0,N] x [0,N] is divided into N^2 cells of unit size, and8 % parallel rays are sent through the domain at each of the numAngles9 % regulary spaced angles. N must be an odd integer. The distance between

10 % two rays is specified by delta. Must be 1, 1/2, 1/3, 1/4, ...11 % The default value 1. If isDisp is non-zero it specifies the number of12 % seconds to pause in the display of the rays. If zero (the default),13 % no display is shown.14 %15 % Each cell is assigned a value (stored in the vector x), and for each16 % ray the corresponding element in the right-hand side b is the line17 % integral along the ray, i.e.18 % sum_cells in ray x_cell j * length_cell j19 % where length_cell j is the length of the ray in the j-th cell.

Page 92: Radon Transform in Tomographic Image Reconstruction

84 ART Method

20 %21 % The matrix A is sparse, and each row (corresponding to a ray) holds22 % the value length_cell j in the j-th position. Hence:23 % b = A*x .24 % Once a solution x_reg has been computed, it can be visualized by means25 % of imagesc(reshape(x_reg,N,N)).26 %27 % The exact solution, reshape(x,N,N), is identical to the exact image in28 % the function blur.29

30 % Per Christian Hansen, IMM, DTU; March 22, 2007.31 % Modified by Jakob Heide Jorgensen, IMM, DTU, Feb 23, 2009.32

33 % Default values.34 if nargin < 4, isDisp = false; end35 if nargin < 3, delta = 1; end36

37 % Prepare for loop over rows (i.e., rays).38 x = (0:N)’; y = x;39

40 % Width of the rays in one direction. Wide enough to go through all pixels41 % along the diagonal. c is an array of constant shifts for generating the42 % parallel rays.43 width = 2*ceil(norm([N,N]-floor(([N,N]-1)/2)-1))+3;44 c = -floor(width/2):delta:floor(width/2);45 numRays = length(c);46

47 % Allocate space for sparse matrix.48 A = spalloc(numRays*numAngles,N^2,2*N*numRays*numAngles);49

50 % Create matrix AA for display of rays51 if isDisp52 AA = randn(N);53 figure54 end55

56 % Loop over all angles.57 for k=1:numAngles58

59 % Current projection angle60 thetak = (k-1)*pi/numAngles;61

62 % Display the AA matrix63 if isDisp

Page 93: Radon Transform in Tomographic Image Reconstruction

F.1 Function to find the sparse matrix 85

64 pause65 clf66 imagesc(0.5:N-0.5,0.5:N-0.5,AA)67 colormap gray68 axis square69 axis([(N-width)/2,N+(width-N)/2,(N-width)/2,N+(width-N)/2])70 hold on71 end72

73 % For each angle loop over all rays74 for l=1:numRays75 % Use parametrisation of line to get y-coordinates of intersections76 % with vertical pixel boundaries77 tt = ( x - N/2 - 0.5*cos(thetak) + c(l)*sin(thetak) ) / cos(thetak);78 yp = (0.5 + tt)*sin(thetak) + N/2 + c(l)*cos(thetak);79

80 % Use parametrisation of line to get x-coordinates of intersections81 % with horizontal pixel boundaries82 tt = ( y - N/2 - 0.5*sin(thetak) - c(l)*cos(thetak) ) / sin(thetak);83 xp = (0.5 + tt)*cos(thetak) + N/2 - c(l)*sin(thetak);84

85 % Display the ray86 if isDisp87 plot(x,yp,’-or’)88 plot(xp,y,’-or’)89 title([’c = ’,num2str(c)])90 pause(isDisp)91 end92

93 % Collect all intersection coordinates94 xp = [x;xp];95 yp = [yp;y];96

97 % Sort them, and skip those outside the box.98 [xp,I] = sort(xp);99 yp = yp(I);

100 I = find(xp >= 0 & xp <= N & yp >= 0 & yp <= N);101 xp = xp(I);102 yp = yp(I);103

104 % Skip double points. ??? WHY IS THIS NECESSARY ???105 %I = find(diff(xp)==0);106 %xp(I) = []; yp(I) = [];107

Page 94: Radon Transform in Tomographic Image Reconstruction

86 ART Method

108 % Lengths within cells.109 d = sqrt( diff(xp).^2 + diff(yp).^2 );110

111 % Column indices to cells penetrated by the ray.112 xm = 0.5*(xp(1:end-1)+xp(2:end));113 ym = 0.5*(yp(1:end-1)+yp(2:end));114

115 % Handle index larger than N^2, which come from vertical or116 % horizontal rays precisely ON the right or lower boundary of the117 % image.118 j = ( floor(xm) )*N + floor(ym) + 1;119 d = d(j<=N^2);120 j = j(j<=N^2);121

122 % Store lengths in (k-1)*numRays+l-th row.123 A((k-1)*numRays+l,j) = d’;124

125 end126

127 end128

129 if nargout>1130

131 % Start with an image of all zeros.132 x = zeros(N,N);133 N2 = round(N/2);134 N3= round(N/3);135 N6 = round(N/6);136 N12 = round(N/12);137

138 % Add a large ellipse.139 T = zeros(N6,N3);140 for i=1:N6141 for j=1:N3142 if ( (i/N6)^2 + (j/N3)^2 < 1 ), T(i,j) = 1; end143 end144 end145 T = [fliplr(T),T];146 T = [flipud(T);T];147 x(2+(1:2*N6),N3-1+(1:2*N3)) = T;148

149 % Add a smaller ellipse.150 T = zeros(N6,N3);151 for i=1:N6

Page 95: Radon Transform in Tomographic Image Reconstruction

F.2 CGLS function from the Tools programme package. 87

152 for j=1:N3153 if ( (i/N6)^2 + (j/N3)^2 < 0.6 ), T(i,j) = 1; end154 end155 end156 T = [fliplr(T),T];157 T = [flipud(T);T];158 x(N6+(1:2*N6),N3-1+(1:2*N3)) = x(N6+(1:2*N6),N3-1+(1:2*N3)) + 2*T;159 % Correct for overlap.160 f = find(x==3);161 x(f) = 2*ones(size(f));162

163 % Add a triangle.164 T = triu(ones(N3,N3));165 [mT,nT] = size(T);166 x(N3+N12+(1:nT),1+(1:mT)) = 3*T;167

168 % Add a cross.169 T = zeros(2*N6+1,2*N6+1);170 [mT,nT] = size(T);171 T(N6+1,1:nT) = ones(1,nT);172 T(1:mT,N6+1) = ones(mT,1);173 x(N2+N12+(1:mT),N2+(1:nT)) = 4*T;174

175 % Make sure x is N-times-N, and stack the columns of x.176 x = reshape(x(1:N,1:N),N^2,1);177

178 end179

180 if nargout==3, b = A*x; end

F.2 CGLS function from the Tools programmepackage.

1 function [X,rho,eta,F] = cgls(A,b,k,reorth,s)2 %CGLS Conjugate gradient algorithm applied implicitly to the normal equations.3 %4 % [X,rho,eta,F] = cgls(A,b,k,reorth,s)5 %6 % Performs k steps of the conjugate gradient algorithm applied7 % implicitly to the normal equations A’*A*x = A’*b.8 %

Page 96: Radon Transform in Tomographic Image Reconstruction

88 ART Method

9 % The routine returns all k solutions, stored as columns of10 % the matrix X. The corresponding solution and residual norms11 % are returned in the vectors eta and rho, respectively.12 %13 % If the singular values s are also provided, cgls computes the14 % filter factors associated with each step and stores them15 % columnwise in the matrix F.16 %17 % Reorthogonalization of the normal equation residual vectors18 % A’*(A*X(:,i)-b) is controlled by means of reorth:19 % reorth = 0 : no reorthogonalization (default),20 % reorth = 1 : reorthogonalization by means of MGS.21

22 % References: A. Bjorck, "Numerical Methods for Least Squares Problems",23 % SIAM, Philadelphia, 1996.24 % C. R. Vogel, "Solving ill-conditioned linear systems using the25 % conjugate gradient method", Report, Dept. of Mathematical26 % Sciences, Montana State University, 1987.27

28 % Per Christian Hansen, IMM, July 23, 2007.29

30 % The fudge threshold is used to prevent filter factors from exploding.31 fudge_thr = 1e-4;32

33 % Initialization.34 if (k < 1), error(’Number of steps k must be positive’), end35 if (nargin==3), reorth = 0; end36 if (nargout==4 & nargin<5), error(’Too few input arguments’), end37 if (reorth<0 | reorth>1), error(’Illegal reorth’), end38 [m,n] = size(A); X = zeros(n,k);39 if (reorth==1), ATr = zeros(n,k+1); end40 if (nargout > 1)41 eta = zeros(k,1); rho = eta;42 end43 if (nargin==5)44 F = zeros(n,k); Fd = zeros(n,1); s2 = s.^2;45 end46

47 % Prepare for CG iteration.48 x = zeros(n,1);49 d = A’*b;50 r = b;51 normr2 = d’*d;52 if (reorth==1), ATr(:,1) = d/norm(d); end

Page 97: Radon Transform in Tomographic Image Reconstruction

F.2 CGLS function from the Tools programme package. 89

53

54 % Iterate.55 for j=1:k56

57 % Update x and r vectors.58 Ad = A*d; alpha = normr2/(Ad’*Ad);59 x = x + alpha*d;60 r = r - alpha*Ad;61 s = A’*r;62

63 % Reorthogonalize s to previous s-vectors, if required.64 if (reorth==1)65 for i=1:j, s = s - (ATr(:,i)’*s)*ATr(:,i); end66 ATr(:,j+1) = s/norm(s);67 end68

69 % Update d vector.70 normr2_new = s’*s;71 beta = normr2_new/normr2;72 normr2 = normr2_new;73 d = s + beta*d;74 X(:,j) = x;75

76 % Compute norms, if required.77 if (nargout>1), rho(j) = norm(r); end78 if (nargout>2), eta(j) = norm(x); end79

80 % Compute filter factors, if required.81 if (nargin==5)82 if (j==1)83 F(:,1) = alpha*s2;84 Fd = s2 - s2.*F(:,1) + beta*s2;85 else86 F(:,j) = F(:,j-1) + alpha*Fd;87 Fd = s2 - s2.*F(:,j) + beta*Fd;88 end89 if (j > 2)90 f = find(abs(F(:,j-1)-1) < fudge_thr & abs(F(:,j-2)-1) < fudge_thr);91 if ~isempty(f), F(f,j) = ones(length(f),1); end92 end93 end94

95 end

Page 98: Radon Transform in Tomographic Image Reconstruction

90 ART Method

F.3 Script for reconstruction

1 %Script for reconstructing the phantom image with the CGLS method.2

3 clear all4 clc5 close all6

7 %Initialising8 N = 49; %Must be odd9 numAngles = N ;% Number of angles where rays are passed through the domain.

10 delta = 1/2; %Specifies the distance between each ray.11

12 %Test images13 F = phantom(N);14

15 %Creating the sparse matrix A and the linear system A*x=b for all three16 %images using tomoP2.17 A = tomoP2(N,numAngles,delta);18

19 %Reconstruction for the phantom image20 b = A*F(:);21 numRays = size(A,1);22

23 %Sinogram with radon method24 theta = ((1:N)-0.5)*180/N+90;25 [P,r] = radon(F,theta,numRays/numAngles);26

27 %Adding noise on the sinograms28 nlevel = 0.1;29 e = randn(size(b));30 e = e/norm(e);31 e = nlevel*norm(b)*e;32

33 %Creating a noisy sinogram34 bnoise = b + e(:);35

36 %Reconstructing Phantom Conjugate Gradient method37 k = 100; %Number of iterations in the cgls method38

39 %Without noise40 [Fcgls,rho,eta] = cgls(A,b,k);%using defaults values41

Page 99: Radon Transform in Tomographic Image Reconstruction

F.3 Script for reconstruction 91

42 %With noise43 [Fcglsnoise,rho,eta] = cgls(A,bnoise,k);%using defaults values44

45 %The last columns in Fcgls and Fcglsnoise are the reconstructed images46 Frec = reshape(Fcgls(:,end), N, N);47 Frecnoise = reshape(Fcglsnoise(:,end), N, N);48

49 %Displaying the solutions50

51 figure(1)52

53 subplot(2,2,1)54 imagesc(reshape(b, size(P))), colormap gray, axis square55 title(’Sinogram from b = A*x’)56

57 subplot(2,2,2)58 imagesc(reshape(bnoise, size(P))), colormap gray, axis square59 title(’Noisy sinogram’)60

61 subplot(2,2,3)62 imagesc(Frec), colormap gray, axis square63 title(’Reconstruction without noise’)64

65 subplot(2,2,4)66 imagesc(Frecnoise), colormap gray, axis square67 title(’Reconstruction with noise’)

Page 100: Radon Transform in Tomographic Image Reconstruction

92 ART Method

Page 101: Radon Transform in Tomographic Image Reconstruction

Appendix G

Comparison code

G.1 Function to make numerical singular func-tions and values

1 function [U,S,V] = svdfunc(N,theta,numRays,numAngles)2

3

4 %F = fspecial(’disk’,(N-1)/2);5 dx = 2/(N);6 x = (-1+dx/2):dx:(1-dx/2);7 [X1, X2] = meshgrid(x);8

9 %Defining the unit circle10 absx = sqrt(X1.^2+X2.^2);11

12 %The indexes within the unit circle13 J = find(absx <= 1);14

15 %Defining the circle of zeros and ones16 F = zeros(N);17 F(J) = 1;

Page 102: Radon Transform in Tomographic Image Reconstruction

94 Comparison code

18

19 %phi = ((1:N)-0.5)*360/N;20 % [G,s] = radon(F,theta); %,numRays/numAngles);21 % p = size(G,1);22 % G = G((p-N)/2+1:(p+N)/2,:);23

24 %Initialization25 A = zeros(N^2);26 I = 0;27 for i=1:N28 for j=1:N29 I = I+1;30 FF = zeros(N);31 FF(i,j) = F(i,j);32 [GG,s] = radon(FF,theta); %,numRays/numAngles);33 p = size(GG,1);34 GG = GG((p-N)/2+1:(p+N)/2,:);35 g = GG(:);36 A(:,I) = g;37 end38 end39

40 [U,S,V] = svd(A);

G.2 Function to make an image with objects

1 function F = objects(N)2 %Constructs a N x N image consisting og a square, a triangle and a circle3 %of different values and locations4

5

6 F = zeros(N);7

8 i = floor(N/2);9 j = floor(N/8);

10 k = floor(N/4);11 l = floor(N/6);12 n = floor(3*N/4);13

14 F(k:i,k:i)=1; % construction a square15

Page 103: Radon Transform in Tomographic Image Reconstruction

G.3 Function to make an image with circles 95

16

17 %Defining the x-axes18 dx = 2/(N);19 x = (-1+dx/2):dx:(1-dx/2);20 [X1, X2] = meshgrid(x);21

22 %Defining the unit circle23 absx = sqrt(X1.^2+X2.^2);24 imagesc(absx)25 I = find(absx < 0.3);26

27 F(I+k) = 0.7;28

29

30 F(n-j,n-j) =0.5;31 for p = 1:l32 F(n-j-p:n-j+p,n+p-j)=0.5; %construction the triangle33 end34

35 figure(2)36 imagesc(F)

G.3 Function to make an image with circles

1 function F= circles(N)2 %Constructs an N x N image with 6 circles3 F = zeros(N);4

5 i = floor(N/2);6 i2 = floor(N/3);7 j = floor(N/8);8 k = floor(N/4);9 l = floor(N/6);

10 n = floor(3*N/4);11 f = floor(N/11);12

13 %Defining the x-axes14 dx = 2/(N);15 x = (-1+dx/2):dx:(1-dx/2);16 [X1, X2] = meshgrid(x);17

Page 104: Radon Transform in Tomographic Image Reconstruction

96 Comparison code

18 %Defining the unit circle19 absx = sqrt(X1.^2+X2.^2);20 %The first circle21 J = find(absx < 0.2);22 F(J-i2) = 1;23

24 %The second circle25 I = find(absx < 0.15);26 F(I-j) = 0.4;27

28 %The third circle29 K = find(absx < 0.1);30 F(K) = 0.2;31

32 %The fourth circle33 G = find(absx < 0.05);34 F(G+j) = 0.3;35

36 %The fifth circle37 I2 = find(absx < 0.03);38 F(I2+k) = 0.3;39

40 %The last circle41 I2 = find(absx < 0.01);42 F(I2+i2) = 0.1;43

44 imagesc(F)

G.4 Script for constructing images for compar-ison

1 %Script to test different images with the three reconstruction methods2

3 clear all4 clc5 close all6

7 %Initialising8 N = 49; %Must be odd9 numAngles = N ;% Number of angles where rays are passed through the domain.

10 delta = 1/2; %Specifies the distance between each ray.

Page 105: Radon Transform in Tomographic Image Reconstruction

G.4 Script for constructing images for comparison 97

11

12 %Test images13 imPha = phantom(N);14 imObj = objects(N);15 imCir = circles(N);16

17 %Creating the sparse matrix A and the linear system A*x=b for all three18 %images using tomoP2.19 A = tomoP2(N,numAngles,delta);20

21 %Reconstruction for the phantom image22 bPha = A*imPha(:);23

24

25 %Using the radon transform26 numRays = size(A,1); % Total number of rays27 %theta = ((0:numAngles-1)*pi/numAngles+pi/2)*180/pi; % Angles28 theta = ((1:N)-0.5)*180/N+90;29 [PPha,rPha] = radon(imPha,theta,numRays/numAngles); % Radon for phantom30 numelPha = numel(PPha);31

32 %Create sinograms without noise33 figure(2)34 subplot(2,2,1)35 imagesc(PPha), colormap gray, axis square, title(’Radon Transform without noise’)36 subplot(2,2,2)37 imagesc(reshape(bPha,size(PPha))), colormap gray, axis square, title(’A*x=b without noise’)38

39 %Adding noise on the sinograms40 nlevel = 0.1;41 e = randn(size(bPha));42 e = e/norm(e);43 e = nlevel*norm(bPha)*e;44 ePha = reshape(e,size(PPha));45

46

47 %Creating a noisy sinogram48 PPha = PPha + ePha;49 bPha = bPha + ePha(:) ;50

51 %Plotting the noisy sinograms52 subplot(2,2,3)53 imagesc(PPha), colormap gray, axis square54 title([’Radon, noise level ’,num2str(nlevel)])

Page 106: Radon Transform in Tomographic Image Reconstruction

98 Comparison code

55 subplot(2,2,4)56 imagesc(reshape(bPha,size(PPha))), colormap gray, axis square57 title([’A*x=b, noise level ’,num2str(nlevel)])58

59 %Reconstructing Phantom with the three methods60 %Using the inverse radon61 XradonPha = iradon(PPha,theta,’Hamming’);62

63 %Plotting the reconstructed images64 figure(3)65 subplot(2,2,1)66 imagesc(imPha), colormap gray, axis square67 title([’Original, ’,num2str(N),’^2 = ’,num2str(N^2),’ pixels’])68

69 subplot(2,2,2)70 imagesc(XradonPha), colormap gray, axis square, title([’FBP, ’,num2str(numelPha),’ beams’])71

72 %Using the SVD function to finc the singular functions and values73 [U,S,V] = svdfunc(N,theta,numRays,numAngles);74 imsvdPha = zeros(N);75

76

77 %Cropping the image78 GPha = radon(imPha, theta);79

80 %Adding noise on the sinograms81 nlevel = 0.1;82 e = nlevel*randn(size(GPha));83 e = e/norm(e);84

85 GPha = GPha + e;86

87 p = size(GPha,1);88 GPha = GPha((p-N)/2+1:(p+N)/2,:);89

90 [P Q] = size(GPha);91

92 for i = 1:N^293 s(i) = S(i,i);94 end95

96 %Construction the reconstruction from the singular functions97 for l = 1:99098 Umk = reshape(U(:,l),P,Q); %Singular functions u_m,k

Page 107: Radon Transform in Tomographic Image Reconstruction

G.4 Script for constructing images for comparison 99

99 Vmk = reshape(V(:,l),N,N); %Singular functions v_m,k100 ipUg = Umk(:)’*GPha(:); %inner product between u_m,k and g101 %ipVg = Vmk(:)’*imPha(:);102 imsvdPha = imsvdPha+(ipUg/s(l))*Vmk; %Summing up the image103

104 end105

106 %Picard plot to find the truncation parameter107 % figure(4)108 % semilogy(ipUg, ’r^’)109 % hold on110 % semilogy(s, ’bo’)111

112 imsvdPha = imrot90(imsvdPha,3); %Rotate image113 imsvdPha = fliplr(imsvdPha); %Flip the image left-right114

115 subplot(2,2,3)116 imagesc(imsvdPha), title(’Reconstruction with SVD’), axis square117

118 %Using Conjugate Gradient method119 k = 500; %Number of iterations in the cgls method120 [XcglsPha,rho,eta] = cgls(A,bPha,k); %using defaults values121

122 %Reshape the matrix into a NxN matrix123 XcglsPha = reshape(XcglsPha(:,end),N,N);124

125 subplot(2,2,4)126 imagesc(XcglsPha), colormap gray, axis square127 title([’CGLS, ’,num2str(size(A,1)),’ beams’])128

129 % %Calculation the residuals for the three methods on the phantom image130 % %Iradon (FBP)131 % xradon = XradonPha - imPha;132 % r_radon = norm(xradon,’fro’)/norm(imPha,’fro’);133 %134 %Relative error for the CGLS method135 diffcgls_Pha = imPha - XcglsPha; %Difference X_exact - X_rec136 diffmeancgls_Pha = diffcgls_Pha - mean(diffcgls_Pha(:))*ones(size(diffcgls_Pha)); %(X_exact - X_rec)- mu*I137 meanimPha = imPha - mean(imPha(:))*(ones(size(imPha))); %X_exact - mu*I138 rPha_cglsmu = norm(diffmeancgls_Pha,’fro’)/norm(meanimPha,’fro’); %mu * Frobenius norm139 rPha_cgls = norm(diffcgls_Pha,’fro’)/norm(imPha,’fro’); %Frobenius norm140 %141 %SVD142 diffsvdPha = imPha -imsvdPha; %Difference X_exact - X_rec

Page 108: Radon Transform in Tomographic Image Reconstruction

100 Comparison code

143 diffmeansvd_Pha = diffsvdPha - mean(diffsvdPha(:))*(ones(size(diffsvdPha))); %(X_exact - X_rec)- mu*I144 rPha_svdmu = norm(diffmeansvd_Pha,’fro’)/norm(meanimPha,’fro’); %mu * Frobenius norm145 rPha_svd = norm(diffsvdPha,’fro’)/norm(imPha,’fro’); %Frobenius norm146

147 %%148

149

150 %Reconstruction for the objects image151 bObj = A*imObj(:);152

153 %Using the radon transform154 [PObj,rObj] = radon(imObj,theta,numRays/numAngles); % Radon for objects155 numelObj = numel(PObj);156

157 %Create sinograms without noise158 figure(4)159 subplot(2,2,1)160 imagesc(PObj), axis square, title(’Radon Transform without noise’)161 subplot(2,2,2)162 imagesc(reshape(bObj,size(PObj))), axis square, title(’A*x=b without noise’)163

164 %Adding noise on the sinograms165 nlevel = 0.1;166 e = randn(size(bObj));167 e = e/norm(e);168 e = nlevel*norm(bObj)*e;169 eObj = reshape(e,size(PObj));170

171 PObj = PObj + eObj;172 bObj = bObj + eObj(:);173

174 %Plotting the noisy sinograms175 subplot(2,2,3)176 imagesc(PObj), axis square, title([’Radon, noise level ’,num2str(nlevel)])177 subplot(2,2,4)178 imagesc(reshape(bObj,size(PObj))), axis square, title([’A*x=b, noise level ’,num2str(nlevel)])179

180 %Reconstructing Phantom with the three methods181

182 %Using the inverse radon183 XradonObj = iradon(PObj,theta,’Hamming’);184

185 %Displaying solutions186 figure(5)

Page 109: Radon Transform in Tomographic Image Reconstruction

G.4 Script for constructing images for comparison 101

187

188 subplot(2,2,1)189 imagesc(imObj), axis square190 title([’Original, ’,num2str(N),’^2 = ’,num2str(N^2),’ pixels’])191

192 subplot(2,2,2)193 imagesc(XradonObj), axis square, title([’FBP, ’,num2str(numelObj),’ beams’])194

195 %Using the SVD196 imsvdObj = zeros(N);197

198

199 %Cropping the image200 PObj = radon(imObj, theta);201

202 %Adding noise on the sinograms203 nlevel = 0.1;204 e = nlevel*randn(size(PObj));205 e = e/norm(e);206

207 PObj = PObj + e;208

209 p = size(PObj,1);210 PObj = PObj((p-N)/2+1:(p+N)/2,:);211

212 [P Q] = size(PObj);213 for i = 1:N^2214 s(i) = S(i,i);215 end216

217 for l = 1:1380218 Umk = reshape(U(:,l),P,Q);219 Vmk = reshape(V(:,l),N,N);220 ipUg = Umk(:)’*PObj(:);221 %ipVg = Vmk(:)’*imObj(:);222 imsvdObj = imsvdObj+(ipUg/s(l))*Vmk;223

224 end225

226 %Picard plot to find the truncation parameter227 % figure(8)228 % semilogy(ipUg)229 % hold on230 % semilogy(s, ’r^’)

Page 110: Radon Transform in Tomographic Image Reconstruction

102 Comparison code

231

232 imsvdObj = imrot90(imsvdObj,3);233 imsvdObj = fliplr(imsvdObj);234

235 subplot(2,2,3)236 imagesc(imsvdObj), title(’Reconstruction with SVD’), axis square237

238 %Using Conjugate Gradient method239 k = 100; %Number of iterations in the cgls method240 [XcglsObj,rho,eta] = cgls(A,bObj,k); %using defaults values241 XcglsObj = reshape(XcglsObj(:,end),N,N);242

243 subplot(2,2,4)244 imagesc(XcglsObj), axis square245 title([’CGLS, ’,num2str(size(A,1)),’ beams’])246

247 % %CGLS solution248 diffcglsObj = XcglsObj - imObj; %X_rec - X_exact249 diffmeancglsObj = diffcglsObj - mean(diffcglsObj(:))*(ones(size(diffcglsObj))); %(X_exact - X_rec)- mu*I250 meanimObj = imObj - mean(imObj(:))*(ones(size(imObj))); %X_exact - mu*I251 rObj_cglsmu = norm(diffmeancglsObj,’fro’)/norm(meanimObj,’fro’); %mu * Frobenius norm252 rObj_cgls = norm(diffcglsObj,’fro’)/norm(imObj,’fro’); %Frobenius norm253 %254 %255 %SVD256 diffsvdObj = imsvdObj - imObj; %X_rec - X_exact257 diffmeansvdObj = diffsvdObj - mean(diffsvdObj(:))*(ones(size(diffsvdObj))); %(X_exact - X_rec)- mu*I258 rObj_svdmu = norm(diffmeansvdObj,’fro’)/norm(meanimObj,’fro’); %mu * Frobenius norm259 rObj_svd = norm(diffsvdObj,’fro’)/norm(imObj,’fro’); %Frobenius norm260

261

262

263 %%264

265

266 %Reconstruction for the objects image267 bCir = A*imCir(:);268

269 %Using the radon transform270 [PCir,rCir] = radon(imCir,theta,numRays/numAngles); % Radon for circles271 numelCir = numel(PCir);272

273 %Create sinograms without noise274 figure(6)

Page 111: Radon Transform in Tomographic Image Reconstruction

G.4 Script for constructing images for comparison 103

275 subplot(2,2,1)276 imagesc(PCir), axis square, title(’Radon Transform without noise’)277 subplot(2,2,2)278 imagesc(reshape(bCir,size(PCir))), axis square, title(’A*x=b without noise’)279

280 %Adding noise on the sinograms281 nlevel = 0.1;282 e = randn(size(bCir));283 e = e/norm(e);284 e = nlevel*norm(bCir)*e;285 eCir = reshape(e,size(PCir));286

287 PCir = PCir + eCir;288 bCir = bCir + eCir(:);289

290 %Plotting the noisy sinograms291 subplot(2,2,3)292 imagesc(PCir), axis square, title([’Radon, noise level ’,num2str(nlevel)])293 subplot(2,2,4)294 imagesc(reshape(bCir,size(PCir))), axis square, title([’A*x=b, noise level ’,num2str(nlevel)])295

296 %Reconstructing Phantom with the three methods297

298

299 %Using the inverse radon300 XradonCir = iradon(PCir,theta,’Hamming’);301

302

303 figure(7)304 subplot(2,2,1)305 imagesc(imCir), axis square306 title([’Original, ’,num2str(N),’^2 = ’,num2str(N^2),’ pixels’])307

308 subplot(2,2,2)309 imagesc(XradonCir), axis square, title([’FBP, ’,num2str(numelCir),’ beams’])310

311 %Using the SVD312 imsvdCir = zeros(N);313

314 PCir = radon(imCir,theta);315

316 e = nlevel*randn(size(PCir));317 e = e/norm(e);318

Page 112: Radon Transform in Tomographic Image Reconstruction

104 Comparison code

319 Pcir = PCir + e;320

321

322 p = size(PCir,1);323 PCir = PCir((p-N)/2+1:(p+N)/2,:);324

325 [P Q] = size(PCir);326 for i = 1:N^2327 s(i) = S(i,i);328 end329

330 for l = 1:1830331 Umk = reshape(U(:,l),P,Q);332 Vmk = reshape(V(:,l),N,N);333 ipUg = Umk(:)’*PCir(:);334 %ipVg = Vmk(:)’*imCir(:);335 imsvdCir = imsvdCir+(ipUg/s(l))*Vmk;336

337 end338 %Picard plot to find the truncation parameter339 % figure(12)340 % semilogy(ipUg, ’ro’)341 % hold on342 % semilogy(s, ’b^’)343

344 imsvdCir = imrot90(imsvdCir,3);345 imsvdCir = fliplr(imsvdCir);346 subplot(2,2,3)347 imagesc(imsvdCir), title(’Reconstruction with SVD’), axis square348

349

350 %Using Conjugate Gradient method351 k = 100; %Number of iterations in the cgls method352 [XcglsCir,rho,eta] = cgls(A,bCir,k); %using defaults values353 XcglsCir = reshape(XcglsCir(:,end),N,N);354

355 subplot(2,2,4)356 imagesc(XcglsCir), axis square357 title([’CGLS, ’,num2str(size(A,1)),’ beams’])358

359 % %CGLS solution360 diffcglsCir = XcglsCir - imCir; %X_rec - X_exact361 diffmeancglsCir = diffcglsCir - mean(diffcglsCir(:))*(ones(size(diffcglsCir))); %(X_exact - X_rec)- mu*I362 meanimCir = imCir - mean(imCir(:))*(ones(size(imCir))); %X_exact - mu*I

Page 113: Radon Transform in Tomographic Image Reconstruction

G.4 Script for constructing images for comparison 105

363 rCir_cglsmu = norm(diffmeancglsCir,’fro’)/norm(meanimCir,’fro’); %mu * Frobenius norm364 rCir_cgls = norm(diffcglsCir,’fro’)/norm(imCir,’fro’); %Frobenius norm365 %366 %SVD367 diffsvdCir = imsvdCir - imCir; %X_rec - X_exact368 diffmeansvdCir = diffsvdCir - mean(diffsvdCir(:))*(ones(size(diffsvdCir))); %(X_exact - X_rec)- mu*I369 rCir_svdmu = norm(diffmeansvdCir,’fro’)/norm(meanimCir,’fro’); %mu * Frobenius norm370 rCir_svd = norm(diffsvdCir,’fro’)/norm(imCir,’fro’); %Frobenius norm371

372

Page 114: Radon Transform in Tomographic Image Reconstruction

106 Comparison code

Page 115: Radon Transform in Tomographic Image Reconstruction

Bibliography

[1] www.themesotheliomalibrary.com/ct-scan.html, 2008.

[2] M Bertero and P Boccacci. Introduction to Inverse Problems in Imaging.IOP Publishing Ltd.

[3] Per Christian Hansen. Discrete Inverse Problems - Insight and Algorithms,volume 1. 2008.

[4] Linde Wittmeyer-Koch Lars Elden and Hans Bruun Nielsen. Introductionto Numerical Computation - analysis and MATLAB illustrations. 2004.

[5] Lois E. Romans. Introduction to computed tomography, 1995.

[6] Jonathan Richard Shewchuk. An introduction to conjugate gradient methodwithout the agonizing pain. August 1994.

[7] Wikipedia. http://en.wikipedia.org/wiki/Tomography, 2005.

[8] Wikipedia. http://en.wikipedia.org/wiki/Beer-Lambert_law, 2008.


Recommended