OCR języka niemieckiego w C# i .NET
Inne wersje tego dokumentu:
IronOCR to komponent oprogramowania C#, który pozwala programistom .NET odczytywać tekst z obrazów i dokumentów PDF w 126 językach, w tym po niemiecku.
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.
Zawartość IronOcr.Languages.German
Ten pakiet zawiera 61 języków OCR dla .NET:
- German
- GermanBest
- GermanFast
- GermanFraktur
Pobieranie
German Language Pack [Deutsch]
Instalacja
Pierwszą rzeczą, którą musimy zrobić, jest zainstalowanie naszego pakietu OCR Niemiecki do projektu .NET.
Przykład kodu
Ten przykład kodu C# odczytuje tekst niemiecki z obrazu lub dokumentu PDF.
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to German. This must match the language of the document you are scanning.
Ocr.Language = OcrLanguage.German;
using (var Input = new OcrInput(@"images\German.png"))
{
// Perform OCR on the provided image and get the result.
var Result = Ocr.Read(Input);
// Extract all recognized text from the OCR result.
var AllText = Result.Text;
// Optionally, output the recognized text to the console for verification.
Console.WriteLine(AllText);
}Imports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to German. This must match the language of the document you are scanning.
Ocr.Language = OcrLanguage.German
Using Input = New OcrInput("images\German.png")
' Perform OCR on the provided image and get the result.
Dim Result = Ocr.Read(Input)
' Extract all recognized text from the OCR result.
Dim AllText = Result.Text
' Optionally, output the recognized text to the console for verification.
Console.WriteLine(AllText)
End UsingImports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to German. This must match the language of the document you are scanning.
Ocr.Language = OcrLanguage.German
Using Input = New OcrInput("images\German.png")
' Perform OCR on the provided image and get the result.
Dim Result = Ocr.Read(Input)
' Extract all recognized text from the OCR result.
Dim AllText = Result.Text
' Optionally, output the recognized text to the console for verification.
Console.WriteLine(AllText)
End UsingW tym przykladzie IronTesseract jest skonfigurowany do uzywania jezyka niemieckiego dla OCR, co jest konieczne do przetwarzania obrazow lub plikow PDF zawierajacych tekst niemiecki. Klasa OcrInput sluzy do okreslenia pliku obrazu, a metoda Read wykonuje operacje OCR, zwracajac wyodrebniony tekst.
Curtis Chau posiada tytuł licencjata z informatyki (Uniwersytet Carleton) i specjalizuje się w front-endowym rozwoju, z ekspertką w Node.js, TypeScript, JavaScript i React. Pasjonuje się tworzeniem intuicyjnych i estetycznie przyjemnych interfejsów użytkownika, Curtis cieszy się pracą z nowoczesnymi frameworkami i tworzeniem dobrze zorganizowanych, atrakcyjnych wizualnie podręczników.