Reputation: 477
I'm wondering how I should interprete the result of the radon transform of skimage. The documentation is not really precise.
Let's take this image as an example.
The 2 lines are represented by the black dots in the picture on the right side.
One line has 45 degrees and the other one 135 degrees. Now, what does the other coordinate mean? It shows ~150 for both lines. Why?
I first looked at this link: https://www.mathworks.com/help/images/detect-lines-using-the-radon-transform.html The code is in matlab and not from skimage. The presented way of interpreting the values does not work for my example. (most likely because it is not the exact same algorithm as in matlab. At least the returned value is different) The documentation of skimage just shows a simple code example. Not interpretation unfortunately.
So, what does the 150 mean. How can I interprete the value or if I was only given the right image. How would I create the left one? Thanks in advance
Upvotes: 3
Views: 2879
Reputation: 10682
I think the confusion started from the way you draw the sinogram. The Radon transform domain is the (alpha, s)
, where alpha
is the angle the normal vector to line makes with the x axis and s
is the distance of line from the origin (see following figure from here).
According to skimage radon documentation, the origin is the center of the image.
Therefore, I think you can make sense of the values if you plot it like
ax2.imshow(sinogram, cmap=plt.cm.Greys_r,
extent=(0, 180, -sinogram.shape[0]/2.0, sinogram.shape[0]/2.0), aspect='auto')
that result in
rather than
ax2.imshow(sinogram, cmap=plt.cm.Greys_r,
extent=(0, 180, 0, sinogram.shape[0]), aspect='auto')
that result in
for a 50x50 image.
You may have done it as shown here. In this page they show how to reconstruct your image using the sinogram using iradon and iradon_sart functions.
Upvotes: 5