0% found this document useful (0 votes)
7 views14 pages

Report Lab 2

The document details the simulation of computed tomography using Radon and inverse Radon transforms, including the syntax and functionality of the radon and iradon commands. It discusses various filter types used in the filtered back projection technique, such as Ram-Lak and Shepp-Logan filters, and their effects on image quality. Additionally, it covers fanbeam and ifanbeam commands for fan-beam projection data and their reconstruction processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views14 pages

Report Lab 2

The document details the simulation of computed tomography using Radon and inverse Radon transforms, including the syntax and functionality of the radon and iradon commands. It discusses various filter types used in the filtered back projection technique, such as Ram-Lak and Shepp-Logan filters, and their effects on image quality. Additionally, it covers fanbeam and ifanbeam commands for fan-beam projection data and their reconstruction processes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

REPORT LAB 2: SIMULATION OF COMPUTED TOMOGRAPHY

1. radon and iradon commands:


1.1. radon command:
-Syntax [1]:
R = radon(I)
R = radon(I,theta)
[R,xp] = radon( __ )
-Fuction:
The radon command performs the Radon Transform, which is the integral transform that
converts a fuction f defined on a plane to a function Rf defined on a 2-D (two dimensional)
space. This function computes the projections of an image, which is a set of line integrals, along
specified directions [3].
In other words, the radon command calculates the line integrals from the sources along the
beams in a specified direction. It also rotates the source around the center of the image in order
to achieve multiple, paralell-beam projections in different angles [3].
R = radon(I) – returns the Radon Transform R from a 2-D grayscale image I with angles in
the interval [0o, 179o]. [1]
R = radon(I,theta)- returns the Radon Transform R from a 2-D grayscale image I with
angles whose values are input by us. [1]
[R,xp] = radon( __ )- returns a vector xp consisting of radial coordinates corresponding
to each row of the image. [1]

Figure 1. A projection at a specified angle.


1.2. iradon command:
-Syntax [3]:
I = iradon(R,theta)
I = iradon(R,theta,interp,filter,frequencyScaling,outputSize)
[I,H] = iradon( __ )
-Function:
The iradon command performs the inverse process of the Radon Transform, which is used to
reconstruct images from parallel-beam projections, each of which is formed by combining a set
of line integrals at a specific angle [4].
This command uses the filtered back projection algorithm to compute the inverse Radon
Transform, which forms an approximation of the image I based on the columns of R. The more
projections we use in the reconstruction process, the more accurate the approximate image is
compared to the original one [4].
I = iradon(R,theta)- reconstructs the image I from the projection data from R at angles
theta [3].
I = iradon(R,theta,interp,filter,frequencyScaling,outputSize)-
performs the inverse Radon Transform using specified parameters. The command would use the
default value for these paramters if we omit them [3].
[I,H] = iradon( __ )- reconstructs the image I and returns the frequency response H of
the filter [3].
2. Types of filter functions in the back projection transformation:
The Filtered Back Projection is a technique that combined the fast Fourier algorithm with Radon
Transformation and strictly based on mathematical theories. The advantage of this method is that
it needs less computational commands [8]. On the other hand, the disadvantages of the Filtered
Back Projection is that the resulting image has a high density in the center sience many images
are overlapped there and they are usually blurred. Therefore, a filter is necessary in the process
of reconstructing an image [9].
Here I consider five different types of fiter including: Ram-Lak, Shepp-Logan, Cosine,
Hamming and Hann filter, each of which is defined to modify the ideal Ramp filter in the
frequency domain, which is defined by the quation [8]:

H ( ) =  W ( )

Where:  is the spatial frequency and W ( ) is define differently depends on each filter.

2.1. Ram-Lak filter:


This is also called Cropped Ram-Lak or ramp filter [3]. For this filter, W ( ) is defined by the
 
equation: W ( ) = rect   [8].
2
2.2. Shepp-Logan filter:
This filter multiplies the Ram-Lak filter by a sinc function [3]. W ( ) in this case is:
   
W ( ) = rect   sin c   [8].
2 2
2.3. Cosine filter:
The Cosine filter multiplies the Ram-Lak filter by a cosine function [3]. W ( ) in this case is:
   
W ( ) = rect   cos   [8].
2 2
2.4. Hamming filter:
The Hamming filter multiplies the Ram-Lak filter by a Hamming window [3]. W ( ) in this case
 
