OCR financiero en C# y .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

126 idiomas más

IronOCR es un componente de software en C# que permite a los programadores .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluyendo el Financiero.

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.Financial

Este paquete contiene 16 idiomas OCR para .NET:

  • Financiero

Descargar

Paquete de idioma Financiero [Financiero]

Instalación

Lo primero que tenemos que hacer es instalar nuestro paquete OCR Financiero en su proyecto .NET.

Install-Package IronOCR.Languages.Financial

Ejemplo de código

Este ejemplo de código C# lee texto financiero de una imagen o documento PDF.

// Import the IronOcr namespace
using IronOcr;

// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();

// Set the OCR language to Financial
Ocr.Language = OcrLanguage.Financial;

// Create an OCR input object, specifying the path to the image or PDF
using (var Input = new OcrInput(@"images\Financial.png"))
{
    // Perform OCR to read text from the input
    var Result = Ocr.Read(Input);

    // Retrieve the extracted text
    var AllText = Result.Text;
}
// Import the IronOcr namespace
using IronOcr;

// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();

// Set the OCR language to Financial
Ocr.Language = OcrLanguage.Financial;

// Create an OCR input object, specifying the path to the image or PDF
using (var Input = new OcrInput(@"images\Financial.png"))
{
    // Perform OCR to read text from the input
    var Result = Ocr.Read(Input);

    // Retrieve the extracted text
    var AllText = Result.Text;
}
' Import the IronOcr namespace
Imports IronOcr

' Instantiate the IronTesseract OCR engine
Private Ocr = New IronTesseract()

' Set the OCR language to Financial
Ocr.Language = OcrLanguage.Financial

' Create an OCR input object, specifying the path to the image or PDF
Using Input = New OcrInput("images\Financial.png")
	' Perform OCR to read text from the input
	Dim Result = Ocr.Read(Input)

	' Retrieve the extracted text
	Dim AllText = Result.Text
End Using
$vbLabelText   $csharpLabel

Explicación:

  • Uso de IronOcr: Este espacio de nombres incluye todas las clases necesarias para el proceso OCR.
  • Clase IronTesseract: Esta es la clase principal que permite tareas OCR.
  • Configuración de idioma: Configurar el idioma a Financial habilita el motor OCR para reconocer terminología financiera.
  • Clase OcrInput: Toma una ruta de archivo que especifica el archivo de imagen o PDF a procesar.
  • Método Read: Ejecutado en Ocr.Read(Input), procesa la imagen para recuperar el texto basado en la entrada y configuración de idioma proporcionadas.
  • Result.Text: Almacena el texto reconocido de la imagen o PDF.