How detect circle like objects from binary image

I want to detect number of objects from a binary image. As you can see below these objects are overlapped a bit with other objects. My objects are circle like objects (not excact circle).
Any help would be much appriciated.

답변 (1개)

Diego Samaniego
Diego Samaniego 2020년 10월 21일

1 개 추천

You can measure the area or the approximate number of pixels that one of the circles occupies, then you take the area of ​​the total number of figures and divide it by the area that an object occupies.
im = imread('image.png');
u = graythresh(im);
im2 = im2bw(im,u);
circ_1 = 900; % aprox area of one circle
area_image=bwarea(im2); %area of all circles
N_circles = floor(area_image/circ_1)

댓글 수: 1

Thakn you Diego Samaniego for your answer.
This a good idea to find the number based on a single circle's area. but the thing is I can not assume area of a circle because the ultimate goal is to find number of circles with it's diameter. Each circles may or maynot be same. And the system should find out this automatically.
I really appricate your answer. Do you have any sugestion for my situation?
Many thanks

댓글을 달려면 로그인하십시오.

질문:

2020년 10월 20일

댓글:

2020년 10월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by