1 view (last 30 days)
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);
img= ones(size(P));
%% No. of iterations
iter=15;
%% Operation of Iteration through Loop
for n= 1:iter
ratio= R/(fp+0.000001);
sino_ones= ones(size(R,1));
img=img*correction;
caxis([0 0.0005]);
subplot(2,2,3);
imshow(img);
title('Reconstructed Image');
end
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?
{"ft_lang_label":"__label__en","ft_lang_prob":0.81294906,"math_prob":0.863104,"size":1760,"snap":"2022-27-2022-33","text_gpt3_token_len":473,"char_repetition_ratio":0.094533026,"word_repetition_ratio":0.015209125,"special_character_ratio":0.27159092,"punctuation_ratio":0.15492958,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9800881,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-06-30T15:53:24Z\",\"WARC-Record-ID\":\"<urn:uuid:143e7408-94e4-44dd-aee1-e8ca309a3576>\",\"Content-Length\":\"122761\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:b7df2073-50cc-452d-b1bc-67c752576392>\",\"WARC-Concurrent-To\":\"<urn:uuid:d7fb35f0-a749-4201-86f3-823352910c26>\",\"WARC-IP-Address\":\"23.218.145.211\",\"WARC-Target-URI\":\"https://nl.mathworks.com/matlabcentral/answers/1616495-problem-in-iradon?s_tid=prof_contriblnk\",\"WARC-Payload-Digest\":\"sha1:D3YLBBEVOLCGENHHXSFLANALHYIJNYWC\",\"WARC-Block-Digest\":\"sha1:A7RRDREAEHUUILRJ3PTSHIA73JZ25RNS\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-27/CC-MAIN-2022-27_segments_1656103850139.45_warc_CC-MAIN-20220630153307-20220630183307-00728.warc.gz\"}"}