Text Recognition

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
ammone95
Newbie
Posts: 5
Joined: Tue Feb 28, 2017 9:43 pm

Text Recognition

Post by ammone95 » Tue Apr 18, 2017 9:52 pm

Hi guys, I want to do some statistics about a game and I need to read some texts from an image and save every thing in a text file. I need to read the different coloured areas and save them like this:

Vampire Rune(1)


ATK +36


HP +6%
CRI Rate +5%
CRI Dmg +4%
Resistance +7%


I was thinking about the "GetTextInRect" in every single area but i don't know if it's efficient or not. Maybe there is a easier way to do it

I'm using the version 11 of Macro

Image

Thanks

User avatar
Marcus Tettmar
Site Admin
Posts: 7380
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Text Recognition

Post by Marcus Tettmar » Thu Apr 20, 2017 2:40 pm

GetTextInRect will only work for screen text which is created via Windows TextOut functions. So that will NOT be the case in an image. The only way I can think of doing that would be using an OCR solution and your mileage may vary. Macro Scheduler does not have OCR built in so you'd have to call a third party solution from your macros.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Re: Text Recognition

Post by CyberCitizen » Fri Apr 21, 2017 8:52 am

You could use tesaract to convert to text etc, however I have had more success inverting the image colours when it's white text on black and sharpening the image using photoresize standalone exe..

Sent from my Redmi Note 3 using Tapatalk
FIREFIGHTER

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts