Find the text in a image

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Cmars
Posts: 8
Joined: 2010-10-29T12:03:56-07:00
Authentication code: 8675308

Find the text in a image

Post by Cmars »

Well I'm making this http://wikia.com bot that will go trough all images and see if it's a pmg (PimpMyGun.DoctorNoob.com (A piece of crap game that well builds guns)) and change name of it, I've built the bot that searches but I'm kinda stuck at the image part.
The thing it should do is to look for this text:
Image
The text doesn't change size or anything, it's just down in the corner.
Sample image:
Image
Other sample:
Image
It would be really useful if some one could help because I'm kinda newbie when it comes to ImageMagick.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Find the text in a image

Post by fmw42 »

Do you want to add the text or do you want to search the image to find if that text exists. If the latter, you can use the compare function to search a larger image for a smaller one and find its match score and location.

see

http://www.imagemagick.org/script/compare.php (note with later releases of IM you need to add -subimage-search)

and

an example is at viewtopic.php?f=1&t=14613&p=51076&hilit ... ric#p51076
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Find the text in a image

Post by anthony »

If the text is known, and always in the same place you can always just draw over it.

Alternative make the text a hole and 'fill-in' the colors around the text.
For example...
http://www.imagemagick.org/Usage/photos/#anonymity
as well as the next section.

Really it depends on exactly what you want, which you are not clear about.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply