Borrar filtros
Borrar filtros

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 visualización (últimos 30 días)
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

Respuestas (2)

David Sanchez
David Sanchez el 23 de Ag. de 2013
BW = im2bw(I, level) converts the grayscale image I to a binary image.

Image Analyst
Image Analyst el 23 de Ag. de 2013
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

Categorías

Más información sobre Image Processing Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by