This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Radon transform


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


R = radon(I) returns the Radon transform R of the grayscale image I for angles in the range [0, 179] degrees. The Radon transform is the projection of the image intensity along a radial line oriented at a specific angle.


R = radon(I,theta) returns the Radon transform for the angles specified by theta.

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


[gpuarrayR,gpuarrayXp] = radon(gpuarrayI,theta) performs the Radon transform on a GPU. This syntax requires the Parallel Computing Toolbox™.


collapse all

Make the axes scale visible for this image.


Create a sample image.

I = zeros(100,100);
I(25:75, 25:75) = 1;

Calculate the Radon transform.

theta = 0:180;
[R,xp] = radon(I,theta);

Display the transform.

xlabel('\theta (degrees)')
colormap(gca,hot), colorbar

Make the axes scale invisible.


Calculate the Radon transform on a GPU and visualize it.

I = zeros(100,100);
I(25:75, 25:75) = 1;
theta = 0:180;
[R,xp] = radon(gpuArray(I),theta);
xlabel('\theta (degrees)')
colormap(gca,hot), colorbar

Input Arguments

collapse all

Grayscale image, specified as a numeric matrix.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64 | logical

Projection angles (in degrees), specified as a numeric scalar or numeric vector.

If the input image is gpuarrayI, then theta can also be a gpuArray containing a numeric scalar or vector.

Data Types: double

Grayscale image on a GPU, specified as a gpuArray containing an image of data type single, double, uint8, uint16, uint32, int8, int16, or int32.

Output Arguments

collapse all

Radon transform of image I, returned as one of the following.

  • If theta is a scalar, R is a numeric 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.

Radial coordinates corresponding to each row of R, returned as a numeric vector. The radial coordinates 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

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

Radon transform of image gpuarrayI when run on a GPU, returned as a gpuArray.

Radial coordinates corresponding to each row of gpuarrayR when run on a GPU, returned as a gpuArray.


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.


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

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

Introduced before R2006a

Was this topic helpful?