Objects of this class are added to FormRecognitionEngine.ObjectsManagers in order to consider them as part of the form features. Default objects define the main form lines and inverted text areas as part of the form's features.
using Leadtools;
using Leadtools.Barcode;
using Leadtools.Codecs;
using Leadtools.Forms.Common;
using Leadtools.Ocr;
using Leadtools.Forms.Processing;
using Leadtools.Forms.Recognition;
using Leadtools.Forms.Recognition.Barcode;
using Leadtools.Forms.Recognition.Ocr;
///This method sets the object managers.
public void SetObjectManagers(FormRecognitionEngine recognitionEngine,
IOcrEngine formsOcrEngine,
BarcodeEngine formsBarcodeEngine,
bool enableDefault,
bool enableOcr,
bool enableBarcode)
{
if (recognitionEngine == null)
return;
if (enableDefault)
{
DefaultObjectsManager defaultObjectManager = new DefaultObjectsManager();
recognitionEngine.ObjectsManagers.Add(defaultObjectManager);
}
if (enableOcr)
{
OcrObjectsManager ocrObjectManager = new OcrObjectsManager(formsOcrEngine);
recognitionEngine.ObjectsManagers.Add(ocrObjectManager);
}
if (enableBarcode)
{
BarcodeObjectsManager barcodeObjectManager = new BarcodeObjectsManager(formsBarcodeEngine);
recognitionEngine.ObjectsManagers.Add(barcodeObjectManager);
}
}