1

I try to detect and count circles in image (for example smarties)

I use HSL color space. But I am not able to distiguish colors od the same color if they are in touch. I try to erode and dilate picture. But result is the same, I have only some blobs(connected components) od the same color. Do you have some general algorithm for this problem?

(I try to do that with EMGUCV library) I cant send image, because I have small reputation. Thanks in advance.

Maerorek
  • 109
  • 1
  • 3
  • 9

1 Answers1

0

There seems to be a similar problem asked here. This is the case when 2 circles form a single blob. This has already been addressed with the watershed of the distance function of the blob here. There is a better demonstration here with example showing how to separate a bunch of circular pills of same color that need separation.

Community
  • 1
  • 1
beedot
  • 652
  • 5
  • 12