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 件のコメント

safa
safa 2013 年 5 月 19 日
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);
Image Analyst
Image Analyst 2013 年 5 月 19 日
You forgot to tell us where you uploaded test.bmp.
safa
safa 2013 年 5 月 19 日

この質問は閉じられています。

質問済み:

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