Definition of the projection lines of the radon transform

6 visualizaciones (últimos 30 días)
I am currently trying to figure out how exactly the lines/rays that the radon transform uses to project a matrix are defined/located. For the purposes of this post, let's stay in 2D. I have noticed that if I use an image/matrix of size n x n, the number of entries for the radon transform is a bit more than sqrt(2) * n. For example:
n_matrix = 400;
init_img = zeros(n_matrix,n_matrix);
for m = 1:n_matrix
for n = 1:n_matrix
if (m-n_matrix/2)^2+(n-n_matrix/2)^2 < (n_matrix/4)^2
init_img(m,n) = 0.5;
end
end
end
angs = 0:359;
sino = radon(init_img, angs);
Here, I create an image of a circle in a 400 x 400 matrix. The radon transform has a size of 567, which is a bit more than sqrt(2) * 400 = 565.7.
From that, I would infer that the distance between the rays is the same as the distance between matrix entries (if we interpret the matrix entries as, say, pixels of a certain size), and the number of rays used for the projection is (a bit more) than the diagonal length of the matrix. If that is true, then a) how can I imagine the positioning of the rays and b) what happens to rays if they do not cross the matrix at all? To specify:
a) My thought is that we define a "starting line" for the rays that is parallel to the x' axis and arbitrarily far from the matrix such that the starting line and the matrix never intersect. Is this a correct image?
b) If a) is correct, then that implies a "padding" between the matrix and the starting line, which I assume is zero? Also, similarly: If we have sqrt(2) * n rays and theta = 0, that implies that (sqrt(2) - 1) * n rays go beyond the edges of the matrix; this is also padded as zero, I guess?
If anything is unclear, please let me know. I am also new to Matlab, so if anyone has hints on how to create an image to try and visualise this matter, or how to replace the for loop by something more efficient, I'm all ears. Thanks for any answers in advance.

Respuesta aceptada

Image Analyst
Image Analyst el 24 de Nov. de 2021
Probably depends on whether they're using pixel centers or bounding boxes of pixels. Since it's slightly larger I imagine they're using bounding boxes, similar to how imcrop defines the bounding box a half pixel outside the center of the pixel.
For what it's worth, I'm attaching my radon demo.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by