Pashto OCR in C# and .NET
Andere Versionen dieses Dokuments:
IronOCR ist eine C#-Softwarekomponente, die .NET-Entwicklern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Pashto, zu lesen. Es ist eine erweiterte Abspaltung von Tesseract, die exklusiv for .NET-Entwickler entwickelt wurde und regelmäßig andere Tesseract-Engines sowohl in Bezug auf Geschwindigkeit als auch Genauigkeit übertrifft.
Inhalte von IronOcr.Languages.Pashto
Dieses Paket enthält 43 OCR-Sprachen for .NET:
- Pashto
- PashtoBest
- PashtoFast
Download
Pashto Sprachpaket [پښتو]
Installation
Das erste, was wir tun müssen, ist unser Pashto-OCR-Paket in Ihr .NET-Projekt zu installieren.
Install-Package IronOcr.Languages.Pashto
Beispielcode
Dieses C#-Codebeispiel liest Pashto-Text aus einem Bild oder PDF-Dokument.
// Import the IronOcr namespace
using IronOcr;
public class PashtoOcrExample
{
public static void Main()
{
// Create an instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Pashto
Ocr.Language = OcrLanguage.Pashto;
// Specify the image file containing the Pashto text
using (var Input = new OcrInput(@"images\Pashto.png"))
{
// Perform the OCR operation on the input image
var Result = Ocr.Read(Input);
// Store the extracted text from the image in a string variable
var AllText = Result.Text;
}
}
}
// Import the IronOcr namespace
using IronOcr;
public class PashtoOcrExample
{
public static void Main()
{
// Create an instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Pashto
Ocr.Language = OcrLanguage.Pashto;
// Specify the image file containing the Pashto text
using (var Input = new OcrInput(@"images\Pashto.png"))
{
// Perform the OCR operation on the input image
var Result = Ocr.Read(Input);
// Store the extracted text from the image in a string variable
var AllText = Result.Text;
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Public Class PashtoOcrExample
Public Shared Sub Main()
' Create an instance of the IronTesseract class
Dim Ocr = New IronTesseract()
' Set the OCR language to Pashto
Ocr.Language = OcrLanguage.Pashto
' Specify the image file containing the Pashto text
Using Input = New OcrInput("images\Pashto.png")
' Perform the OCR operation on the input image
Dim Result = Ocr.Read(Input)
' Store the extracted text from the image in a string variable
Dim AllText = Result.Text
End Using
End Sub
End Class
- Dieses Codefragment demonstriert, wie die IronOCR-Bibliothek für die Erkennung von Pashto-Text genutzt wird.
- Es richtet die Klasse
IronTesseractein, wählt Paschtu als Sprache aus und verarbeitet eine Bilddatei (Pashto.png), um den Text zu extrahieren und anzuzeigen.

