Quantcast

Documentation Center

  • Trial Software
  • Product Updates

radon

Radon transform

Syntax

R = radon(I, theta)
[R,xp] = radon(...)
[___]= radon(gpuarrayI,theta)

Description

R = radon(I, theta) returns the Radon transform R of the intensity image I for the angle theta degrees.

The Radon transform is the projection of the image intensity along a radial line oriented at a specific angle. If theta is a scalar, R is a column vector containing the Radon transform for theta degrees. If theta is a vector, R is a matrix in which each column is the Radon transform for one of the angles in theta. If you omit theta, it defaults to 0:179.

[R,xp] = radon(...) returns a vector xp containing the radial coordinates corresponding to each row of R.

The radial coordinates returned in xp are the values along the x'-axis, which is oriented at theta degrees counterclockwise from the x-axis. The origin of both axes is the center pixel of the image, which is defined as

floor((size(I)+1)/2)

For example, in a 20-by-30 image, the center pixel is (10,15).

[___]= radon(gpuarrayI,theta) performs the Radon transform on a GPU. The input image and the return values are 2-D gpuArrays. theta can be a double or gpuArray of underlying class double. This syntax requires the Parallel Computing Toolbox™.

Class Support

I can be of class double, logical, or any integer class. All other inputs and outputs are of class double. Neither of the inputs can be sparse.

gpuarrayI is a gpuArray with underlying class uint8, uint16, uint32, int8, int16, int32, logical, single or double and must be two-dimensional. theta is a double vector or gpuArray vector of underlying class double.

Examples

expand all

Calculate Radon Transform

Calculate Radon transform and visualize it.

iptsetpref('ImshowAxesVisible','on')
I = zeros(100,100);
I(25:75, 25:75) = 1;
theta = 0:180;
[R,xp] = radon(I,theta);
imshow(R,[],'Xdata',theta,'Ydata',xp,...
            'InitialMagnification','fit')
xlabel('\theta (degrees)')
ylabel('x''')
colormap(hot), colorbar
iptsetpref('ImshowAxesVisible','off')

Calculate Radon transform on a GPU

Calculate Radon transform on a GPU and visualize it.

iptsetpref('ImshowAxesVisible','on')
I = zeros(100,100);
I(25:75, 25:75) = 1;
theta = 0:180;
[R,xp] = radon(gpuArray(I),theta);
imshow(R,[],'Xdata',theta,'Ydata',xp,...
            'InitialMagnification','fit')
xlabel('\theta (degrees)')
ylabel('x''')
colormap(hot), colorbar
iptsetpref('ImshowAxesVisible','off')

More About

expand all

Algorithms

The Radon transform of an image is the sum of the Radon transforms of each individual pixel.

The algorithm first divides pixels in the image into four subpixels and projects each subpixel separately, as shown in the following figure.

Each subpixel's contribution is proportionally split into the two nearest bins, according to the distance between the projected location and the bin centers. If the subpixel projection hits the center point of a bin, the bin on the axes gets the full value of the subpixel, or one-fourth the value of the pixel. If the subpixel projection hits the border between two bins, the subpixel value is split evenly between the bins.

References

Bracewell, Ronald N., Two-Dimensional Imaging, Englewood Cliffs, NJ, Prentice Hall, 1995, pp. 505-537.

Lim, Jae S., Two-Dimensional Signal and Image Processing, Englewood Cliffs, NJ, Prentice Hall, 1990, pp. 42-45.

See Also

| | | | |

Was this topic helpful?