MATLAB: Help with using imfindcircles to identify a circle and viscircles to outline the perimeter in a digital image

circle detectionimage analysisimage processingImage Processing Toolboximage segmentationthreshold

I guess my title says it all. The thing is, the circle that I am finding is underdrawn with some images (you can ignore the red line):
Screen Shot 2019-11-28 at 10.14.29.png
I'm not entirely sure how to fix this so I can encompass more of the circle in my image. Below is part of the code I'm using:
clc; clear all;
I = imread('18_20150616_201-1.png'); %read in the image
GS = rgb2gray(I);
imshow(GS);
[center, radius] = imfindcircles(GS,[75 150]);
imshow(GS);
viscircles(center,radius,'Color','b'); %plot circle outline

Best Answer

Just threshold and fill and get largest blob and measure equivalent circular diameter:
mask = GS > someValue; % You determine what someValue is. Ask if you need help.
mask = imfill(mask, 'holes');
mask = bwareafilt(mask, 1);
props = regionprops(mask, 'EquivDiameter');
diameter = props.EquivDiameter
message = sprintf('The diameter = %f pixels, diameter)
uiwait(helpdlg(message));