Dzongkha OCR in C# and .NET
This article was translated from English: Does it need improvement?
Translated
View the article in English
IronOCR 是一款 C# 軟體元件,讓 .NET 開發人員能夠從 126 種語言(包括宗喀語)的圖片和 PDF 文件中讀取文字。
這是 Tesseract 的進階分支版本,專為 .NET 開發人員打造,無論在速度或準確度方面,其表現均定期超越其他 Tesseract 引擎。
IronOcr.Languages.Dzongkha 的內容
此套件包含 49 種適用於 .NET 的 OCR 語言:
- 宗卡語
- 宗卡語Best
- 宗卡語Fast
下載
宗喀語語言套件 [རང་ཁ]
安裝
我們首先必須將 Dzongkha OCR 套件安裝至您的 .NET 專案中。
Install-Package IronOcr.Languages.Dzongkha
程式碼範例
此 C# 程式碼範例用於從圖片或 PDF 文件中讀取宗卡語文字。
// Ensure to install the IronOcr.Languages.Dzongkha package before use.
// Usage of IronOCR library for reading Dzongkha text from images or PDFs.
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Dzongkha
Ocr.Language = OcrLanguage.Dzongkha;
// Specify the path to the input image file
using (var Input = new OcrInput(@"images\Dzongkha.png"))
{
// Reading text from the input file
var Result = Ocr.Read(Input);
// Retrieve all the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
// Ensure to install the IronOcr.Languages.Dzongkha package before use.
// Usage of IronOCR library for reading Dzongkha text from images or PDFs.
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Dzongkha
Ocr.Language = OcrLanguage.Dzongkha;
// Specify the path to the input image file
using (var Input = new OcrInput(@"images\Dzongkha.png"))
{
// Reading text from the input file
var Result = Ocr.Read(Input);
// Retrieve all the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
' Ensure to install the IronOcr.Languages.Dzongkha package before use.
' Usage of IronOCR library for reading Dzongkha text from images or PDFs.
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to Dzongkha
Ocr.Language = OcrLanguage.Dzongkha
' Specify the path to the input image file
Using Input = New OcrInput("images\Dzongkha.png")
' Reading text from the input file
Dim Result = Ocr.Read(Input)
' Retrieve all the recognized text
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
$vbLabelText
$csharpLabel

