Financial 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 Finansal dahil 126 dilde resimler ve PDF belgeleri üzerinden metin okumasını sağlayan bir C# yazılım bileşenidir.

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.Financial İçeriği

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

  • Finansal

İndir

Finansal Dil Paketi [Financial]

Kurulum

Yapmamız gereken ilk şey, Finansal OCR paketimizi .NET projenize yüklemektir.

Install-Package IronOcr.Languages.Financial

Kod Örneği

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

// Import the IronOcr namespace
using IronOcr;

// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();

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

// Create an OCR input object, specifying the path to the image or PDF
using (var Input = new OcrInput(@"images\Financial.png"))
{
    // Perform OCR to read text from the input
    var Result = Ocr.Read(Input);

    // Retrieve the extracted text
    var AllText = Result.Text;
}
// Import the IronOcr namespace
using IronOcr;

// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();

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

// Create an OCR input object, specifying the path to the image or PDF
using (var Input = new OcrInput(@"images\Financial.png"))
{
    // Perform OCR to read text from the input
    var Result = Ocr.Read(Input);

    // Retrieve the extracted text
    var AllText = Result.Text;
}
' Import the IronOcr namespace
Imports IronOcr

' Instantiate the IronTesseract OCR engine
Private Ocr = New IronTesseract()

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

' Create an OCR input object, specifying the path to the image or PDF
Using Input = New OcrInput("images\Financial.png")
	' Perform OCR to read text from the input
	Dim Result = Ocr.Read(Input)

	' Retrieve the extracted text
	Dim AllText = Result.Text
End Using
$vbLabelText   $csharpLabel

Açıklama:

  • Using IronOCR: Bu ad alanı, OCR işlemi için gerekli tüm sınıfları içerir.
  • IronTesseract Sınıfı: Bu, OCR görevlerini gerçekleştiren ana sınıftır.
  • Dil Ayarı: Dili Financial olarak ayarlamak, OCR motorunun finansal terminolojiyi tanımasını sağlar.
  • OcrInput Sınıfı: İşlenecek resim veya PDF dosyasını belirten bir dosya yolu alır.
  • Read Method: Ocr.Read(Input) üzerinde çalıştırılır, görüntüyü işleyerek sağlanan girdi ve dil ayarlarına göre metni alır.
  • Result.Text: Görüntü veya PDF'den tanınan metni saklar.