Skip to content

Instantly share code, notes, and snippets.

@luizhenriquesoares
Created May 8, 2018 13:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luizhenriquesoares/9c28c833f4f0022cae0afd276658c1a3 to your computer and use it in GitHub Desktop.
Save luizhenriquesoares/9c28c833f4f0022cae0afd276658c1a3 to your computer and use it in GitHub Desktop.
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