使用 C# 和 .NET 实现埃塞俄比亚字母 OCR

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.语言.埃塞俄比亚语的内容

此软件包包含 73 种适用于 .NET 的 OCR 语言:

埃塞俄比亚字母

  • 埃塞俄比亚字母表最佳 埃塞俄比亚字母Fast

下载

埃塞俄比亚字母语言包[Ge'ez]

下载为Zip 文件

安装

我们首先需要做的是将我们的埃塞俄比亚字母OCR 包安装到您的 .NET 项目中。

Install-Package IronOCR.Languages.Ethiopic

代码示例

这段 C# 代码示例从图像或 PDF 文档中读取埃塞俄比亚字母文本。

// First, ensure the IronOcr.Languages.Ethiopic package is installed
using IronOcr;

public class EthiopicOcrExample
{
    public void ReadEthiopicText()
    {
        // Create an instance of IronTesseract
        var Ocr = new IronTesseract();

        // Set the language property to Ethiopic
        Ocr.Language = OcrLanguage.Ethiopic;

        // Define the input image containing Ethiopic text
        using (var Input = new OcrInput(@"images\Ethiopic.png"))
        {
            // Perform OCR to read text from the image
            var Result = Ocr.Read(Input);

            // Store the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
// First, ensure the IronOcr.Languages.Ethiopic package is installed
using IronOcr;

public class EthiopicOcrExample
{
    public void ReadEthiopicText()
    {
        // Create an instance of IronTesseract
        var Ocr = new IronTesseract();

        // Set the language property to Ethiopic
        Ocr.Language = OcrLanguage.Ethiopic;

        // Define the input image containing Ethiopic text
        using (var Input = new OcrInput(@"images\Ethiopic.png"))
        {
            // Perform OCR to read text from the image
            var Result = Ocr.Read(Input);

            // Store the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
' First, ensure the IronOcr.Languages.Ethiopic package is installed
Imports IronOcr

Public Class EthiopicOcrExample
	Public Sub ReadEthiopicText()
		' Create an instance of IronTesseract
		Dim Ocr = New IronTesseract()

		' Set the language property to Ethiopic
		Ocr.Language = OcrLanguage.Ethiopic

		' Define the input image containing Ethiopic text
		Using Input = New OcrInput("images\Ethiopic.png")
			' Perform OCR to read text from the image
			Dim Result = Ocr.Read(Input)

			' Store the recognized text
			Dim AllText = Result.Text

			' Output the recognized text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • 此示例创建IronTesseract实例以执行 OCR 操作。
  • 它使用OcrLanguage.Ethiopic将语言设置为埃塞俄比亚语。
  • OcrInput用于定义源图像。
  • Read方法执行 OCR 并返回包含识别文本的结果。
  • 识别出的文本存储在AllText中,并打印到控制台。