Cherokee OCR in C

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的內容。語言。切羅基語

此軟體包包含 120 種適用於.NET的 OCR 語言:

  • 切羅基字母表
  • 切諾基字母表最佳
  • CherokeeAlphabetFast
  • 切羅基
  • CherokeeBest
  • CherokeeFast

下載

切羅基語包[ᏣᎳᎩ ᎦᏬᏂᎯᏍᏗ]

安裝

我們首先需要做的是將我們的Cherokee OCR 套件安裝到您的.NET專案中。

Install-Package IronOcr.Languages.Cherokee

程式碼範例

這段 C# 程式碼範例從圖像或 PDF 文件中讀取切諾基語文字。

// Import the IronOcr namespace
using IronOcr;

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

        // Set the language for OCR to Cherokee
        Ocr.Language = OcrLanguage.Cherokee;

        // Use OcrInput to specify the image or PDF to be read
        using (var Input = new OcrInput(@"images\Cherokee.png"))
        {
            // Perform OCR on the input document
            var Result = Ocr.Read(Input);

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

            // Display the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

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

        // Set the language for OCR to Cherokee
        Ocr.Language = OcrLanguage.Cherokee;

        // Use OcrInput to specify the image or PDF to be read
        using (var Input = new OcrInput(@"images\Cherokee.png"))
        {
            // Perform OCR on the input document
            var Result = Ocr.Read(Input);

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

            // Display the recognized text
            Console.WriteLine(AllText);
        }
    }
}
$vbLabelText   $csharpLabel

以下是程式碼運作方式的簡要說明:

  • IronTesseract:建立 IronTesseract 類別的實例來處理 OCR 操作。
  • OcrLanguage.Cherokee:使用 OcrLanguage.Cherokee 屬性將語言設為 Cherokee,該屬性告訴 OCR 引擎識別 Cherokee 文字。
  • OcrInput:OcrInput 類別提供影像或 PDF 文件所在的輸入路徑。
  • Ocr.Read:對 OCR 物件呼叫 Read 方法,並傳入輸入。 它執行OCR識別過程。
  • Result.Text:從結果中提取識別出的文本,並將其儲存在 AllText 變數中以供進一步使用。 -控制台輸出:辨識出的文字將列印到控制台。