Breton OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

另外 126 種語言

IronOCR 是一個C# 軟體組件,允許 .NET 開發人員從圖片和PDF文件中讀取126種語言的文本,包括布列塔尼語。 它是Tesseract 的一個高級分支,專為 .NET 開發人員構建,並且在速度和準確性上經常超過其他 Tesseract 發動機。

IronOcr.Languages.Breton的內容

該套件包含43種.NET OCR語言:

  • 布列塔尼語
  • 布列塔尼語Best
  • 布列塔尼語Fast

下載

布列塔尼語語言包 [brezhoneg]

  • Zip 形式下載
  • 使用NuGet 安裝

安裝

我們要做的第一件事是將我們的 布列塔尼語 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方法處理輸入圖片並提取文本,然後輸出到控制台。