Popular Post JohnOne Posted August 3, 2015 Popular Post Share Posted August 3, 2015 There has been many questions about using tesseract of late.Here is a very basic example which works for me, along with the exact version of standalone tesseract executable and English language data usedI found it some time ago at a time I thought I needed it, I do not recall from where.$ImageToReadPath = @ScriptDir & "\image.bmp" $ResultTextPath = @ScriptDir & "\Result" $OutPutPath = $ResultTextPath & ".txt" $TesseractExePath = @ScriptDir & "\Tesseract.exe" ShellExecuteWait($TesseractExePath, '"' & $ImageToReadPath & '" "' & $ResultTextPath & '"', "", "", @SW_HIDE) If @error Then Exit MsgBox(0, "Error", @error) EndIf MsgBox(0, "Result", FileRead($OutPutPath)) FileDelete($OutPutPath)Some Answers:The files contained in the download, only support English language.From the only documentation I got with this version...Original Binaries and Source can be found here: http://code.google.com/p/tesseract-ocr/I do not know where to get other languages support.I do not know if there is a later standalone version.I do not know why it does not read your image accurately.It does not have a virus in it.You can search the forums or internet to learn how to create / cut / copy / paste, or otherwise manipulate your own images. TesseractExample.zip ioa747, Velislav, Danyfirex and 5 others 8 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
JohnOne Posted December 13, 2015 Author Share Posted December 13, 2015 Just seen this post which might be relevant Blaxxun 1 AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Blaxxun Posted February 28, 2016 Share Posted February 28, 2016 You can download the latest windows installer from this link: http://digi.bib.uni-mannheim.de/tesseract/tesseract-ocr-setup-3.05.00dev.exe It includes also many languages. Link to comment Share on other sites More sharing options...
JohnOne Posted February 28, 2016 Author Share Posted February 28, 2016 No idea what that URL is. I'd advise anyone looking for tesseract to get it from official GitHub. https://github.com/tesseract-ocr/tesseract/wiki AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Blaxxun Posted February 28, 2016 Share Posted February 28, 2016 That URL is.... exactly from the Github page you refer to. https://github.com/tesseract-ocr/tesseract/wiki/Downloads Under "3rd party Windows exe's/installer" The URL is from a German Univercity i guess. I tested it with your Autoit script but changed the Filepath to the install path. Works perfectly. Thanks for that. ioa747, Hashim and JohnOne 3 Link to comment Share on other sites More sharing options...
JohnOne Posted February 28, 2016 Author Share Posted February 28, 2016 I see, thanks for clearing that up. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
robertocm Posted June 5, 2016 Share Posted June 5, 2016 Just another simple example for using tesseract with an image file: #Include <File.au3> #include <WindowsConstants.au3> Local $img_filename = FileOpenDialog("Image file", @DesktopDir & "\", "Images (*.tif;*.png;*.jpg)", $FD_FILEMUSTEXIST) $ocr_filename = StringLeft($img_filename, StringLen($img_filename) - 4) $ocr_filename_and_ext = $ocr_filename & ".txt" ;Double quotation marks are for paths containing spaces (tested on Tesseract V3.02) Local $iPID = Run(@ComSpec & " /C " & "tesseract.exe """ & $img_filename & """ """ & $ocr_filename & """", @ProgramFilesDir & "\Tesseract-OCR", @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD) ProcessWaitClose($iPID) ;This also works: ;ShellExecuteWait(@ProgramFilesDir & "\Tesseract-OCR\tesseract.exe", " """ & $img_filename & """ """ & $ocr_filename & """") ;Display text in SciTe editor Run(@ProgramFilesDir & "\AutoIt3\SciTE\SciTE.exe """ & $ocr_filename_and_ext & """", "", @SW_SHOWMAXIMIZED) Link to comment Share on other sites More sharing options...
Miliardsto Posted November 9, 2018 Share Posted November 9, 2018 how to make it read text like this Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now