OCR bosnien en C# et .NET
Autres versions de ce document :
IronOCR est un composant logiciel C# permettant aux développeurs .NET de lire du texte à partir d'images et de documents PDF en 126 langues, y compris le bosniaque.
Il s'agit d'une version avancée de Tesseract, conçue exclusivement pour les développeurs .NET, et qui surpasse régulièrement les autres moteurs Tesseract en termes de vitesse et de précision.
Contenu de IronOcr.Languages.Bosnian
Ce package contient 46 langues OCR pour .NET :
- Bosnian
- BosnianBest
- BosnianFast
Télécharger
Pack de langue bosniaque [bosanski jezik]
Installation
La première chose à faire est d'installer notre package OCR bosniaque sur votre projet .NET.
Exemple de code
Cet exemple de code C# lit du texte bosniaque à partir d'une image ou d'un document PDF.
// 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
Module Program
Sub Main()
' Initialize an instance of IronTesseract
Dim Ocr As New IronTesseract()
' Set the OCR language to Bosnian
Ocr.Language = OcrLanguage.Bosnian
' Use OcrInput to specify the input file path for OCR
Using Input As 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 Module' Ensure the IronOCR library is included
Imports IronOcr
Module Program
Sub Main()
' Initialize an instance of IronTesseract
Dim Ocr As New IronTesseract()
' Set the OCR language to Bosnian
Ocr.Language = OcrLanguage.Bosnian
' Use OcrInput to specify the input file path for OCR
Using Input As 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 Module- Le code ci-dessus démontre comment effectuer l'OCR sur une image de texte bosniaque en utilisant IronOCR.
- La classe
IronTesseractest utilisée pour configurer et exécuter des tâches OCR. - La classe
OcrInputest utilisée pour spécifier le fichier image d'entrée à partir duquel le texte doit être extrait. - Enfin, le texte reconnu est affiché sur la console.
Curtis Chau détient un baccalauréat en informatique (Université de Carleton) et se spécialise dans le développement front-end avec expertise en Node.js, TypeScript, JavaScript et React. Passionné par la création d'interfaces utilisateur intuitives et esthétiquement plaisantes, Curtis aime travailler avec des frameworks modernes et créer des manuels bien structurés et visuellement attrayants.