Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any free .NET OCR libraries that will perform OCR on an application window directly?

I am looking for a free .NET OCR library that will be able to do OCR on a given application window or even a image in memory (I can take a snapshot of the application window myself).

I have looked at tessnet2 and MODI but both require an image located on disk.

I need to use OCR because the application I am trying to write a script for does some wacky stuff that cannot be read using windows API and I need to scrape data from the screen. I have tested both of tessnet2 and MODI and they both can read the text mostly but because this has to run in an enviroment that will not be able to write to disk, I need it to be able to read directly from the applciation window or some type of memory stream.

I am thinking OCR is my only soution but there could be other methods that I am not thinking of.

Suggestions?

Edit based on comments: Environment is a C# .NET windows application with no disk access. It's an application that has code compiled and executed on the fly and this code is running in a context that should not need any resources other than memory.

like image 934
Kelsey Avatar asked Nov 14 '22 10:11

Kelsey


1 Answers

As I can see from the Tessnet page example the library requires a Bitmap to be passed in so what if you create it with Image.FromStream Method ?

You can create Bitmap object with this constructor: Bitmap Constructor (Stream)

like image 131
Giorgi Avatar answered Dec 05 '22 21:12

Giorgi