MATLAB: Find and plot the center of a circle

centereyeImage Processing Toolboxiris

I have a code that makes a circle around the iris in a eye image, and now i need to show the center of this circle how do i do that?
% code
r = bboxeyeshalf(1,4)/4;
[centers, radii, metric] = imfindcircles(eyesImage, [floor(r-r/4) floor(r+r/2)], 'ObjectPolarity','dark', 'Sensitivity', 0.93); % Hough Transform
[M,I] = sort(radii, 'descend');
eyesPositions = centers;
subplot(2,2,2),imshow(eyesImage); hold on;
viscircles(centers, radii,'EdgeColor','b');

Best Answer

You can display the center of circle using
viscircles(centers, radii,'EdgeColor','b');
plot(centers(1), centers(2), '+')
Related Question