OCR MICR en C# y .NET
IronOCR es un componente de software en C# que permite a los programadores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido MICR.
Es una rama avanzada de Tesseract, construida exclusivamente para desarrolladores de .NET y supera regularmente a otros motores de Tesseract tanto en velocidad como en precisión.
Contenido de IronOcr.Languages.MICR
Este paquete contiene 11 idiomas OCR para .NET:
- MICR
Descargar
Paquete de Idiomas MICR [Reconocimiento de Caracteres con Tinta Magnética]
Instalación
Lo primero que tenemos que hacer es instalar nuestro paquete OCR MICR en tu proyecto .NET.
Install-Package IronOCR.Languages.MICR
Ejemplo de código
Este ejemplo de código C# lee texto MICR de una imagen o documento PDF.
// Import the IronOCR namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract for performing OCR operations
var Ocr = new IronTesseract();
// Set the OCR language to MICR to recognize magnetic ink characters
Ocr.Language = OcrLanguage.MICR;
// Specify the file path of the input image containing MICR text
using (var Input = new OcrInput(@"images\MICR.png"))
{
// Run the OCR engine to read the MICR text from the input image
var Result = Ocr.Read(Input);
// Retrieve the entire recognized text from the result
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}// Import the IronOCR namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract for performing OCR operations
var Ocr = new IronTesseract();
// Set the OCR language to MICR to recognize magnetic ink characters
Ocr.Language = OcrLanguage.MICR;
// Specify the file path of the input image containing MICR text
using (var Input = new OcrInput(@"images\MICR.png"))
{
// Run the OCR engine to read the MICR text from the input image
var Result = Ocr.Read(Input);
// Retrieve the entire recognized text from the result
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}




