Jump to content

Recommended Posts

Posted

I have been trying to solve the overall OCR (Screen Text Capture) Problem and I have stumbled onto:

http://www.screenocr.com/

This site offers two Tools.

1) is a stand alone utility (Works Great -< Not Interested)

2) is a Command line/ Dll package offered on 21 day trial (yea, i will fork out the coin if i can make it work!)

Package found here:

http://www.ScreenOCR.com/screenocrsdk.exe

The Command line utiltity included: OCRSDKcl.exe dose and AMAZING job of recgonizing all fonts. WOW

but any (Run "OCRSDKcl.exe") in AutoIt is fairly (expectly) slow so i wish to use included DLL

OCRSDK.DLL

CODE
Is basically 1 setup function, and 3 main functions (init, read, close)

Setup Function: Specs read:

TextractExport TextractSuccess TextractBuildWithDialog();

typedef long TextractSuccess; // success returning code for Screen OCR SDK functions

I try:

$Array = DllCall("OCRSDK.DLL","long","TextractBuildWithDialog") ; VOLIA! SUCESS

CODE

Init Function:

TextractExport TextractSuccess TextractInit();

$Array2 = DllCall("OCRSDK.DLL","long","TextractInit") ; VOLIA! SUCESS

CODE

Read Function:

Textract(TextractSource(0,0,200,100),TextractDest("test.dat"),

TextractDestFormat(dfVerbose | dfBol | dfEol | dfSpace | dfChar | dfFont | dfCharHex | dfCharFont))

class TextractSource {

public:

TextractSource();

TextractSource& BmpFile(const char *bmpFileName);

TextractSource& Wnd(HWND);

TextractSource& Rect(int ax, int ay, int bx, int by);

TextractSource& DesktopWnd();

TextractSource& TopWnd(const char *windowClass, const char *windowText);

TextractSource& DeepWnd(const char *windowClass, const char *windowText);

TextractSource& SubWnd(const char *windowClass, const char *windowText);

TextractSource& SubDeepWnd(const char *windowClass, const char *windowText);

TextractSource& FindLargestWindow();

const char *BmpFileName; // used if != NULL

HWND W; // used if != NULL

int AX, AY, BX, BY; // used if BmpFileName == NULL and Wnd == NULL

};

class TextractDest {

public:

TextractDest(const char *destFileName);

TextractDest();

const char *FileName; // NULL if area specifeid, else dest file name

void *Area; // NULL if file name specified, else memory area

int AreaSize;

};

Ok I Am LOST!

OK -> I Do know i need to use DllCall,DllStructGetPtr,DLLStructCreate, DllStructSetData and DllStructGetData however

I am getting frustrated with the combinations i have (unsucessfully) Tried.

The killer part, is this software reads the text very well. I lack the pointer knowledge to plug it together.

Help?

xo_Sexy

PS:

Official Help file just gave me a headache: ScreenOCRSDK.zip

Works BEST on screen graphics. (Reads Windows database of fonts) COOL

(I am hoping other have enough interest in OCR to give this a whirl)

  • 3 weeks later...
Posted

I'm fairly sure that you probably found a solution by now however I thought I would mention that I had a need for OCR and have been using ScreenOCR dll with great success. If you still have questions please reply and I would be happy to assist.

  • 3 months later...
  • 4 months later...
Posted

Do you have a sample code. I am desperate for a OCR Solution because the solution from ptrex is only working to 50 %. It doesnt reconniced all text.

I could kill my self ...

Please

  • 1 month later...
Posted

So far I've been doing OCR under AutoIT first with code based on IFalcon's code and then trying to get this ScreenOCR running.

While IFalcon's stuff is relatively slow, it is totally reliable and 100% precise (because I have full control over characters read). The same cannot (yet?) be said about ScreenOCR: For example the letter "X" is not recognized, capital "B", "R" and the number "3" often are dropped ...

Anyway, recently a friend got me back to testing ScreenOCR, which is amazingly fast - and the DLL supposedly lets us read directly from memory (while the EXE version needs to write to a file). My trouble: I'm totally inexperienced with COM and DLL access and the AutoIT help files assume already advanced knowledge. (Yes, I read the little intro, but - as much fantasy as I have, lol - I fail to recognize the basic underlying mechanics).

I'll start playing with published code and see how far we can get ... until then:

Does anyone have an idea of how to adjust the *.PAT (pattern) table?

Has anyone had success with direct memory access / ScreenOCR?

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
  • Recently Browsing   0 members

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