I would like to use tesseract OCR to get text on a rectangular area of the screen using c# on Visual Studio C#.
First, what are required to get tesseract working in Visual Studio C#? I am new to use Visual Studio and setting up wrappers. After hours of searching on Google, I found I would need: a wrapper(charlesw), a language pack from official site. Do I also need to install windows tesseract-ocr?
I have followed the steps on charlesw's GitHu to setup the wrapper in my project. Yet, I am still not sure how to use the functions.
I assume this is how to declare an OCR engine:
TesseractEngine engine = new TesseractEngine(@"./tessdata", "eng", EngineMode.Default);
engine.[unkwonapi](imagepath); //what is the api name going to be? I tried to look it up [here].
The wrapper bundles Tesseract DLL (as
libtesseract302.dll). You do not need to install windows tesseract-ocr; as a matter of fact, you should not, as it can interfere with the wrapper.
You can use either of the following to specify a region of interest on the image:
engine.Process(Bitmap image, Rect region, PageSegMode? pageSegMode = null)
engine.Process(Pix image, Rect region, PageSegMode? pageSegMode = null)