C# 與 .NET 中的愛沙尼亞語 OCR
Curtis Chau
已更新: 2026年8月2日
本文檔的其他版本:
IronOCR 是一個 C# 軟體元件,可讓 .NET 開發人員從圖像和 PDF 文件中讀取 126 種語言(包括愛沙尼亞語)的文字。 它是 Tesseract 的一個高級分支,專為 .NET 開發人員構建,在速度和準確性方面通常優於其他 Tesseract 引擎。
IronOcr.Languages.Estonian 的內容
此軟體包包含以下適用於 .NET 的 OCR 語言:
- Estonian
- EstonianBest
- EstonianFast
下載
愛沙尼亞語語言包[愛沙尼亞語]
安裝
我們首先需要做的是將我們的愛沙尼亞語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' 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 擁有卡爾頓大學計算機科學學士學位,專注於前端開發,擅長於 Node.js、TypeScript、JavaScript 和 React。Curtis 熱衷於創建直觀且美觀的用戶界面,喜歡使用現代框架並打造結構良好、視覺吸引人的手冊。