fanbeam matlab,Fan-Beam Projection

Fan-Beam Projection

Note

For information about creating projection data from line integrals along parallel

paths, see Radon Transform. To

convert fan-beam projection data to parallel-beam projection data, use the fan2para function.

The fanbeam function computes

projections of an image matrix along specified directions. A

projection of a two-dimensional function f(x,y) is a set of line

integrals. The fanbeam function computes the line integrals along

paths that radiate from a single source, forming a fan shape. To represent an image, the

fanbeam function takes multiple projections of the image from

different angles by rotating the source around the center of the image. The following

figure shows a single fan-beam projection at a specified rotation angle.

Fan-Beam Projection at Rotation Angle Theta

f5d1c7555938e29e8f9a494338d4fdd9.gif

When you compute fan-beam projection data using the fanbeam

function, you specify as arguments an image and the distance between the vertex of the

fan-beam projections and the center of rotation (the center pixel in the image). The

fanbeam function determines the number of beams, based on the

size of the image and the settings of fanbeam parameters.

The FanSensorGeometry parameter specifies how sensors are aligned:

'arc' or 'line'.

Fan Sensor GeometryDescription'arc'fanbeam positions the sensors along an arc,

spacing the sensors at 1 degree intervals. Use the

FanSensorSpacing parameter to control the

distance between sensors by specifying the angle between each beam. This

is the default fan sensor geometry.

'line'fanbeam positions sensors along a straight line,

rather than an arc. Use the FanSensorSpacing

parameter to specify the distance between the sensors, in pixels, along

the x´ axis.

The FanRotationIncrement parameter specifies the rotation angle

increment. By default, fanbeam takes projections at different angles

by rotating the source around the center pixel at 1 degree intervals.

The following figures illustrate both these geometries. The first figure illustrates

geometry used by the fanbeam function when

FanSensorGeometry is set to 'arc' (the

default). Note how you specify the distance between sensors by specifying the angular

spacing of the beams.

Fan-Beam Projection with Arc Geometry

4849560bc41359ac7d65b35c378b34a6.gif

The following figure illustrates the geometry used by the fanbeam

function when FanSensorGeometry is set to 'line'.

In this figure, note how you specify the position of the sensors by specifying the

distance between them in pixels along the x´ axis.

Fan-Beam Projection with Line Geometry

7dfe3e102593d3d424661f54f412a504.pngImage Reconstruction from Fan-Beam Projection Data

To reconstruct an image from fan-beam projection data, use the

ifanbeam function. With this function, you specify as

arguments the projection data and the distance between the vertex of the fan-beam

projections and the center of rotation when the projection data was created. For

example, this code recreates the image I from the projection data

P and distance D.

I = ifanbeam(P,D);

By default, the ifanbeam function assumes that the fan-beam

projection data was created using the arc fan sensor geometry, with beams spaced at

1 degree angles and projections taken at 1 degree increments over a full 360 degree

range. As with the fanbeam function, you can use

ifanbeam parameters to specify other values for these

characteristics of the projection data. Use the same values for these parameters

that were used when the projection data was created. For more information about

these parameters, see ifanbeam.

The ifanbeam function converts the fan-beam projection data to

parallel-beam projection data with the fan2para function, and

then calls the iradon function to perform the image

reconstruction. For this reason, the ifanfeam function supports

certain iradon parameters, which it passes to the

iradon function. See The Inverse Radon Transformation for more information about the

iradon function.Reconstruct Image using Inverse Fanbeam Projection

This example shows how to use fanbeam and ifanbeam to form projections from a sample image and then reconstruct the image from the projections.

Generate a test image and display it. The test image is the Shepp-Logan head phantom, which can be generated by the phantom function. The phantom image illustrates many of the qualities that are found in real-world tomographic imaging of human heads.

P = phantom(256);

imshow(P)

9f46f53bb15628bf94fe71811d9343e2.png

Compute fan-beam projection data of the test image, using the FanSensorSpacing parameter to vary the sensor spacing. The example uses the fanbeam arc geometry, so you specify the spacing between sensors by specifying the angular spacing of the beams. The first call spaces the beams at 2 degrees; the second at 1 degree; and the third at 0.25 degrees. In each call, the distance between the center of rotation and vertex of the projections is constant at 250 pixels. In addition, fanbeam rotates the projection around the center pixel at 1 degree increments.

D = 250;

dsensor1 = 2;

F1 = fanbeam(P,D,'FanSensorSpacing',dsensor1);

dsensor2 = 1;

F2 = fanbeam(P,D,'FanSensorSpacing',dsensor2);

dsensor3 = 0.25;

[F3, sensor_pos3, fan_rot_angles3] = fanbeam(P,D,...

'FanSensorSpacing',dsensor3);

Plot the projection data F3 . Because fanbeam calculates projection data at rotation angles from 0 to 360 degrees, the same patterns occur at an offset of 180 degrees. The same features are being sampled from both sides.

figure, imagesc(fan_rot_angles3, sensor_pos3, F3)

colormap(hot); colorbar

xlabel('Fan Rotation Angle (degrees)')

ylabel('Fan Sensor Position (degrees)')

684a082ed5651e093aa3b7d444b037e0.png

Reconstruct the image from the fan-beam projection data using ifanbeam . In each reconstruction, match the fan sensor spacing with the spacing used when the projection data was created previously. The example uses the OutputSize parameter to constrain the output size of each reconstruction to be the same as the size of the original image P . In the output, note how the quality of the reconstruction gets better as the number of beams in the projection increases. The first image, Ifan1 , was created using 2 degree spacing of the beams; the second image, Ifan2 , was created using 1 degree spacing of the beams; the third image, Ifan3 , was created using 0.25 spacing of the beams.

output_size = max(size(P));

Ifan1 = ifanbeam(F1,D, ...

'FanSensorSpacing',dsensor1,'OutputSize',output_size);

figure, imshow(Ifan1)

title('Ifan1')

cd6e7eb32ceebbd1f508f05e20f33faa.png

Ifan2 = ifanbeam(F2,D, ...

'FanSensorSpacing',dsensor2,'OutputSize',output_size);

figure, imshow(Ifan2)

title('Ifan2')

9cec35bce0c7240138648053493ebe30.png

Ifan3 = ifanbeam(F3,D, ...

'FanSensorSpacing',dsensor3,'OutputSize',output_size);

figure, imshow(Ifan3)

title('Ifan3')

6aecdea51e79aabffb79ec6a92a7bd52.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值