Calculate Radon Transform and Display Plot
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.
imshow(R,,'Xdata',theta,'Ydata',xp,'InitialMagnification','fit') xlabel('\theta (degrees)') ylabel('x''') colormap(gca,hot), colorbar
Make the axes scale invisible.
I — Grayscale image
2-D numeric matrix
Grayscale image, specified as a 2-D numeric matrix.
theta — Projection angles
0:179 (default) | numeric scalar | numeric vector
Projection angles in degrees, specified as a numeric scalar or numeric vector.
R — Radon transform
numeric column vector | numeric matrix
xp — Radial coordinates
Radial coordinates corresponding to each row of
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
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.
 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.
Accelerate code by running on a graphics processing unit (GPU) using Parallel Computing Toolbox™.
This function fully supports GPU arrays. For more information, see Image Processing on a GPU.