Intelligent Character Recognition (ICR) is used to recognize hand-written text and numbers. Assuming ICR support is unlocked, ICR can be performed whenever the Professional OCR engine is being used.
Recognize handwritten text and number by setting the OcrZoneType to OcrZoneType.Icr to create an ICR zone. Next, specify handwritten text and numbers by setting the OcrZoneCharacterFilters to be OcrZoneCharacterFilters.Numbers.
[Note: Normally it is not recommended to use the character filters: however, it is recommended when performing ICR for hand written numbers only.]
Keep in mind the following tips:
When using ICR, the better the hand writing, the better the results.
Use a block format so each letter is within its own container, preventing overlapping characters. For more information about the cell block format, refer to
https://www.leadtools.com/support/forum/posts/t12266-ICR-sample-code
The following example shows how to perform ICR recogntion.
// Create an instance of the engine
IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.Professional, false);
// Start the engine using default parameters
ocrEngine.Startup(null, null, null, @"C:\LEADTOOLS 19\Bin\Common\OcrProfessionalRuntime");
// Create an OCR document
using (IOcrDocument ocrDocument = ocrEngine.DocumentManager.CreateDocument())
{
RasterImage image = ocrEngine.RasterCodecsInstance.Load(input, 0, CodecsLoadByteOrder.Rgb, 1, -1);
// Add this image to the document
IOcrPage ocrPage = ocrDocument.Pages.AddPage(image, null);
// Perform default AutoZoning on the page
ocrDocument.Pages.AutoZone(null);
// Iterate through each zone in the document to make them ICR zones
for (int i = 0; i < ocrPage.Zones.Count; i++)
{
OcrZone zone = ocrPage.Zones[i];
zone.ZoneType = OcrZoneType.Icr;
}
//Recognize Page
ocrDocument.Pages.Recognize(null);
ocrDocument.Save(output, DocumentFormat.Text, null);
}
Leadtools.Forms.Ocr Introduction
Leadtools.Forms.Ocr Getting Started (Guide to Example Programs)
Programming with LEADTOOLS .NET OCR
An Overview of OCR Recognition Modules
Creating an OCR Engine Instance
Starting and Shutting Down the OCR Engine
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET