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:

  • Vietnamca
  • VietnamcaEn iyi
  • VietnamcaFast
  • Vietnamca Alfabe
  • Vietnamca AlfabeBest
  • Vietnamca AlfabeFast

İ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'nin bir örneğini oluşturuyoruz.
  • Ocr.Language = OcrLanguage.Vietnamese; kullanarak dili Vietnamca olarak ayarlayın.
  • Görüntünün veya PDF/A'nın yolunu içeren bir OcrInput nesnesi oluşturun.
  • OCR işlemini gerçekleştirmek ve çıkarılan metni elde etmek için Read yöntemini çağırın.
  • Çıkarılan metin AllText içinde saklanır ve bu metin, görüntülemek veya bir dosyaya kaydetmek gibi ihtiyaç duyulduğunda kullanılabilir.