I = imread('P1_G5_4.png') ; imshow(I) hold on
[y,x] = find(I==0) ; % Centre of circle C = [mean(x) mean(y)] ; % GEt radius of circle R = max(sqrt((C(1)-x).^2+(C(2)-y).^2)) ; th = linspace(0,2*pi) ;
xc = C(1)+R*cos(th) ; yc = C(2)+R*sin(th) ;
plot(xc,yc,'r') ;