LEADTOOLS Support
Document
Document SDK Examples
HOW TO: Extract Passport Information from a file using the RecognitionEngine
#1
Posted
:
Monday, December 4, 2017 11:09:59 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 70
Was thanked: 4 time(s) in 4 post(s)
The LEADTOOLS CloudServices RecognitionEngine interface provides a high-level method to extract passport information from a file. The ExtractPassport method returns a dictionary containing all of the information that was extracted from the input stream.
Code:
var inputStream = File.Open(@"leadtools.pdf", FileMode.Open);
var loadOptions = new LoadDocumentOptions()
{
FirstPageNumber = 1,
LastPageNumber = 1
};
var recognitionEngine = new RecognitionEngine();
IOcrEngine engine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD, false);
engine.Startup(null, null, null, @"path/to/OCR Bin Directory");
var passportInformation = recognitionEngine.ExtractPassport(inputStream, loadOptions, engine, null);
foreach(var info in passportInformation)
{
Console.WriteLine("Key:" + info.Key);
Console.WriteLine("Value:" + info.Value);
Console.WriteLine();
}
Edited by moderator Friday, February 7, 2020 10:00:55 AM(UTC)
| Reason: Not specified
Duncan Quirk
Developer Support Engineer
LEAD Technologies, Inc.
LEADTOOLS Support
Document
Document SDK Examples
HOW TO: Extract Passport Information from a file using the RecognitionEngine
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.