Hello! i am having trouble finding the centroid of this petri dish.
when i run my code, matlab finds 12 centroids and when i use 'viscircles' its showing me 12 rings on top of each other. could this be a sensitivity issue? are there other ways i can eliminate the other circles and only detect the boundary of the petri dish?
here is my code and i have also attached the image im analyzing and the resultant image after running the code
for i = 1:numI file = images(i).name; img = imread(file); imshow(file)% d = drawline;
% pos = d.Position;
% diffPos = diff(pos);
% diameter = hypot(diffPos(1),diffPos(2));
[C,R] = imfindcircles(img,200,'ObjectPolarity','dark','Sensitivity',1); endv = viscircles(C,R);
Best Answer