Indicates whether to use the quick-check process to identify the form. If it fails, it will perform the recognition process.
public bool EnableQuickPreRecognitionCheck { get; set; }
public boolean isEnabledQuickPreRecognitionCheck();
isEnabledQuickPreRecognitionCheck();
Public Property EnableQuickPreRecognitionCheck() As Boolean
Get
Set
public:
property bool EnableQuickPreRecognitionCheck
{
bool get()
void set(bool value)
}
true to use the quick-check process to identify the form.
The quick-check process tries to identify the form before performing the recognition process. This is useful to speed up the recognition process when the scanned forms have the same resolution as the master form.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Forms.Common;
using Leadtools.Forms.Auto;
using Leadtools.Ocr;
using Leadtools.Forms.Recognition;
using Leadtools.Forms.Processing;
using Leadtools.Barcode;
public static void AutoFormsEngine_EnableQuickPreRecognitionCheck_Example()
{
using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD, false))
{
ocrEngine.Startup(null, null, null, LEAD_VARS.OcrLEADRuntimeDir);
string root = Path.Combine(LEAD_VARS.ImagesDir, @"Forms\MasterForm Sets\Driving License");
DiskMasterFormsRepository formsRepository = new DiskMasterFormsRepository(ocrEngine.RasterCodecsInstance, root);
using (AutoFormsEngine autoEngine = new AutoFormsEngine(formsRepository, ocrEngine, null, AutoFormsRecognitionManager.Ocr, 30, 80, true))
{
// Enable quick prerecognition, only checking against masterforms of the same resolution
autoEngine.EnableQuickPreRecognitionCheck = true;
// Recognize and process the form
autoEngine.FilledFormType = FormsPageType.IDCard;
AutoFormsRunResult result = autoEngine.Run(Path.Combine(LEAD_VARS.ImagesDir, @"Forms\Forms to be Recognized\Driving License\TX_Vertical.png"), null);
if (result != null)
Console.WriteLine(String.Format("Recognized as {0} with {1}% confidence.", result.RecognitionResult.MasterForm.Name, result.RecognitionResult.Result.Confidence));
else
Console.WriteLine("Form not recognized");
}
}
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
public const string OcrLEADRuntimeDir = @"C:\LEADTOOLS 20\Bin\Common\OcrLEADRuntime";
}
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.Forms.Common
Imports Leadtools.Forms.Auto
Imports Leadtools.Ocr
Imports Leadtools.Forms.Recognition
Imports Leadtools.Forms.Processing
Imports Leadtools.Barcode
Public Shared Sub AutoFormsEngine_EnableQuickPreRecognitionCheck_Example()
Using ocrEngine As IOcrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD, False)
ocrEngine.Startup(Nothing, Nothing, Nothing, LEAD_VARS.OcrLEADRuntimeDir)
Dim root As String = Path.Combine(LEAD_VARS.ImagesDir, "Forms\MasterForm Sets\Driving License")
Dim formsRepository As DiskMasterFormsRepository = New DiskMasterFormsRepository(ocrEngine.RasterCodecsInstance, root)
Using autoEngine As AutoFormsEngine = New AutoFormsEngine(formsRepository, ocrEngine, Nothing, AutoFormsRecognitionManager.Ocr, 30, 80, True)
' Enable quick prerecognition, only checking against masterforms of the same resolution
autoEngine.EnableQuickPreRecognitionCheck = True
' Recognize and process the form
autoEngine.FilledFormType = FormsPageType.IDCard
Dim result As AutoFormsRunResult = autoEngine.Run(Path.Combine(LEAD_VARS.ImagesDir, "Forms\Forms to be Recognized\Driving License\TX_Vertical.png"), Nothing)
If Not result Is Nothing Then
Console.WriteLine(String.Format("Recognized as {0} with {1}% confidence.", result.RecognitionResult.MasterForm.Name, result.RecognitionResult.Result.Confidence))
Else
Console.WriteLine("Form not recognized")
End If
End Using
End Using
End Sub
Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
Public Const OcrLEADRuntimeDir As String = "C:\LEADTOOLS 20\Bin\Common\OcrLEADRuntime"
End Class
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document