Function: imfindcircles detects false circles.

4 ビュー (過去 30 日間)
Meghana Dinesh
Meghana Dinesh 2015 年 4 月 3 日
コメント済み: Meghana Dinesh 2015 年 4 月 4 日
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:

採用された回答

Image Analyst
Image Analyst 2015 年 4 月 3 日
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 件のコメント
Meghana Dinesh
Meghana Dinesh 2015 年 4 月 4 日
Thanks a lot for the detailed explanation. Perfectly deals with my issue.

サインインしてコメントする。

その他の回答 (1 件)

Anand
Anand 2015 年 4 月 3 日
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 件のコメント
Meghana Dinesh
Meghana Dinesh 2015 年 4 月 4 日
It's completely white there. There is absolutely no variation in the pixel intensity. What made it locate circles there?

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by