Canadian Aboriginal Alphabet 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 開發人員能夠從 126 種語言的圖像和 PDF 文件中讀取文字,其中包括加拿大原住民字母。

這是 Tesseract 的進階分支版本,專為 .NET 開發人員打造,無論在速度或準確度方面,其表現均經常優於其他 Tesseract 引擎。

IronOcr.Languages.CanadianAboriginal 的內容

此套件包含 103 種適用於 .NET 的 OCR 語言:

  • 加拿大原住民字母
  • 加拿大原住民字母表最佳
  • 加拿大原住民字母表快速

下載

加拿大原住民字母語言套件 [加拿大第一民族]

安裝

我們首先必須將"加拿大原住民字母 OCR 套件"安裝至您的 .NET 專案中。

Install-Package IronOcr.Languages.CanadianAboriginal

程式碼範例

此 C# 程式碼範例可從圖片或 PDF 文件中讀取加拿大原住民字母文字。 它使用 IronOCR 程式庫來執行光學字元辨識。

// Install the IronOCR package via NuGet
// PM> Install-Package IronOcr.Languages.CanadianAboriginal

using IronOcr;

class Program
{
    static void Main()
    {
        // Create an instance of the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Canadian Aboriginal
        Ocr.Language = OcrLanguage.CanadianAboriginal;

        // Provide the path to the image or PDF for OCR processing
        using (var Input = new OcrInput(@"images\CanadianAboriginal.png"))
        {
            // Perform OCR on the input file
            var Result = Ocr.Read(Input);

            // Extract all recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// Install the IronOCR package via NuGet
// PM> Install-Package IronOcr.Languages.CanadianAboriginal

using IronOcr;

class Program
{
    static void Main()
    {
        // Create an instance of the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to Canadian Aboriginal
        Ocr.Language = OcrLanguage.CanadianAboriginal;

        // Provide the path to the image or PDF for OCR processing
        using (var Input = new OcrInput(@"images\CanadianAboriginal.png"))
        {
            // Perform OCR on the input file
            var Result = Ocr.Read(Input);

            // Extract all recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
' Install the IronOCR package via NuGet
' PM> Install-Package IronOcr.Languages.CanadianAboriginal

Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Create an instance of the IronTesseract OCR engine
		Dim Ocr = New IronTesseract()

		' Set the language to Canadian Aboriginal
		Ocr.Language = OcrLanguage.CanadianAboriginal

		' Provide the path to the image or PDF for OCR processing
		Using Input = New OcrInput("images\CanadianAboriginal.png")
			' Perform OCR on the input file
			Dim Result = Ocr.Read(Input)

			' Extract all recognized text
			Dim AllText = Result.Text

			' Output the recognized text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • 上述程式碼使用 IronOcr.IronTesseract 類別來執行 OCR。
  • 它將 OcrLanguage.CanadianAboriginal 設為指定加拿大原住民文本的語言模型。
  • OcrInput 物件會載入路徑中指定的圖片。
  • Ocr.Read 方法會處理圖像並回傳辨識出的文字。
  • 最後,擷取的文字會被 PRINT 至控制台。