フィルターのクリア

hi, am doing my project in Diabetic Retinopathy, for that I need to calculate the background image. I didnt get output . pls check my code and help me to get the output

1 回表示 (過去 30 日間)
a=imread('RGB image filename');
%imtool(a)to crop center portion of an eye image
b=imcrop(a,[178.5 27.5 349 542]);
c=rgb2gray(b);
%basic background image separation ie., gray to binary
%s=min intensity value of c:max intensity value of c
for s=63:224
threshforc=118;
if c(s)<threshforc
c(s)=0;
else
c(s)=1;
end
imshow(c(s));
end
I tried im2bw also. I need to do with threshold value only but i got the output as 1 or 0 in the command window insted of binary image.wat can i do

回答 (2 件)

David Sanchez
David Sanchez 2013 年 8 月 23 日
BW = im2bw(I, level) converts the grayscale image I to a binary image.

Image Analyst
Image Analyst 2013 年 8 月 23 日
Not correct. You're using linear indexing to binarize just the first column of your grayscale image, c. Most likely not what you want. I doubt global thresholding would be good for fundus images anyway (for a couple of years my dissertation work was on fundus images before I switched to radiology). You can post your image if you'd like more advice. You can also check here for algorithms of people who got it right and published their method: http://iris.usc.edu/Vision-Notes/bibliography/contentsmedical.html#Medical%20Applications,%20CAT,%20MRI,%20Ultrasound,%20Heart%20Models,%20Brain%20Models

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by