Norwegian OCR in C# and .NET
IronOCR to komponent oprogramowania C#, ktory pozwala programistom .NET odczytywac tekst z obrazow i dokumentow PDF w 126 jezykach, w tym norweskim.
Jest to zaawansowany fork Tesseracta, zbudowany wyłącznie dla deweloperów .NET i regularnie przewyższający inne silniki Tesseract pod względem szybkości i dokładności.
Zawartosc IronOcr.Languages.Norwegian
Pakiet ten zawiera 52 języki OCR dla .NET:
- Norwegian
- NorwegianBest
- NorwegianFast
Pobieranie
Norwegian Language Pack [Norsk]
Instalacja
Pierwsza rzecza, ktora musimy zrobic, jest zainstalowanie naszego pakietu OCR Norwegian w projekcie .NET.
Install-Package IronOcr.Languages.Norwegian
Przyklad kodu
Ten przyklad kodu C# odczytuje norweski tekst z obrazu lub dokumentu 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);
}
Imports IronOcr
' Make sure to install the Norwegian language package:
' PM> Install-Package IronOcr.Languages.Norwegian
Dim Ocr As New IronTesseract()
' Set the OCR language to Norwegian
Ocr.Language = OcrLanguage.Norwegian
' Define the input source as an image file
Using Input As 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
- Ten kod inicjuje silnik OCR, ustawia jezyk na norweski, odczytuje tekst z obrazu i nastepnie wyswietla rozpoznany tekst.
- Upewnij sie, ze pakiet IronOCR i pakiet jezykowy norweski sa zainstalowane w twoim projekcie .NET, aby pomyslnie uruchomic ten przyklad.

