Icelandic OCR in C# and .NET
Curtis Chau
Updated: 2026年4月23日
本文件的其他版本:
IronOCR 是一款 C# 軟體元件,讓 .NET 開發人員能夠從 126 種語言(包括冰島語)的圖片和 PDF 文件中讀取文字。 這是 Tesseract 的進階分支版本,專為 .NET 開發者打造,其速度與準確度均經常優於其他 Tesseract 引擎。
IronOcr.Languages.Icelandic 的內容
此套件包含 52 種適用於 .NET 的 OCR 語言:
- 冰島語
- 冰島語Best
- 冰島語Fast
下載
冰島語語言套件 [Íslenska]
安裝
我們首先必須將冰島語 OCR 套件安裝至您的 .NET 專案中。
程式碼範例
此 C# 程式碼範例用於從圖片或 PDF 文件中讀取冰島語文字。
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Icelandic
Ocr.Language = OcrLanguage.Icelandic;
// Load the image or PDF file to be processed
using (var Input = new OcrInput(@"images\Icelandic.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Print the extracted text to the console
System.Console.WriteLine(AllText);
}
}
}Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create an instance of the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the language to Icelandic
Ocr.Language = OcrLanguage.Icelandic
' Load the image or PDF file to be processed
Using Input = New OcrInput("images\Icelandic.png")
' Perform OCR on the input file
Dim Result = Ocr.Read(Input)
' Extract all recognized text from the result
Dim AllText = Result.Text
' Print the extracted text to the console
System.Console.WriteLine(AllText)
End Using
End Sub
End Class說明
IronTesseract類別是 IronOCR程式庫的一部分,專門用於執行 OCR 操作。Ocr.Language = OcrLanguage.Icelandic;將 OCR 語言設定為冰島語。OcrInput會取得輸入檔案(圖片或 PDF)的路徑,並將其預備好以供處理。Ocr.Read(Input)處理輸入檔案並返回 OCR 結果。Result.Text會從已處理的輸入中擷取所有可識別的文字。
請確保您的 .NET 專案已安裝 IronOCR 程式庫及其冰島語語言套件,才能成功執行此範例。

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