1
$\begingroup$

I have a problem understanding radon transform, even though concept fairly simple.

Suppose I have single point function on my data set which is circled on following image. If radon transform is defined by formula

$Rf(s, \theta)=\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}f(x,y)\delta(x \cos\theta + y\sin\theta - s)\partial x \partial y$

then for $\theta = 0$ I'm gonna integrate my function along red line. Then I'm gonna shift this line one pixel up and continue this process until the whole dataset is processed. When the line reaches circled point, radon transform will generate single point with coordinates $R(\theta, s)$ where s is an offset at which red line hits my point (on the image s is shown by blue line).

The next step is to change $\theta$ and repeat process. That's my understanding of the transform process.

Now the question. When $\theta=45$, which is illustrated by green line, there's no offset, so for radon transform point will be generated at coordinates $\theta=45, s=0$.

enter image description here

But when I'm trying to mplement this via octave/matlab, I'm getting following image. So left one is source image, and right one is radon transform. According to my current understanding of radon transform, for $\theta=45$ I should have a point at $s=0$. But matlab shows straight line on radon transform plot.

The actual question is "why does Radon transform in that particular case ends up with non-zero values sharing the same s coordinate for each θ". As it follows from my explanation, I expect it to have non-zero values for θ=0,s=length_of_blue_line and θ=45,s=0. The main idea here is that I expect s being different for every θ in this particular case. So for full range radon transform it should not be a horizontal line, from my point of view. And I need to find a mistake in my understanding of how this transform actually works.

Here's the code. It seems that it's something wrong with my understanding of transform. Any help is appreciated.

clear -all;
clc;

img = zeros(128, 128);
img(64,64) = 1;
rad = radon(img);

x = 1;
y = 2;


subplot(y,x,1); imagesc(img);
colormap(gray);
subplot(y,x,2); imagesc(rad);
colormap(hot);
colorbar;

enter image description here

  • 0
    The radon function gives you the transform for all angles. If you want a single angle you should extract a column from the returned matrix.2017-01-21
  • 0
    I know. The actual question is "why does Radon transform in that particular case ends up with non-zero values sharing the same $s$ coordinate for each $\theta$". As it follows from my explanation, I expect it to have non-zero values for $\theta=0, s=length\_of\_blue\_line$ and $\theta=45, s=0$. The main idea here is that I expect s being different for every $\theta$ in this particular case. So for full range radon transform it should not be a horizontal line, from my point of view. And I need to find a mistake in my understanding.2017-01-21
  • 0
    I think that for MATLAB the middle point of the matrixes is at coordinates $(0,0)$. To have the condition you are describing try turning on the point at $(96,96)$.2017-01-21
  • 0
    Well, (96, 96) seems to work as I expect it to. So, my explanation of Radon transform is more or less valid, is it? If it is right, then extract your answer, so I could accept it.2017-01-21

1 Answers 1

0

Question is answered by @N74. Reposting the comment just in order to close the thread.

I think that for MATLAB the middle point of the matrixes is at coordinates (0,0) . To have the condition you are describing try turning on the point at (96,96). – N74