OCR tamil en C# y .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

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 para .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);
}
' Ensure IronOCR.Languages.Tamil package is installed
Imports IronOcr

Private Ocr = New IronTesseract()

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

Using Input = 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 OCR.
  • La propiedad Ocr.Language especifica el paquete de idioma a utilizar para OCR.
  • La clase OcrInput se usa 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 se puede utilizar según sea necesario.