Strabo.Core.OCR.WrapperTesseract.WrapperTesseract C# (CSharp) Method

WrapperTesseract() public method

Initializes and creates the tessearct engine
public WrapperTesseract ( string path, string lng ) : System
path string
lng string
return System
        public WrapperTesseract(string path, string lng)
        {
            // Variable value is set to parent directory of tessdata
            //string path = AppDomain.CurrentDomain.BaseDirectory;

            //Path should be same as TESSDATA folder
            //Environment.SetEnvironmentVariable("TESSDATA_PREFIX", path); //This path should always end with a "/" or "\", e.g., TESSDATA_PREFIX="/usr/share/tesseract-ocr/"

            _ocr = new Tesseract(path, lng, Tesseract.OcrEngineMode.OEM_TESSERACT_CUBE_COMBINED);
            ///_ocr = new Tesseract(path, "eng", Tesseract.OcrEngineMode.OEM_TESSERACT_CUBE_COMBINED);
        }