Created
May 8, 2018 13:55
-
-
Save luizhenriquesoares/9c28c833f4f0022cae0afd276658c1a3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void Reconize(String fileName) | |
{ | |
try | |
{ | |
using (var engine = new TesseractEngine(@"tessdata", "por", EngineMode.Default)) | |
{ | |
using (var img = Pix.LoadFromFile(fileName)) | |
{ | |
using (var data = engine.Process(img)) | |
{ | |
var text = data.GetText(); | |
Console.WriteLine(text); | |
} | |
} | |
} | |
} | |
catch (Exception e) | |
{ | |
Console.Write(e); | |
} | |
finally | |
{ | |
Console.ReadLine(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment