Estonian OCR in C# and .NET
Curtis Chau
Updated: 2026年5月9日
此文件的其他版本:
IronOCR是一個C#的軟體元件,允許.NET開發人員從圖像和PDF文件讀取126種語言的文字,包括愛沙尼亞語。 它是 Tesseract 的一個進階分支,專為 .NET 開發者而建構,在速度和準確性方面經常超越其他 Tesseract 引擎。
IronOcr.Languages.Estonian的內容
此套件包含以下.NET的OCR語言:
- Estonian
- EstonianBest
- EstonianFast
下載
愛沙尼亞語語言包 [eesti]
安裝
我們首先需要做的是將我們的愛沙尼亞語OCR套件安裝到您的.NET專案中。
程式範例
此C#程式碼範例從圖像或PDF文件中讀取愛沙尼亞語文字。
// Import the IronOcr namespace
using IronOcr;
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Estonian
Ocr.Language = OcrLanguage.Estonian;
// Load the image or PDF from which text needs to be extracted
using (var Input = new OcrInput(@"images\Estonian.png"))
{
// Perform OCR to read text from the specified input
var Result = Ocr.Read(Input);
// Extract all the recognized text from the OCR result
var AllText = Result.Text;
}' Import the IronOcr namespace
Imports IronOcr
' Create a new instance of the IronTesseract class
Dim Ocr As New IronTesseract()
' Set the OCR language to Estonian
Ocr.Language = OcrLanguage.Estonian
' Load the image or PDF from which text needs to be extracted
Using Input As New OcrInput("images\Estonian.png")
' Perform OCR to read text from the specified input
Dim Result = Ocr.Read(Input)
' Extract all the recognized text from the OCR result
Dim AllText As String = Result.Text
End Using程式碼解釋:
- **IronTesseract:**這是IronOCR提供的主要類別,用於執行OCR操作。
- **Ocr.Language:**通過設置此屬性,我們定義了應在OCR期間使用的語言。 在這裡,它被設置為愛沙尼亞語。
- **OcrInput:**此用於指定我們要從中讀取的圖像或PDF文件。 它接受作為輸入的文件路徑。
- **Ocr.Read(Input):**此方法處理指定的輸入並對其進行OCR。
- **Result.Text:**此屬性包含已成功識別和從圖像或PDF文件中提取的所有文字。

技術作家
Curtis Chau擁有Carleton大學的電腦科學學士學位,專精於前端開發,擁有Node.js、TypeScript、JavaScript和React的專業知識。Curtis熱衷於建立直觀且美觀的使用者介面,喜愛使用現代框架並建立結構良好、視覺吸引力的手冊。
...
閱讀更多