Tesseract3Engine Constructor |
Namespace: Atalasoft.Ocr.Tesseract
Tesseract's resources are loaded at construction time. Firstly, a directory list is built. Secondly, each directory in that list is checked to see if it contains the \Tesseract\v3.04\tessdata directory structure. When a directory is found that directory is checked to ensure that it contains all of the correct resource files. The following locations are searched for in order:
1) If the constructor's resources argument is supplied, it is checked (for example C:\ResourcesFolder\Tesseract\v3.04\tessdata);
2) If the constructor's resources argument is supplied, the OcrResources subdirectory of the argument is checked (for example C:\Folder\OcrResources\Tesseract\v3.04\tessdata);
3) The SDK OcrResources directory which is determined by a registry key with OcrResources subdirectory (for example C:\RegistryKeyFolder\OcrResources\Tesseract\v3.04\tessdata)
4) The location of the Tesseract Assembly (for example C:\TesseractAssemblyFolder\Tesseract\v3.04\tessdata);
5) The location of the Tesseract Assembly's OcrResources subdirectory (for example C:\TesseractAssemblyFolder\OcrResources\Tesseract\v3.04\tessdata);
6) The value of the TESSDATA_PREFIX environment variable (for example C:\TESSDATA_PREFIXFolder\Tesseract\v3.04\tessdata).