Tamil OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Otras versiones de este documento:

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

Es una versión avanzada de Tesseract, construida exclusivamente para desarrolladores de .NET y que supera regularmente a otros motores Tesseract tanto en velocidad como en precisión.

Contenido de IronOcr.Languages.Tamil

Este paquete contiene 102 idiomas OCR for .NET:

  • Tamil
  • TamilBest
  • TamilFast
  • TamilAlphabet
  • TamilAlphabetBest
  • TamilAlphabetFast

Descargar

Paquete de idioma Tamil [தமிழ]

Instalación

Lo primero que tenemos que hacer es instalar nuestro paquete OCR Tamil en tu proyecto .NET.

Install-Package IronOcr.Languages.Tamil

Ejemplo de código

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

// Ensure IronOcr.Languages.Tamil package is installed
using IronOcr;

var Ocr = new IronTesseract();

// Set the language to Tamil for OCR processing
Ocr.Language = OcrLanguage.Tamil;

using (var Input = new OcrInput(@"images\Tamil.png"))
{
    // Perform OCR on the input image
    var Result = Ocr.Read(Input);

    // Get the recognized text
    var AllText = Result.Text;

    // Display the recognized text (for example purpose)
    Console.WriteLine(AllText);
}
// Ensure IronOcr.Languages.Tamil package is installed
using IronOcr;

var Ocr = new IronTesseract();

// Set the language to Tamil for OCR processing
Ocr.Language = OcrLanguage.Tamil;

using (var Input = new OcrInput(@"images\Tamil.png"))
{
    // Perform OCR on the input image
    var Result = Ocr.Read(Input);

    // Get the recognized text
    var AllText = Result.Text;

    // Display the recognized text (for example purpose)
    Console.WriteLine(AllText);
}
Imports IronOcr

' Ensure IronOcr.Languages.Tamil package is installed
Dim Ocr As New IronTesseract()

' Set the language to Tamil for OCR processing
Ocr.Language = OcrLanguage.Tamil

Using Input As New OcrInput("images\Tamil.png")
    ' Perform OCR on the input image
    Dim Result = Ocr.Read(Input)

    ' Get the recognized text
    Dim AllText = Result.Text

    ' Display the recognized text (for example purpose)
    Console.WriteLine(AllText)
End Using
$vbLabelText   $csharpLabel
  • La clase IronTesseract se utiliza para inicializar y configurar el motor de OCR.
  • La propiedad Ocr.Language especifica el paquete de idioma a utilizar para OCR.
  • La clase OcrInput se utiliza con la ruta al archivo de imagen que contiene texto en tamil.
  • El método Ocr.Read() procesa la imagen y extrae el texto.
  • Finalmente, el texto reconocido se almacena en AllText y puede utilizarse según sea necesario.