Happy New Year, and what better way to start off the 2020 year than with 20/20 computer vision. Companies receive paper forms for gathering client's information every day. But how are these companies recognizing this data, or are they manually entering the data themselves? Let's say you're dealing with invoices, and you receive hundreds a day. There's no need to waste time entering different names and numbers when a computer can do it all for you within seconds.
The LEADTOOLS Forms Recognition and Processing SDK offers you the 20/20 computer vision that you need to save the time and money while transferring data from paper forms to your systems. The user-friendly SDK enables developers to create an application in minimal time without having to go through the headaches of open source code. Forms come in a variety of shapes, sizes, and uses, and LEADTOOLS has the tools to handle them all. In addition to basic forms recognition with static field locations, LEADTOOLS is able to detect and process unstructured and loosely structured documents such as invoices, driver's licenses, business cards, and passports.
There are only ever two kinds of forms you will deal with when working with forms recognition, a master and filled form. A master form is a blank form that is used as a template where you specify the data to be extracted. Once filled forms are submitted, those forms will be compared to the master forms and the data will be extracted. You may be thinking, "Well, what if I have thousands of documents that need to be processed? This may take all day.", LEADTOOLS has you covered with its multi-threading support.
Code it!
This code snippet demonstrates how you can recognize a filled form using the Forms Recognition SDK.
// Set the name of the folder that contains the Master Forms
string root = @"C:\Users\Public\Documents\LEADTOOLS Images\Forms\MasterForm Sets";
using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD, false))
{
ocrEngine.Startup(null, null, null, null);
DiskMasterFormsRepository repo = new DiskMasterFormsRepository(ocrEngine.RasterCodecsInstance, root);
BarcodeEngine barcodeEngine = new BarcodeEngine();
using (AutoFormsEngine autoEngine = new AutoFormsEngine(repo, ocrEngine, barcodeEngine,
AutoFormsRecognitionManager.Ocr | AutoFormsRecognitionManager.Default, 30, 80, false))
{
string[] files = Directory.GetFiles
(@"C:\Users\Public\Documents\LEADTOOLS Images\Forms\Forms to be Recognized\OCR", "*.tif");
ProcessFiles(autoEngine, files);
}
}
// The following code shows how to handle the AutoFormsEngine class in a multi-threaded application
private static void ProcessFiles(AutoFormsEngine autoEngine, string[] files)
{
Console.WriteLine("Started Processing Files ...");
Parallel.ForEach(files, file =>
{
AutoFormsRunResult result = autoEngine.Run(file, null);
if (result != null)
{
if (result.FormFields != null && result.RecognitionResult.MasterForm != null)
Console.WriteLine(string.Format(" Master Form Found \"{0}\" for {1}",
result.RecognitionResult.MasterForm.Name, file));
else
Console.WriteLine(string.Format(" No Master Form Found for {0}", file));
}
});
}
LEADTOOLS Forms Recognition and Processing SDK is the most flexible and powerful product in its class. LEADTOOLS offers incredible value with its comprehensive family of toolkits for raster, document, medical and multimedia imaging.
Try for free!
To test this for yourself, you can download the latest code for free straight from our site. This trial is good for 60 days and comes with unlimited chat and email support.
Support
Need help getting this sample up and going? Contact our support team for free technical support! For pricing or licensing questions, you can contact our sales team (sales@leadtools.com) or call us at 704-332-5532.