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

Answers (1)

Image Analyst
Image Analyst on 18 May 2013
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 Comments

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.

This question is closed.

Asked:

on 18 May 2013

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!