Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

OCR.ahk - Library for recognizing text in images


  • Please log in to reply
88 replies to this topic
farfaraway
  • Members
  • 89 posts
  • Last active: Sep 18 2015 04:52 PM
  • Joined: 13 Nov 2013

nevermind, it was the white spaces that was affecting the operation.  got it working after i cleared it of trailing white spaces.  awesome tool!



zalittle
  • Members
  • 3 posts
  • Last active: Sep 09 2014 06:54 PM
  • Joined: 27 Jun 2014

Hey, I think you have a great script here, question though, what is the likelyhood of it ever being able to decipher the following picture?

 

http://picpaste.com/5-11Cd7Jhe.png



guest3456
  • Members
  • 1704 posts
  • Last active: Nov 19 2015 11:58 AM
  • Joined: 10 Mar 2011

Hey, I think you have a great script here, question though, what is the likelyhood of it ever being able to decipher the following picture?

 

http://picpaste.com/5-11Cd7Jhe.png

 

zero



Neobot
  • Members
  • 184 posts
  • Last active: Aug 25 2017 08:45 PM
  • Joined: 30 Dec 2011

I have a problem.

 

When I try to read numbers from the game I want using bluestacks, it shows me garbage output, but when I take a picture of the number 1726 and upload it to imagur, it reads it fine, although wrong, it reads it as (I7Z6) close enough.

 

Is it possible for me to take a picture of each number and have this OCR script learn the font, then will it be able to read off the game screen?

 

ATM everything else works fine but what I want to use it for and the numbers in the image are BIG AND CLEAR...

 

 

6Ol6QSp.png



Neobot
  • Members
  • 184 posts
  • Last active: Aug 25 2017 08:45 PM
  • Joined: 30 Dec 2011

I think I stumbled upon something interesting. The background seems to have an effect on the reading. I changed this forums background color to black and now it is reading the last 2 numbers, 26 when I change it back to default white and hover over the picture on here again there is NOTHING its blank...

 

EDIT: Now its reading the whole number perfectly..With a BLACK background. 



hxh
  • Members
  • 1 posts
  • Last active: Jan 27 2015 02:04 PM
  • Joined: 23 Jan 2015

Helllo, I was wondering if there was a way to manipulate the image the OCR generates in order to investigate? Or is there a way to tell OCR which colour to detect?

 

This is an example which sometimes get misinterpreted: akUlJia.jpg (IE; these numbers such as 4xx, get read out as something larger than 550 (check in my script) ).

 

Thanks in advance!



RussK
  • Members
  • 2 posts
  • Last active: Sep 09 2015 07:57 PM
  • Joined: 13 May 2015

Camerb,

 

I've managed to get the OCR script to capture the graphic image with the text I'm after. But it doesn't seem to be able to get the conversion to text even close.  I guess I'm not too surprised because of the nature of the text.  It's green and in the format of 5x7 dot matrix.

 

Is there anyway to make it 'learn" or specify this mode of text?

 

(I wish I could include a snapshot example but there doesn't seem to be an attachment capability here.)

 

Any suggestions?

 

Russ



camerb
  • Moderators
  • 573 posts
  • Last active: Sep 14 2015 03:32 PM
  • Joined: 19 Mar 2009

Russ,

 

Yes, a 5x7 dot matrix character is too small. Just to give you a bit of information on this script, it attempts to follow the path of the brushstroke to identify which character it is. The problem with dot matrix fonts, or LCD digit fonts, is that the brushstrokes are not continuous, and the breaks will cause difficulties in the recognition.

 

Also, it's interesting that you've brought up the idea of a learning OCR, because I've actually been experimenting with a new library lately for what I refer to as Trainable OCR. However, this involves saving specific data for each individual character, and it's some work to get it to recognize 10 numerical digits, but the idea of recognizing 36 alphanumeric digits is a ton of work, plus other characters is even more work. I'm curious, how many characters do you want your script to recognize?

 

Thanks,

camerb


Aren't you glad that I didn't put an annoying gif here?

roflcoopter1
  • Members
  • 1 posts
  • Last active: Jun 18 2015 02:13 PM
  • Joined: 12 Jun 2015

Hello! I'm trying to use this at work to read off of a Java window. I tried it at home and it worked fine but at work i get the problem that some users above me had. When i run the OCR-preview the pink box appears but no tooltip is displayed. I cant really figure out why. Is it because of some restriction of administrator rights?. The JPG file is created but after that nothing seems to happen. 

 

Anyone knows whats up?

 

Thanks in advance



Amein
  • Members
  • 13 posts
  • Last active: Nov 06 2015 04:03 PM
  • Joined: 26 Aug 2015

Russ,

 

Yes, a 5x7 dot matrix character is too small. Just to give you a bit of information on this script, it attempts to follow the path of the brushstroke to identify which character it is. The problem with dot matrix fonts, or LCD digit fonts, is that the brushstrokes are not continuous, and the breaks will cause difficulties in the recognition.

 

Also, it's interesting that you've brought up the idea of a learning OCR, because I've actually been experimenting with a new library lately for what I refer to as Trainable OCR. However, this involves saving specific data for each individual character, and it's some work to get it to recognize 10 numerical digits, but the idea of recognizing 36 alphanumeric digits is a ton of work, plus other characters is even more work. I'm curious, how many characters do you want your script to recognize?

 

Thanks,

camerb

 

Hi, possible this script read image below?

KbjzK9I.png



camerb
  • Moderators
  • 573 posts
  • Last active: Sep 14 2015 03:32 PM
  • Joined: 19 Mar 2009
Roflcopter1: that is due to lack of administrator rights. Sorry for the late reply, the AHK forum is still not sending notifications consistently when replies are posted.

Amein: have you tried running the preview script provided in the zip file?
Aren't you glad that I didn't put an annoying gif here?

CreationX
  • New members
  • 1 posts
  • Last active: Sep 09 2015 09:00 PM
  • Joined: 09 Sep 2015

Cam, is there a way to add to your library (like take a screenshot of the characters that are not being recognized) so that it will recognize them?  Thanks in advance.



camerb
  • Moderators
  • 573 posts
  • Last active: Sep 14 2015 03:32 PM
  • Joined: 19 Mar 2009
CreationX: what you are describing is basically the Trainable OCR concept that I had described above. Parts of that concept are possible, although it takes a significant amount of work to "train" the script to recognize each custom character. With some fonts and font sizes, recognition still would not be possible. Do you happen to have some screenshots of the text you are trying to recognize, so that I can take a closer look at it?
Aren't you glad that I didn't put an annoying gif here?

woshichuanqilz
  • Members
  • 9 posts
  • Last active: Jan 11 2017 12:26 PM
  • Joined: 04 Sep 2015

thx a lot for sharing, the link you post in the at first is invalid now, it's the code in your github is the latest ? I find that that last commit is in 2012?

If not, plz share a new valid link. tnx a lot.