使用 C# 和 .NET 進行奧裡亞語 OCR 識別
This article was translated from English: Does it need improvement?
TranslatedView the article in English
Other versions of this document:
IronOCR 是一個 C# 軟體元件,允許 .NET 程式設計師從圖像和 PDF 文件中讀取 126 種語言(包括奧裡亞語)的文字。 它是 Tesseract 的一個高級分支,專為 .NET 開發人員構建,在速度和準確性方面通常優於其他 Tesseract 引擎。
IronOcr.Languages.Oriya 的內容
此軟體包包含多種適用於 .NET 的 OCR 語言:
- 奧裡亞語
- 奧裡亞語Best
- 奧裡亞語Fast
- 奧裡亞字母
- 奧裡亞字母Best
- 奧裡亞語字母速記
下載
奧裡亞語語言包[ଓଡଆ]
安裝
我們首先需要做的是將我們的Oriya OCR 套件安裝到您的 .NET 專案中。
Install-Package IronOCR.Languages.Oriya
程式碼範例
此 C# 程式碼範例從圖像或 PDF 文件中讀取奧裡亞語文字。
// This example demonstrates how to use the IronOCR library to perform OCR on an Oriya language image.
using IronOcr;
class Program
{
static void Main()
{
// Instantiate the IronTesseract engine
var Ocr = new IronTesseract();
// Set the OCR language to Oriya
Ocr.Language = OcrLanguage.Oriya;
// Define the input file path for the OCR
using (var Input = new OcrInput(@"images\Oriya.png"))
{
// Perform OCR and obtain the result
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}// This example demonstrates how to use the IronOCR library to perform OCR on an Oriya language image.
using IronOcr;
class Program
{
static void Main()
{
// Instantiate the IronTesseract engine
var Ocr = new IronTesseract();
// Set the OCR language to Oriya
Ocr.Language = OcrLanguage.Oriya;
// Define the input file path for the OCR
using (var Input = new OcrInput(@"images\Oriya.png"))
{
// Perform OCR and obtain the result
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}' This example demonstrates how to use the IronOCR library to perform OCR on an Oriya language image.
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Instantiate the IronTesseract engine
Dim Ocr = New IronTesseract()
' Set the OCR language to Oriya
Ocr.Language = OcrLanguage.Oriya
' Define the input file path for the OCR
Using Input = New OcrInput("images\Oriya.png")
' Perform OCR and obtain the result
Dim Result = Ocr.Read(Input)
' Extract all recognized text from the result
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class$vbLabelText $csharpLabel
IronTesseract物件用於配置和執行 OCR。- OCR 的語言設定為 Oriya,使用
OcrLanguage.Oriya。 OcrInput可讓您指定需要提取文字的圖像或文件。Read()方法執行 OCR 並產生結果,從中可以擷取並利用辨識出的文字。





