I have an RGB image.Suppose say I have two circles in it.I want to know which one is filled and which one is not.I followed the following steps: -imported the image as Bitmap
-converted into grayscale and used CannyEdgeDetector filter to find the edges. I get the following image
circle containing the letter "D" gives two edges, where as I need only one circle edge. Secondly, how do I find out which circle is filled and which one is not.
I would not know any "formal" algorithm matching your criteria. I would also doubt that you would find any.
When you say the circles are "darkened", this can be interpreted as this: "Many pixels (above a population threshold) would be black, or at least dark (above a colour threshold).". Based on known circle and radius, I would follow this approach (written in pseudocode but I suppose you get the meaning):
I don't know if it is efficient, or if there is a more elegant way to do it. I suppose you could play with performance and accuracy by moderating the thresholds.
Hope I helped!