Jump to content
Sign in to follow this  

Using Tesseract.exe with a file, not ScreenCap?

Recommended Posts

Seangriffin made the brilliant tesseract UDF that works flawless with screencaptures.

Is it possible though, to use the same method with files (ex. gifs, jpgs, etc) instead of a capture of the screen?

Tesseract UDF found here: http://www.autoitscript.com/forum/index.php?showtopic=89542

So in short, I want to use the tesseract functions on a file, not a screen capture, so more or less don't have to worry about screen capping, when I can just open a file. Thanks!

Share this post

Link to post
Share on other sites

I too am looking to do this. I was using freeOCR that used tesseract, but it was too slow (i had to WinActivate, click on the open button, type in the file, click ocr, remove the line breaks, put it to clipboard, then clear the output screen). It took about 6 seconds to ocr each file. Not to metion the fact that it just stoped working (still have no idea why). Being able to get the ocr results without having to go through all that extra stuff would decrease the time my program took to identify each line dramatically. Going through the tesseract udf i found this line of code...

ShellExecuteWait(@ProgramFilesDir & "\tesseract\tesseract.exe", $capture_filename & " " & $ocr_filename)


Im assuming thats what it uses to call the ORC...I have no experience using ShellExecuteWait, nor do know how to use it. the help file is very confusing to me and i would wonder if someone could explain it to me better.

tried using this...

#include <ScreenCapture.au3>
_ScreenCapture_Capture(@DesktopDir & "\test images 2\WhatScreen.tif", 17, 111, 175, 125)
ShellExecuteWait(@ProgramFilesDir & "\tesseract\tesseract.exe", @DesktopDir & "\test images 2\WhatScreen.tif" & " " & @DesktopDir & "\test images 2\WhatScreen.txt")

but no .txt file

Edited by blackmage999

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...