Page 1 of 1

Finding a round icon in an image

PostPosted: Sun Dec 23, 2018 3:36 pm
by Guye
Hello,

I am new with image processing so please excuse in advance.

I am trying to find a round colored glyph in an image and wanted to hear you guys ideas on my implementation and if there is a better one.
I have 2 images, the template and the source. Did the following steps:
1. Create a filter out of the RGB ranges from the template (without the black pixels that are the background).
2. Apply the filter on the source (that cleaned most of the pic from all other but the icon).
3. Run a ExhaustiveTemplateMatching between the template and the source.

That worked very well besides, and that is the template image is square and the glyph is round. Leaving the corners of the template image processed in the ExhaustiveTemplateMatching failing when the background has some color in range of the filter.
So I am looking for a way to disregard the black tips of the glyphs in ExhaustiveTemplateMatching.

Thank you.

Re: Finding a round icon in an image

PostPosted: Sun Dec 23, 2018 4:00 pm
by andrew.kirillov
Hello,

Hardly possible to recommend much without samples of icons and images you are processing. The "round colored glyph" may sound simple, but will not look the same to many.

Guye wrote:So I am looking for a way to disregard the black tips of the glyphs in ExhaustiveTemplateMatching.

The easiest would be to modify that class, so it does not compare black pixels of the "icon" with source image.

Just a note. Template matching is not really implemented in AForge.NET Framework. ExhaustiveTemplateMatching is too simple to use in most cases. If size/orientation of template image/icon changes within the source image, then it will fail badly.