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$.
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;

