Jump to content

capturing images with AutoIt for OCR


Recommended Posts

I'm using AutoIt to grab images and then call Tesseract to OCR the images. I'm getting some errors. I notice that if I expand the window to be twice as large I get better results, but I have to do that manually since I don't know how to do that with AutoIt.

What is the best way to capture images for OCR?

Link to comment
Share on other sites

Unfortunately I've never used Tesseract, but I do use AutoIt in conjunction with Alchemy to process some organizational functions and then let Alchemy handle OCR'ing on the server side. Does that product actually require the image to be displayed for OCR'ing? If so it sounds like a function like _WinAPI_SetWindowPlacment would work for you.

Info:

_WinAPI_SetWindowPlacement

--------------------------------------------------------------------------------

Sets the placement of the window for Min, Max, and normal positions

#Include <WinAPI.au3>

_WinAPI_SetWindowPlacement($hWnd, $pWindowPlacement)

Parameters

$hWnd Handle of the window

$pWindowPlacement pointer to $tagWINDOWPLACEMENT structure

Return Value

Success: Returns non-zero

Failure: Returns 0, @error = 1, @extended = _WinAPI_GetLastError()

Link to comment
Share on other sites

Tesseract will capture directly from the screen, or seemingly so anyway, at least it did about six months ago when I used it, I found all the information in the tesseract thread in example scripts.

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...