anyone can tell me about radon transform?
Show older comments
I = imread('peppers.bmp');
A = im2double (I);
R = radon (A,0:180);
P = iradon (R,0:180);
this is the coding i use for radon transform and its inverse. the resulting image for theta 180 degree much clear rather than 90 degree. i don't understand the situation. why it is happen? thank you for your help.
2 Comments
Andrew Newell
on 20 Mar 2011
Could you post peppers.bmp? See Markup help (http://www.mathworks.com/matlabcentral/answers/help/markup) for how to do this.
si kijang
on 21 Mar 2011
Accepted Answer
More Answers (1)
Sean de Wolski
on 21 Mar 2011
You will never be able to recover the same image as the original and some data will be lost as you are resampling twice (radon, iradon).
Instead of using your peppers image, use the phantom head provided by MATLAB or this phantom: http://www.mathworks.com/matlabcentral/fileexchange/29364-compressed-sensing-mri-phantom-v1-1
Which have features that can easily be detected. I've made this demo script for you to try; it'll take a minute or so to run but will provide you with an idea of what to expect.
P = phantom(256);
subplot(221);
imshow(P);
title('Original');
theta = 0:5:179.99;
Precon = iradon(radon(P,theta),theta);
subplot(222)
imshow(Precon);
title('0:5:179.99');
theta = 0:1:179.99;
Precon = iradon(radon(P,theta),theta);
subplot(223);
imshow(Precon);
title('0:1:179.99');
theta = 0:.1:179.99;
Precon = iradon(radon(P,theta),theta);
subplot(224);
imshow(Precon);
title('0:0.1:179.99');
Now zoom in on some the features to compare.
Ps. Bjorn answered your question correctly when he said don't use 0:360 but rather 0:<180
5 Comments
si kijang
on 21 Mar 2011
Sean de Wolski
on 21 Mar 2011
That defines a vector 0,5,10,15...175. It is the thetas to use. I have no idea why phantom doesn't work for you, unless you don't have the Image Processing Toolbox. But you have radon/iradon which ware also in the IPT.
Type at the command line:
which phantom
si kijang
on 28 Mar 2011
Sean de Wolski
on 28 Mar 2011
Having the 'n' argument is a grandfather syntax that only calculates the radon transform at n points
open radon
to view what it says. Moral of the story: don't use the 3rd argument!
Sean de Wolski
on 20 May 2013
@Aissa, please ask this as a new question with a small example. These comments will be deleted.
Categories
Find more on Image Transforms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!