Problem in "iradon"

5 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);
title('True Image');
theta = 0:1:179;
R = radon(P,theta); % Projection Data "m".
title('Radon Transformed Image');
img= ones(size(P));
%% No. of iterations
%% 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);
caxis([0 0.0005]);
title('Reconstructed Image');
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)

Community Treasure Hunt

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

Start Hunting!

Translated by