Radon Transform
Note
For information about creating projection data from line integrals along paths that radiate from a single source, called fan-beam projections, seeFan-Beam Projection. To convert parallel-beam projection data to fan-beam projection data, use thepara2fan
function.
Theradon
function computes预测of an image matrix along specified directions.
A projection of a two-dimensional functionf(x,y)is a set of line integrals. Theradon
function computes the line integrals from multiple sources along parallel paths, orbeams, in a certain direction. The beams are spaced 1 pixel unit apart. To represent an image, theradon
function takes multiple, parallel-beam projections of the image from different angles by rotating the source around the center of the image. The following figure shows a single projection at a specified rotation angle.
Parallel-Beam Projection at Rotation Angle Theta
For example, the line integral off(x,y)in the vertical direction is the projection off(x,y)onto thex-axis; the line integral in the horizontal direction is the projection off(x,y)onto they-axis. The following figure shows horizontal and vertical projections for a simple two-dimensional function.
Horizontal and Vertical Projections of a Simple Function
Projections can be computed along any angletheta(θ). In general, the Radon transform off(x,y)is the line integral offparallel to they´-axis
where
The following figure illustrates the geometry of the Radon transform.
Geometry of the Radon Transform
Plot the Radon Transform of an Image
This example shows how to compute the Radon transform of an image,I
, for a specific set of angles,theta
, using theradon
function. The function returns,R
, in which the columns contain the Radon transform for each angle intheta
. The function also returns the vector,xp
, which contains the corresponding coordinates along the x-axis. The center pixel ofI
is defined to befloor((size(I)+1)/2)
, which is the pixel on the x-axis corresponding tox' = 0.
Create a small sample image for this example that consists of a single square object and display it.
I = zeros(100,100); I(25:75,25:75) = 1; imshow(I)
Calculate the Radon transform of the image for the angles 0 degrees and 45 degrees.
[R,xp] = radon(I,[0 45]);
情节转换for 0 degrees.
figure plot(xp,R(:,1)); title('Radon Transform of a Square Function at 0 degrees')
情节转换for 45 degrees.
figure plot(xp,R(:,2)); title('Radon Transform of a Square Function at 45 degrees')
Viewing the Radon Transform as an Image
The Radon transform for a large number of angles is often displayed as an image. In this example, the Radon transform for the square image is computed at angles from 0° to 180°, in 1° increments.
theta = 0:180; [R,xp] = radon(I,theta); imagesc(theta,xp,R); title('R_{\theta} (X\prime)'); xlabel('\theta (degrees)'); ylabel('X\prime'); set(gca,'XTick',0:20:180); colormap(hot); colorbar
拉东变换使用180年预测