Breton OCR in C# and .NET
This article was translated from English: Does it need improvement?
Translated
View the article in English
IronOCR是一個 C# 軟體元件,允許.NET設計師從圖像和 PDF 文件中讀取 126 種語言(包括布列塔尼語)的文字。 它是 Tesseract 的一個高級分支,專為.NET開發人員構建,在速度和準確性方面通常優於其他 Tesseract 引擎。
IronOCR的內容。語言。布列塔尼語
此軟體包包含 43 種適用於.NET的 OCR 語言:
- 布列塔尼語
- 布列塔尼語Best
- 布列塔尼語Fast
下載
布列塔尼語言包 [brezhoneg]
安裝
我們首先需要做的就是將我們的Breton OCR 套件安裝到您的.NET專案中。
Install-Package IronOcr.Languages.Breton
程式碼範例
此 C# 程式碼範例從圖像或 PDF 文件中讀取布列塔尼語文字。
// Import the IronOCR namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Breton
Ocr.Language = OcrLanguage.Breton;
// Read text from a Breton image or PDF document
using (var Input = new OcrInput(@"images\Breton.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Extract text from the OCR result
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
}
}
// Import the IronOCR namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Breton
Ocr.Language = OcrLanguage.Breton;
// Read text from a Breton image or PDF document
using (var Input = new OcrInput(@"images\Breton.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Extract text from the OCR result
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
}
}
' Import the IronOCR namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the OCR language to Breton
Ocr.Language = OcrLanguage.Breton
' Read text from a Breton image or PDF document
Using Input = New OcrInput("images\Breton.png")
' Perform OCR on the input
Dim Result = Ocr.Read(Input)
' Extract text from the OCR result
Dim AllText = Result.Text
' Output the extracted text
Console.WriteLine(AllText)
End Using
End Sub
End Class
$vbLabelText
$csharpLabel
- 此範例示範如何使用IronOCR函式庫對布列塔尼文字影像執行 OCR。
IronTesseract提供核心 OCR 功能。OcrInput是用包含布列塔尼文字的圖像路徑創建的。Read方法處理輸入圖像並提取文本,然後將文本輸出到控制台。

