Function: imfindcircles detects false circles.

4 visualizaciones (últimos 30 días)
Meghana Dinesh
Meghana Dinesh el 3 de Abr. de 2015
Comentada: Meghana Dinesh el 4 de Abr. de 2015
I have come across this a few times. The function imfindcircles detects false circles (like at the corners shown below) even when there is no pixel intensity variation at those places. What could the reason be? How can I avoid this? Are there any other suitable methods to find circles apart from this?
I have attached an example image.
This is my code:
clear all;
close all;
A = imread('synthetic_img3.png');
BW1 = bwmorph(im2bw(A),'close');
figure;
imshow(BW1)
[centers,radii] = imfindcircles(BW1,[5,500]);
figure, imshow(BW1);
hold on
viscircles(centers, radii,'EdgeColor','b');
The resulting output:

Respuesta aceptada

Image Analyst
Image Analyst el 3 de Abr. de 2015
If you want to segment out the small circles, you could also use thresholding and size filtering (use imclearborder and bwareaopen) instead of imfindcircles(). Then you could do things like find area, perimeter, location, etc. with regionprops().
  3 comentarios
Meghana Dinesh
Meghana Dinesh el 4 de Abr. de 2015
Thanks a lot for the detailed explanation. Perfectly deals with my issue.

Iniciar sesión para comentar.

Más respuestas (1)

Anand
Anand el 3 de Abr. de 2015
Looks like the sensitivity is too high. I reduced the sensitivity from the default (0.85) to 0.8 and that helped get rid of the spurious circles.
[center, radii] = imfindcircles(BW1,[5 500],'Sensitivity',0.8);
  1 comentario
Meghana Dinesh
Meghana Dinesh el 4 de Abr. de 2015
It's completely white there. There is absolutely no variation in the pixel intensity. What made it locate circles there?

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by