Portuguese OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, C# yazılım bileşeni olarak, .NET kodlayıcılarına Portekizce dahil 126 dildeki görüntülerden ve PDF belgelerinden metin okuma imkanı tanır.
Tesseract'ın geliştirilmiş bir dalıdır, yalnızca .NET geliştiricileri için geliştirilmiştir ve hem hız hem de doğruluk bakımından diğer Tesseract motorlarını düzenli olarak geride bırakır.
IronOcr.Languages.Portuguese İçeriği
Bu paket, .NET için 55 OCR dilini içerir:
- Portekizce
- PortekizceEnIyi
- PortekizceHızlı
İndirme
Portekizce Dil Paketi [português]
Kurulum
İlk yapmamız gereken şey, .NET projenize Portekizce OCR paketimizi yüklemektir.
Install-Package IronOcr.Languages.Portuguese
Kod Örneği
Bu C# kod örneği, bir görüntü veya PDF belgesinden Portekizce metin okur.
// Required using directive for IronOcr
using IronOcr;
var Ocr = new IronTesseract();
// Specify the language for OCR as Portuguese
Ocr.Language = OcrLanguage.Portuguese;
// Load the image or PDF from which to read the text
using (var Input = new OcrInput(@"images\Portuguese.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
// Required using directive for IronOcr
using IronOcr;
var Ocr = new IronTesseract();
// Specify the language for OCR as Portuguese
Ocr.Language = OcrLanguage.Portuguese;
// Load the image or PDF from which to read the text
using (var Input = new OcrInput(@"images\Portuguese.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
' Required using directive for IronOcr
Imports IronOcr
Private Ocr = New IronTesseract()
' Specify the language for OCR as Portuguese
Ocr.Language = OcrLanguage.Portuguese
' Load the image or PDF from which to read the text
Using Input = New OcrInput("images\Portuguese.png")
' Perform OCR on the input
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text
Dim AllText = Result.Text
' Output the extracted text
Console.WriteLine(AllText)
End Using
Bu kod, bir görüntüden Portekizce metin okuma işlemini kurmak ve IronOCR kutuphanesini nasıl kullanacağınızı gösterir. Görüntü veya PDF belgesine giden yolun doğru olduğundan emin olun. Tanınan metin AllText değişkeninde saklanacak ve konsola yazdırılacaktır.