is: W ( ) = rect   ( 0.54 + 0.46 cos ( ) ) [8].
2
2.5. Hann filter:
The Hann filter multiplies the Ram-Lak filter by a Hann window and W ( ) in this case is:
 
W ( ) = rect   ( 0.5 + 0.5cos ( ) ) [8].
2

 
Note the the function rect   is the rectangular function, which is defined by:
2
0
  1
     1 
rect   =    =  if   = 1 [11].
2  2  2 
 1
 1 

3. Running test BP1 and BP2:


3.1. Create image files for testing:
-The source code (from the file Lab24.m):
-The original image file and resulting image file are attached with this report with the name
‘AnotherBrain.jpg’ and ‘AnotherBrain.bmp’.
3.2. Testing BP1 and BP2 with new images:

Figure 2. Result from BP124.m

Figure 3. Result from BP224.m


4. Testing different types of filter:
4.1. Filters in BP1:

Figure 3. % Ramp filter (Linear High-Pass filter)


The resulting image with this filter is the second best result I get from all 6 filters provided by
the instructor. In this case, we can make out really well the shape and the edges of the original
image and distiguish different components of the object thgough they are quite blurred.
However, those parts with the low contrast level are difficult to see(the part near the center area).

Figure 4. % The opposite of the Ramp Function (Linear Low-Pass Filter)


The quality of the resulting image with this filter is low, when we couldn’t make out the inner
round edge of the object and the center area become too bright.

Figure 5. % IIR Filter


The quality of this resulting image with this filter is also low when the edges of every part of the
object blurred into each other though we can still regconize them unclearly. Besides, the image is
too dark compared to the original one.

Figure 6. % FIR-Box car-length 32


This filter has given the image with the lowest quality when we cannot regconize a sigle edge
or any part of the object.

Figure 7. % Butterworth Filter (Low-Pass Filter).


The quality of the returned image is low, when it’s too bright to regconize any details from the
object. The edges are blurred into the background and make it hard to determine the true area
of the object.

Figure 8. % Sinusoidal Filter (peak at 25)


This is the filter that returns the result with the highest quality. We can easily regconize many
part of the object, from the outer to the inner edges of the original image. Moreover, the object
doesn’t seem to blurred into the backgroud as the filter % Ramp filter (Linear High-Pass filter).

Figure 9. % Stretched Sinusoidal Filter (peak at 42)


The details of the resulting image in this case are difficult to regconize due to the high
brightness level. Although we can still regconize the components, they are quite unclear.
4.2. Filters in BP2:

Figure 10. No filter.


Figure 11. Ram-Lak filter.

Figure 12. Shepp-Logan filter.


Figure 13. Cosine filter.

Figure 14. Hamming filter.


Figure 15. Hann filter.
The resulting images of different filters have been arranged in the order of the brightness
levels from lowest to highest. We can see that, with no filter applied, the result is too bright
and we barely regconize the details from the original object.
Regarding the filters tested, we can conclude that Ram-Lak filter has the lightest color with a
gray shade in the background compared to other results. The Shepp-Logan filter returns an
image with a darker background but not as dark as the next three filters. However, with naked
eyes, I find it quite difficult to regconize the differences from the Hamming, Hann and Cosine
filters. In other words, I can only feel that they are slightly different to each other but I can’t
name them. In my opinion, we need the detailed calculation in order to represent the
differences between these three filters.
5. fanbeam and ifanbeam commands:
5.1. fanbeam command:
-Syntax:
F = fanbeam(I,D)
F = fanbeam(I,D,Name,Value)
[F,fanSensorPos,fanRotAngle] = fanbeam(___)
-Function:
The fanbeam command computes projections of an image, each of which of a 2-D function f(x,y)
is a set of line integrals. These line integrals are determined along paths radiating from a single
source, appearing as a fan shape. Similar to the radon command, this command rotates the source
around the center of the image and get multiple projections from many different angles in order
to represent the image.
F = fanbeam(I,D)- computes the fan-beam projection data F from the image I while each
column of F contains the data at a rotation angle and D is the distance from the fan-beam vertex
to the center of rotation.
F = fanbeam(I,D,Name,Value)- specify the rotation increment and sensor spacing.

[F,fanSensorPos,fanRotAngles] = fanbeam(___)- fanSensorPos returns the


location of fan-beam sensors and fanRotAngles returns the rotation angles where the projections
are calculated. [F,fanSensorPos,fanRotAngles] = fanbeam(___)- fanSensorPos
returns the location of fan-beam sensors and fanRotAngles returns the rotation angles where the
projections are calculated.

