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 126 dilde, Vietnamca da dahil olmak üzere, resimlerden ve PDF belgelerinden metin okumasını sağlayan bir C# yazılım bileşenidir.

Tesseract'ın ileri düzey bir çatallamasıdır, yalnızca .NET geliştiricileri için oluşturulmuş olup hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakmaktadır.

IronOcr.Languages.Vietnamese'in İçeriği

Bu paket .NET için 132 OCR dilini içerir:

  • Vietnamca
  • VietnameseBest
  • VietnameseFast
  • VietnameseAlphabet
  • VietnameseAlphabetBest
  • VietnameseAlphabetFast

İndirme

Vietnamca Dil Paketi [Tiếng Việt]

Kurulum

Yapmamız gereken ilk şey, .NET projenize Vietnamca OCR paketini yüklemektir.

Install-Package IronOcr.Languages.Vietnamese

Kod Örneği

Bu C# kod ö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 örneği oluşturuyoruz.
  • Ocr.Language = OcrLanguage.Vietnamese; kullanarak dili Vietnamca olarak ayarlayın.
  • Resim veya PDF yoluyla OcrInput nesnesi oluşturun.
  • OCR'yi gerçekleştirmek ve çıkarılan metni elde etmek için Read metodunu çağırın.
  • Çıkarılan metin, ihtiyaç duyulduğunda kullanılabilecek, örneğin görüntülenecek veya bir dosyaya kaydedilecek olan AllText içinde saklanır.