Tamil OCR in C# and .NET

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

IronOCR to komponent oprogramowania C#, który pozwala programistom .NET odczytywać teksty z obrazów i dokumentów PDF w 126 językach, w tym w języku tamilskim.

Jest to zaawansowany fork Tesseract, stworzony wyłącznie dla programistów .NET i regularnie przewyższa inne silniki Tesseract zarówno pod względem szybkości, jak i dokładności.

Zawartość IronOcr.Languages.Tamil

Ten pakiet zawiera 102 języki OCR dla .NET:

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

Pobieranie

Tamil Language Pack [தமிழ]

Instalacja

Pierwszą rzeczą, którą musimy zrobić, to zainstalować nasz pakiet OCR Tamil w twoim projekcie .NET.

Install-Package IronOcr.Languages.Tamil

Przyklad kodu

Ten przykład kodu C# odczytuje tekst w języku tamilskim z obrazu lub dokumentu 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
  • Klasa IronTesseract jest używana do inicjalizacji i konfiguracji silnika OCR.
  • Właściwość Ocr.Language określa pakiet językowy do użycia w OCR.
  • Klasa OcrInput jest używana z ścieżką do pliku obrazu zawierającego tekst w języku tamilskim.
  • Metoda Ocr.Read() przetwarza obraz i wyodrębnia tekst.
  • Na koniec rozpoznany tekst jest przechowywany w AllText i może być wykorzystany zgodnie z potrzebami.