CNR, SNR, slanted edge, MTF, do, find, check, PROBLEM! Please HELP!

4 views (last 30 days)
Ok, heres the thing. I have a homework, my deadline is on 30.4, in the morning, and i have a problem with doing some (many) things in matlab. I was using google, i was using wiki, i'm on the matlab site for days now and i don't know what to do else, but ask again, probably what was already asked. (sorry) So CNR, this is my code:
[fajl, putanja]=uigetfile ('*.bmp',...
'Odaberi slike',...
'MultiSelect', 'on');
disp('odaberite broj slike (1<i<16). \n')
a=input('broj slike=')
if (a>0) && (a<17)
for a=1:16
%mora ovako da ne bi preslo u char
[x,y]=imread(fajl{1,a});
regija=imcrop(x);
pozadina=imcrop(x);
[visina, sirina]=size(regija);
pozadina=imresize(pozadina, [visina, sirina]);
%CNR
vrednostregija=mean(regija);
vrednostpozadina=mean(pozadina);
S=vrednostregija-vrednostpozadina;
N=std(pozadina);
CNR=S/N;
end
end
So i can load my pictures, i can use them, but i cant do STD from the part i cropped, something with some kind of "var" that i don't know how to fix.
next thing. Slanted edge. I thought of doing it like this. Fint the first white pixel in the first line of pixels on my picture. Then do that for the last like and compare the column. Is this possible?
SNR and MTF are still something unreal for me since i'm begginer in matlab. yes probably its late to learn all this before monday, last few days are the only ones i had time to do this so please HELP, thanks in advance.

Answers (0)

Categories

Find more on C4ISR 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!