Page 1 of 1

Find the text in a image

Posted: 2010-12-27T08:31:14-07:00
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.

Re: Find the text in a image

Posted: 2010-12-27T10:49:59-07:00
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

Re: Find the text in a image

Posted: 2010-12-28T22:55:23-07:00
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.