Vietnamese OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Bu belgenin diğer versiyonları:

IronOCR, .NET kodlayıcılarının Vietnamca dahil olmak üzere 126 dilde resimlerden ve PDF belgelerinden metin okumasına olanak tanıyan bir C# yazılım bileşenidir.

Tesseract'ın, yalnızca .NET geliştiricileri için özel olarak oluşturulmuş gelişmiş bir dalıdır ve hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakır.

IronOcr.Languages.Vietnamese İçeriği

Bu paket, .NET için 132 OCR dili içerir:

  • Vietnamese
  • VietnameseBest
  • VietnameseFast
  • VietnameseAlphabet
  • VietnameseAlphabetBest
  • VietnameseAlphabetFast

İndir

Vietnamese Dil Paketi [Tiếng Việt]

Kurulum

İlk yapmanız gereken şey, .NET projenize Vietnamese OCR paketimizi yüklemektir.

Install-Package IronOcr.Languages.Vietnamese

Kod Örneği

Bu C# kodu örneği, bir resim veya PDF belgesinden Vietnamca metin okur.

// You need to install the IronOcr.Languages.Vietnamese package using the following NuGet command before running this code:
// PM> Install-Package IronOcr.Languages.Vietnamese

using IronOcr;

var Ocr = new IronTesseract();

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

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

    // Extract all recognized text
    var AllText = Result.Text;

    // Example: Output the extracted text to the console
    Console.WriteLine(AllText);
}
// You need to install the IronOcr.Languages.Vietnamese package using the following NuGet command before running this code:
// PM> Install-Package IronOcr.Languages.Vietnamese

using IronOcr;

var Ocr = new IronTesseract();

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

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

    // Extract all recognized text
    var AllText = Result.Text;

    // Example: Output the extracted text to the console
    Console.WriteLine(AllText);
}
' You need to install the IronOcr.Languages.Vietnamese package using the following NuGet command before running this code:
' PM> Install-Package IronOcr.Languages.Vietnamese

Imports IronOcr

Dim Ocr As New IronTesseract()

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

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

    ' Extract all recognized text
    Dim AllText = Result.Text

    ' Example: Output the extracted text to the console
    Console.WriteLine(AllText)
End Using
$vbLabelText   $csharpLabel

Bu kod örneğinde:

  • IronTesseract'nın bir örneğini oluşturuyoruz.
  • Dili Ocr.Language = OcrLanguage.Vietnamese; kullanarak Vietnamca'ya ayarlayın.
  • Görüntü veya PDF'nin yoluyla OcrInput nesnesi oluşturun.
  • OCR işlemi yapmak ve çıkarılan metni elde etmek için Read metodunu çağırın.
  • Çıkarılan metin, gerekli şekilde kullanılabilen, örneğin görüntüleme veya bir dosyaya kaydetme gibi işlemlerde kullanılmak üzere AllText'da saklanır.