Bosnian OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Bu belgenin diğer versiyonları:

IronOCR, C# yazılım bileşeni olarak, .NET kodlayıcılarının Bosna dili de dahil olmak üzere 126 dilde görüntülerden ve PDF belgelerinden metin okumasını sağlar.

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

IronOcr.Languages.Bosnian İçeriği

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

  • Boşnakça
  • BoşnakçaBest
  • BoşnakçaFast

İndir

Boşnakça Dil Paketi [bosanski jezik]

Kurulum

Yapmamız gereken ilk şey, Boşnakça OCR paketimizi .NET projenize yüklemektir.

Install-Package IronOcr.Languages.Bosnian

Kod Örneği

Bu C# kod örneği, bir görüntü veya PDF belgesinden Boşnakça metni okur.

// Ensure the IronOCR library is included
using IronOcr;

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

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

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

            // Extract the recognized text from the result
            var AllText = Result.Text;

            // Output the recognized text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Ensure the IronOCR library is included
using IronOcr;

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

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

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

            // Extract the recognized text from the result
            var AllText = Result.Text;

            // Output the recognized text to the console
            Console.WriteLine(AllText);
        }
    }
}
' Ensure the IronOCR library is included
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Initialize an instance of IronTesseract
		Dim Ocr = New IronTesseract()

		' Set the OCR language to Bosnian
		Ocr.Language = OcrLanguage.Bosnian

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

			' Extract the recognized text from the result
			Dim AllText = Result.Text

			' Output the recognized text to the console
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • Yukarıdaki kod, IronOCR kullanarak Boşnakça bir metin resminde OCR gerçekleştirmenin nasıl yapıldığını gösterir.
  • IronTesseract sınıfı, OCR görevlerini yapılandırmak ve yürütmek için kullanılır.
  • OcrInput sınıfı, metnin çıkarılacağı giriş görüntü dosyasını belirtmek için kullanılır.
  • Son olarak, tanınan metin konsola yazdırılır.