Jump to content
Sign in to follow this  
jebus495

Need help with OCR + autoit.

Recommended Posts

jebus495

Hello there.

I basically need to get text out of an image and make my program respond accordingly.

I have gotten as far as making autoit save a region of my screen as a .tif file but I am lost on where to start for making another program attempt to read that information and put it in some way that the program can read and respond based on the text that was read.

The text I am trying to read is always the same so making an OCR myself isn't out of the question I don't think.

This is as far as I have got so far. =|

#include <screencapture.au3>
Global $sFileName, $iLeft, $iTop, $iRight, $iBottom, $fCursor

getlootpic ()

Func getlootpic ()
$sFileName = "lootscan.bmp"
$iLeft = 90
$iTop = 220
$iRight = 330
$iBottom = 350
$fCursor = False
_ScreenCapture_Capture($sFileName, $iLeft, $iTop, $iRight, $iBottom, $fCursor)
EndFunc

Now I need to know what I need to make text found in readable by autoit.

If any of the words match with what I have written in a config file I want it to do one thing and if not I want it to do something else.

I read this entire thread ( http://www.autoitscript.com/forum/index.ph...=50608&st=0 ) but I couldn't seem to make things match up. I have the text recognition feature of office 2003 all set up but I couldn't make sense of how to get it to function like I need it too.

Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites
jebus495

Is this too difficult or obscure to answer here or am I missing something to make my problem solvable?

More information?

Maybe I'm just being impatient.

Edited by jebus495

Share this post


Link to post
Share on other sites
martin

Is this too difficult or obscure to answer here or am I missing something to make my problem solvable?

More information?

Maybe I'm just being impatient.

I can't offer any real help with ocr since I know nothing about it. I would expect that linking to some exesiting ocr application would be the best solution, and there are some scripts in the examples forum which might be worth looking at. If the range of characters you need to detect is quite small then it is possible my outline finder script could be used. The script is very slow to find outlines but if there's only a small area to scan is might not be a problem. By analyzing the lines created from the outliner you could work out what the letters were. That's my belief but it's no more than a vague idea. If you want to consider the outliner then it's here. I should think that writing ocr from scratch would be extremely difficult.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites
jebus495

Is there perhaps anyway for me to collect every character in say, image files? Like one tiny image file for every letter?

Maybe then I could have it look for those things in the region I want it to look in and have it respond if it finds them in certain orders?

Which would make it basically look for words.

Share this post


Link to post
Share on other sites
martin

Is there perhaps anyway for me to collect every character in say, image files? Like one tiny image file for every letter?

Maybe then I could have it look for those things in the region I want it to look in and have it respond if it finds them in certain orders?

Which would make it basically look for words.

I think you imagine the problem to be much simpler than I imagine it to be. I have no idea how to collect every character in an image; All I have done is to find enclosed shapes and convert them to line drawings which is a long way from ocr I'm afraid.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×