Figure 16. A single fan-beam projection at a specified angle.


5.2. ifanbeam command:
-Syntax [5]:
I = ifanbeam(F,D)
I = ifanbeam(F,D,Name,Value)
[I,H] = ifanbeam(___)
-Function:
The ifanbeam command is used to reconstruct an image from fan-beam projection data. Since
the ifanbeam command change the fan-beam projection data to parallel-beam projection data
uand use the iradon command to perform the reconstruction of the image, this command can
support certain iradon parameters [6].
I = ifanbeam(F,D)- reconstructs the image I from fan-beam projection data in F while
each column of F contains fan-beam projection data at a rotation angle and D is the distance from
the fan-beam vertex to the center of rotation [5].
I = ifanbeam(F,D,Name,Value)- Name and Value arguments are used to control
various aspects of the reconstruction process [5].
[I,H] = ifanbeam(___)- reconstructs the image I and returns the frequency response H
of the filter [5].
5.3. Tomography created based on fanbeam and ifanbeam commands:
In this case, I have used the original program “BP2” from the instructor and replace the
commands radon and iradon by the required commands fanbeam and ifanbeam.
The program’s source code is in the file “Lab26.m” attached within the ZIP file. In this report I
only show the result when I ran testing the code.

Figure 17. Run: Lab26(‘logan.bmp’, 179)


6. References:
[1] MathWorks Help Center, “radon”, 2023. [Online]. Available:
https://ch.mathworks.com/help/images/ref/radon.html [Acessed 04/04/2023].
[2] Wikipedia, “Radon transfrom”, 27 March 2023. [Online]. Available:
https://en.wikipedia.org/wiki/Radon_transform [Acessed 04/05/2023].
[3] MathWorks Help Center, “iradon”, 2023. [Online]. Available:
https://ch.mathworks.com/help/images/ref/iradon.html?searchHighlight=iradon&s_tid=srchtitle_
iradon_1 [Acessed 04/05/2023].
[4] MathWorks Help Center, “The Inverse Radon Transformation”, 2023. [Online]. Available:
https://ch.mathworks.com/help/images/the-inverse-radon-transformation.html [Acessed
04/05/2023].
[5] MathWorks Help Center, “fanbeam”, 2023. [Online]. Available:
https://ch.mathworks.com/help/images/ref/fanbeam.html?searchHighlight=fanbeam&s_tid=srcht
itle_fanbeam_1 [Acessed 04/06/2023].
[6] MathWorks Help Center, “Fan-Beam Projection”, 2023. [Online]. Available:
https://ch.mathworks.com/help/images/fan-beam-projection-
data.html?searchHighlight=fanbeam&s_tid=srchtitle_fanbeam_2 [Acessed 04/06/2023].
[7] MathWorks Help Center, “ifanbeam”, 2023. [Online]. Available:
https://ch.mathworks.com/help/images/ref/ifanbeam.html?searchHighlight=ifanbeam&s_tid=src
htitle_ifanbeam_1 [Acessed 04/06/2023].
[8] A. F. Velo, J. F. T. Martins, A. S. Oliveira, D. V. S. Carvalho, F. S. Faria, M. M. Hamada and
C. H. Mesquita, “FILTER ASSESSMENT APPLIED TO ANALYTICAL RECONSTRUCTION
FOR INDUSTRIAL THIRD-GENERATION TOMOGRAPHY”, ASSOCIAÇÃO BRASILEIRA
DE ENERGIA NUCLEAR – ABEN, October 2015. [Online]. Available:
https://inis.iaea.org/collection/NCLCollectionStore/_Public/47/032/47032105.pdf [Acessed
04/09/2023].
[9] Rice University, “Backprojection Filters”. [Online]. Available:
https://www.clear.rice.edu/elec431/projects96/DSP/filters.html [Acessed 04/09/2023].
[10] S. Zargar, V. Phad, P. Kumar Poola and R. John, “ROLE OF FILTERING TECHNIQUES
IN COMPUTED TOMOGRAPHY (CT) IMAGE RECONSTRUCTION”, IJRET: International
Journal of Research in Engineering and Technology, vol. 04, no. 12, October 2015. [Online].
Available: https://ijret.org/volumes/2015v04/i24/IJRET20150424012.pdf [Acessed 04/09/2023].
[11] Wikipedia, “Rectangular function”, 06 April 2023. [Online]. Available:
https://en.wikipedia.org/wiki/Rectangular_function [Acessed 04/09/2023].

You might also like