How to search for famous logo in scanned image?
Asked Answered
P

3

8

I have following scanned document, with the logo on it, and I have another black and white image with same logo and style (Shown in black and white color below).

How do I make sure that the logo is present on this image or not?

Search for Image within the Image

Usually I will have many scanned documents, OCR will pickup MTNL, but sometimes these logos are just made up of symbols not recognized easily by OCR.

Size and position of logos change, they are not fixed many times. They may be placed anywhere on the document.

I want to organize and catalog scanned images based on the logos and symbols present. Most documents may or may not be in english, may or may not contain any bar codes, in such case logo match will help.

I have seen Aforge.NET library, but I am not very much sure which methods to combine to do search. Pixels search is very slow and fails if source destination are of different size.

I have heard that YouTube does some sort of Histogram or Heat Signature match to see if the video contains any copyrighted material. I will be helpful if someone can guide me in this case.

My ideal choice would be C# and Aforge.NET, otherwise some command line tool will be appreciated.

Peltast answered 25/9, 2012 at 10:54 Comment(6)
I've used opencv, which has a .net wrapper and could be an option. OpenCV Template MatchingBarbitone
OpenCV is another lib to mention herePalaestra
@GeorgeDuckett, will it work with different size but same aspect ratio?Peltast
I'm not that familiar but i'd be surprised if you couldn't work out something (even if it was manually re-sizing the source logo image and testing for multiple sizes)Barbitone
@GeorgeDuckett, combinations are impossible, logo size will not be fixed, considering 72 dpi also, will have to try 100 combinations probably, simple pixel search will be too much time to spend on one document, considering we will have 1000s of logos to match.Peltast
Just as a matter of interest, if anybody knows the science behind how this is done (without a library), I'd love a brief explanation. Very interesting problem!Ovolo
C
2

You can try using Aforge.net
Check these links
1) http://www.aforgenet.com/articles/shape_checker/
2) http://www.codeproject.com/Articles/9727/Image-Processing-Lab-in-C
3) http://www.aforgenet.com/forum/viewtopic.php?f=4&t=323

Carioca answered 25/9, 2012 at 11:7 Comment(2)
My shapes are complicated and how do we define set of shapes together to form the logo?Peltast
The third link tells you to use ExhaustiveTemplateMatching which is the right solution for your problem. OpenCV/EmguCV also has better template matching algorithms than Aforge.Net.Numbskull
C
1

Detect useful features in your logo image, and look for those features in the scanned document. SIFT is a useful feature descriptor that is scale and rotation invariant. Other descriptors include SURF and HOG.

If you look around, there will be plenty of implementations, some of them even in C#.

Chekiang answered 26/9, 2012 at 13:4 Comment(0)
S
1

You can use this small utility: https://github.com/remdex/logoDetect It worked for me. Perhaps it will work for you also.

Sledge answered 29/12, 2012 at 13:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.