detect circle between some shapes

hi,in my image has some shapes(circle,square,triangle) . how can I detect circle between other shapes? and can tell me how many circle there is in my image.thanks in advance

回答(1 个)

Image Analyst
Image Analyst 2013-5-18

0 个投票

Have you tried imfindcircle() in the Image Processing Toolbox? Otherwise try hough() or somehow find all the objects and extract the circles based on their circularity = perimeter^2 / (4*pi*Area).

3 个评论

i wrote my code according imfindcircle() , but it didn't work.
I = imread('c:\safa\test.bmp');
b=rgb2gray(I);
[centers, radii, metric] = imfindcircles(b,[5 30]);
viscircles(centers, radii,'EdgeColor','b');
subplot (2,3,1), imshow (b);
You forgot to tell us where you uploaded test.bmp.

此问题已关闭。

提问:

2013-5-18

关闭:

2021-8-20

Community Treasure Hunt

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

Start Hunting!

Translated by