Find the circle for the image using imfindcircles

1 visualización (últimos 30 días)
Pankaja Tanjore
Pankaja Tanjore el 3 de Mzo. de 2015
Comentada: Ashish Uthama el 3 de Mzo. de 2015
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 comentario
Ashish Uthama
Ashish Uthama el 3 de Mzo. de 2015
The image attachment did not make it through, could you try again?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Programming en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by