Find the circle for the image using imfindcircles
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello,
I have an image for which i need to determine the outer circle and then find the centre for the outer circle.I am using the function
imfindcircles()
I have the following code to do this :
img2 = imread('Image.bmp'); imshow(img2);
% Find all the circles with radius >= 15 and radius <= 30
[centers, radii, metric] = imfindcircles(img2,[15 416]);
% Retain the five strongest circles according to metric values
centersStrong5 = centers(1:1,:);
radiiStrong5 = radii(1:1);
metricStrong5 = metric(1:1);
% Draw the circle perimeter for the five strongest circles
viscircles(centersStrong5, radiiStrong5,'EdgeColor','b');
but when i run this code i am getting the following error.
Error in Cap_Test (line 16)
centersStrong5 = centers(1:1,:);
Please let me know the reason for this and how to solve this.
I am attaching the image here for which I need to find the centre.
The radius for this is around 416.
Looking forward to hear from you.
Thanks Pankaja
1 commentaire
Réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!