English OCR in C# and .NET

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

126 Daha Fazla Dil

IronOCR, .NET kodlayıcılarının İngilizce dahil 126 dilde resimler ve PDF belgeleri üzerinden metin okumasını sağlayan bir C# yazılım bileşenidir.

Bu, .NET geliştiricileri için özel olarak oluşturulmuş Tesseract'ın gelişmiş bir çatısıdır ve hem hız hem de doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakır.

IronOcr.Languages.English İçeriği

Bu paket, .NET için 64 OCR dilini içerir:

İndir

İngilizce Dil Paketi [Modern English]

Kod Örneği

Bu C# kod örneği, bir resim veya PDF belgesinden İngilizce metni okur.

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the language to English
        Ocr.Language = OcrLanguage.English;

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

            // Get all the recognized text
            var AllText = Result.Text;

            // Output the recognized 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 language to English
        Ocr.Language = OcrLanguage.English;

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

            // Get all the recognized text
            var AllText = Result.Text;

            // Output the recognized text
            Console.WriteLine(AllText);
        }
    }
}
Imports IronOcr

Class Program
    Shared Sub Main()
        ' Initialize the IronTesseract OCR engine
        Dim Ocr As New IronTesseract()

        ' Set the language to English
        Ocr.Language = OcrLanguage.English

        ' Define the input source as an image file
        Using Input As New OcrInput("images\English.png")
            ' Perform OCR to read the text from the input
            Dim Result = Ocr.Read(Input)

            ' Get all the recognized text
            Dim AllText = Result.Text

            ' Output the recognized text
            Console.WriteLine(AllText)
        End Using
    End Sub
End Class
$vbLabelText   $csharpLabel
  • IronOCR paketine ve uygun dil paketine sahip olduğunuzdan emin olun.
  • Bu örnek, OCR motorunu başlatır, İngilizce işlem yapmasını sağlar, giriş görüntüsünden metni okur ve tanınan metni çıktılar.