Imfindcircles detect multiple time the same circle
Mostrar comentarios más antiguos
Hi,
I want to use imfindcircles for an augmented reality project. But I have an issue with the function. First I want to detect the circles on my image (there are just black circles on a white background, image vision2.png) but if I don't put a very high sensitivity it just detects nothing, so that's why I have a sensitivity at 0.99 to be sure that it detects my 8 circles.
But then I need to detect the same 8 circles on a picture of my image (points.png), but when I do the same thing that before it detects false circles and even multiple times the same circle. I tried to reduce the sensibility but below 0.98 it doesn't detect anything.
Does someone knows what I'm doing wrong ?
Here is my code:
% Opening my image and looking for circles
I = imread('vision2.png');
imshow(I)
[centers, radii] = imfindcircles(I,[50 150],'ObjectPolarity','dark','Sensitivity',0.99);
viscircles(centers(1:8,:), radii(1:8),'EdgeColor','b');
m = centers(1:8,:);
% Opening the picture of my image and looking for circles
I2 = imread('points.png');
[centers, radii] = imfindcircles(I2,[50 150],'ObjectPolarity','dark','Sensitivity',0.99)
viscircles(centers(1:8,:), radii(1:8),'EdgeColor','b');
M = centers(1:8,:);
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Object Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
