필터 지우기
필터 지우기

Problem in "iradon"

조회 수: 3 (최근 30일)
Amit Chakraborty
Amit Chakraborty 2021년 12월 23일
댓글: Image Analyst 2021년 12월 23일
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
Amit Chakraborty
Amit Chakraborty 2021년 12월 23일
@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 2021년 12월 23일
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?

댓글을 달려면 로그인하십시오.

답변 (0개)

제품

Community Treasure Hunt

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

Start Hunting!

Translated by