Danish OCR in C# and .NET
Andere Versionen dieses Dokuments:
IronOCR ist eine C#-Softwarekomponente, die .NET-Programmierern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Dänisch, zu lesen.
Es ist ein fortschrittlicher Fork von Tesseract, der ausschließlich für .NET-Entwickler entwickelt wurde und regelmäßig andere Tesseract-Engines sowohl in Geschwindigkeit als auch Genauigkeit übertrifft.
Inhalt von IronOcr.Languages.Danish
Dieses Paket enthält 61 OCR-Sprachen for .NET:
- Dänisch
- DänischBest
- DänischFast
- DänischFraktur
Download
Dänisches Sprachpaket [dansk]
Installation
Der erste Schritt ist, das Dänische OCR-Paket in Ihr .NET-Projekt zu installieren.
Beispielcode
Dieses C#-Codebeispiel liest dänischen Text aus einem Bild oder PDF-Dokument mit IronOCR.
// Import the IronOcr namespace to access OCR functionalities
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract object, which will handle OCR operations
var Ocr = new IronTesseract();
// Set the language for OCR to Danish
Ocr.Language = OcrLanguage.Danish;
// Using a 'using' statement to ensure the OcrInput object is disposed of correctly
using (var Input = new OcrInput(@"images\Danish.png"))
{
// Perform OCR on the input image and store the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the result
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}' Import the IronOcr namespace to access OCR functionalities
Imports IronOcr
Module Program
Sub Main()
' Initialize the IronTesseract object, which will handle OCR operations
Dim Ocr As New IronTesseract()
' Set the language for OCR to Danish
Ocr.Language = OcrLanguage.Danish
' Using a 'Using' statement to ensure the OcrInput object is disposed of correctly
Using Input As New OcrInput("images\Danish.png")
' Perform OCR on the input image and store the result
Dim Result = Ocr.Read(Input)
' Extract the recognized text from the result
Dim AllText = Result.Text
' Output the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End ModuleDieses Beispiel zeigt, wie die IronOCR eingerichtet wird, um dänischen Text aus einer Bilddatei zu lesen. Das IronTesseract-Objekt ist so konfiguriert, dass es die dänische Sprache verwendet, und ein Bild wird mit OcrInput geladen. Ocr.Read führt das OCR durch, und der erkannte Text wird extrahiert und gedruckt.

Curtis Chau hat einen Bachelor-Abschluss in Informatik von der Carleton University und ist spezialisiert auf Frontend-Entwicklung mit Expertise in Node.js, TypeScript, JavaScript und React. Leidenschaftlich widmet er sich der Erstellung intuitiver und ästhetisch ansprechender Benutzerschnittstellen und arbeitet gerne mit modernen Frameworks sowie der Erstellung gut strukturierter, optisch ansprechender Handbücher.