OCR with the Tesseract interface

后端 未结 5 987
挽巷
挽巷 2020-11-28 22:37

How do you OCR an tiff file using Tesseract\'s interface in c#?
Currently I only know how to do it using the executable.

5条回答
  •  醉酒成梦
    2020-11-28 23:17

    I discovered today that EMGU now includes a Tesseract wrapper. While the number of unmanaged dlls of the opencv lib might seem a little daunting, it's nothing that a quick copy to your output directory won't cure. From there the actual OCR process is as simple as three lines:

    Tesseract ocr = new Tesseract(Path.Combine(Environment.CurrentDirectory, "tessdata"), "eng", Tesseract.OcrEngineMode.OEM_TESSERACT_ONLY);
    this.ocr.Recognize(clip);
    optOCR.Text = this.ocr.GetText();
    

    "robomatics" put together a very nice youtube video that demonstrates a simple but effective solution.

提交回复
热议问题