필터 지우기
필터 지우기

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 CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by