OCR norvégien en C# et .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

126 autres langues

IronOCR est un composant logiciel C# permettant aux développeurs .NET de lire du texte à partir d'images et de documents PDF dans 126 langues, dont le norvégien.

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.Norvégien

Ce package contient 52 langues OCR pour .NET :

  • Norvégien
  • NorwegianBest
  • NorwegianFast

Télécharger

Pack de langue norvégienne [norvégien]

  • Télécharger au format Zip
  • Installer avec NuGet

Installation

La première chose à faire est d'installer notre package OCR norvégien sur votre projet .NET.

Install-Package IronOCR.Languages.Norwegian

Exemple de code

Cet exemple de code C# lit du texte norvégien à partir d'une image ou d'un document PDF.

// Make sure to install the Norwegian language package:
// PM> Install-Package IronOCR.Languages.Norwegian
using IronOcr;

var Ocr = new IronTesseract();

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

// Define the input source as an image file
using (var Input = new OcrInput(@"images\Norwegian.png"))
{
    // Perform OCR to read the text from the image
    var Result = Ocr.Read(Input);

    // Store the extracted text in a variable
    var AllText = Result.Text;

    // Output the extracted text to the console
    Console.WriteLine(AllText);
}
// Make sure to install the Norwegian language package:
// PM> Install-Package IronOCR.Languages.Norwegian
using IronOcr;

var Ocr = new IronTesseract();

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

// Define the input source as an image file
using (var Input = new OcrInput(@"images\Norwegian.png"))
{
    // Perform OCR to read the text from the image
    var Result = Ocr.Read(Input);

    // Store the extracted text in a variable
    var AllText = Result.Text;

    // Output the extracted text to the console
    Console.WriteLine(AllText);
}
' Make sure to install the Norwegian language package:
' PM> Install-Package IronOCR.Languages.Norwegian
Imports IronOcr

Private Ocr = New IronTesseract()

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

' Define the input source as an image file
Using Input = New OcrInput("images\Norwegian.png")
	' Perform OCR to read the text from the image
	Dim Result = Ocr.Read(Input)

	' Store the extracted text in a variable
	Dim AllText = Result.Text

	' Output the extracted text to the console
	Console.WriteLine(AllText)
End Using
$vbLabelText   $csharpLabel

Ce code initialise le moteur OCR, définit la langue sur le norvégien, lit le texte à partir d'une image, puis affiche le texte reconnu.

  • Assurez-vous que le package IronOCR et le pack de langue norvégienne sont installés dans votre projet .NET pour que cet exemple fonctionne correctement.