Vietnamese OCR in C# and .NET

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

IronOCR 是一個 C# 軟體元件,允許 .NET 編碼人員從圖片和 PDF 文件中讀取文字,可使用 126 種語言,包括越南語。

它是 Tesseract 的進階分叉,專為 .NET 開發人員打造,在速度和精確度上都經常超越其他 Tesseract 引擎。

IronOcr.Languages.Vietnamese的內容

本套件包含 132 種 .NET 的 OCR 語言:

  • 越南語
  • 越南語最佳
  • 越南語快速
  • 越南語字母
  • 越南語字母最佳
  • 越南語字母快速

下載

[Tiếng Việt] * 下載方式為 Zip * 使用 NuGet 安裝

安裝

程式碼範例 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); } ``` 在這個程式碼範例中 - 我們建立一個 `IronTesseract 的實例`。 - 使用 `Ocr.Language = OcrLanguage.Vietnamese;` 設定語言為越南語。 - 使用影像或 PDF 的路徑建立 `OcrInput` 物件。 - 呼叫 `Read` 方法來執行 OCR 並取得擷取的文字。 - 擷取的文字會儲存在 `AllText` 中,可依需要使用,例如顯示或儲存至檔案。