Problem in "iradon"

12 views (last 30 days)
Amit Chakraborty
Amit Chakraborty on 23 Dec 2021
Commented: Image Analyst on 23 Dec 2021
I am having the error with the following code which " THETA does not match the number of projections". I know that the main reason behind this is the unequal number column. But I somehow not able to solve it. I am continously havinig error in the "sens_img" variable: Moreover I am also having warning message at "ratio" variable inside the loop [The warning message is : Rank Defficinecy]. Can anyone provide the some suggestions so I could run my code succesffully? Any kinds of help would appreciated .
%% MLEM %%
P = phantom('Modified Shepp-Logan',180);
subplot(2,2,1);
imshow(P);
title('True Image');
theta = 0:1:179;
R = radon(P,theta); % Projection Data "m".
subplot(2,2,2);
imshow(R);
title('Radon Transformed Image');
img= ones(size(P));
%% No. of iterations
iter=15;
%% Operation of Iteration through Loop
for n= 1:iter
fp= radon(img,theta);
ratio= R/(fp+0.000001);
sino_ones= ones(size(R,1));
sens_img= iradon(sino_ones,theta);
correction=iradon(ratio,theta)/sens_img;
img=img*correction;
caxis([0 0.0005]);
subplot(2,2,3);
imshow(img);
title('Reconstructed Image');
end
  3 Comments
Amit Chakraborty
Amit Chakraborty on 23 Dec 2021
@Walter Roberson Thank you for your kind reply.
I have tried your solution but it is still telling me error at the "sens_img" variable line. That same error I mentioned above. Thank you .
Image Analyst
Image Analyst on 23 Dec 2021
What are you trying to do inside the loop -- you forgot to put any comments there! Are you trying to compute the mean of the projection because the number of pixels in each projection is different? Then just sum the ones projection to count the pixels and divide by that.
Why are you computing fp every single iteration when it doesn't change?

Sign in to comment.

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!