How to obtain the correct data points to fit circle for optic disk detection

2 views (last 30 days)
Please help, I am struggling to get this right:
I have obtained a thresholded image, which is in binary image format. My problem is from this image I want to locate the round optic disk by means of the kasa method. Optic disk is the biggest and the lightest circle in the retina image. I want to illuminate this, because this is normal for every eye. I know about bw label and region props. But Please in exact coding, how must I get the the xy datapoints to give to the function of KASA to draw circle. The circle must be drawn around where the most ones (maximumx) in the binary image are present. I want a circle be drawn effectively around the optic disk for every retina image.
Here is my MATLAB code and a image.
figure,imshow(a),'title binary image';
[L,num]=bwlabel(a);
[y x] = find(a);
XY=[y x] ;
figure,imshow(a),'title binary image';
hold on
Par = CircleFitByKasa(XY)
r=Par(3);
x=Par(2);
y=Par(1);
th = 0:pi/50:2*pi;
xunit = r * cos(th) + x;
yunit = r * sin(th) + y;
h = plot(xunit, yunit);
hold off
% [L,num]=bwlabel(a);
% blobMeasurements = regionprops(L, 'all')
% [r, c,v] = find(L);
% rbar=mean(r);
% cbar=mean(c);
% datapoints=[r,c,v];
% s = regionprops(L,'area');
% CC = bwconncomp(a)
  3 Comments
Image Analyst
Image Analyst on 10 Aug 2013
Which cluster of dots is the optic disc? Does it have a solid contiguous outline, or is it broken?

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!