Jump to content
Sign in to follow this  
marko001

Text search without OCR

Recommended Posts

marko001

Hi all,

Just an easy question, but don't know if an easy answer is possible:

I need to read text from a simple image I take with

$hwnd = _ScreenCapture_Capture(@TempDir & "\" & $textimage,50,50,200,200)

Image can be "5-lines" long (so that I need to take 5 lines of text) or just 1 line (I just need to change coords in _screencapture())

I used different trial versions of OCR SDK but now, with them expired, costs is really high to get them for my and my family/friends use.

Since the text is always in Arial format (maybe can change the dimension or the font, nothing else), i'm asking if there is a (fast) way to take that text and put it in a $var.

When I say fast i mean not so time-consuming since waiting 30 secs for reading a word it's a no-sense.

I read a thread about _imagesearch() letter by letter but I believe from an informatic point of view is horrible.

Thanks to all the community,

Marco

Share this post


Link to post
Share on other sites
hannes08

Hi Marco,

did you use the search function in the example scripts forum?

The first 4 results when searching for "OCR" sound pretty much like what you're looking for.


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites
marko001

I already studied about that, due to my persistence in AutoIt forums i'm supposed to know about Search functions ^^

As infact that thread says: "Forgot to tell that Office 2003 is needed"

I know that 99.99% Office is installed but my aim is to do a completely stand-alone solution.

And Tesseract aswell, i "multi"tried it, including boring teaching sessions, but results are poor.

M.

Share this post


Link to post
Share on other sites
flet

Google for Tesseract. It's open source OCR software.

When installed, you can OCR your screen capture like this:

ShellExecuteWait(@ProgramFilesDir & "\tesseract-OCR\tesseract.exe", "inputimage.tif ocrresult")

As you can see, it requires tif image as input and output file will be a textfile in the scriptdir

Edited by flet

Share this post


Link to post
Share on other sites
blackmage999

you might take a look at this thread

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.