Fraktur Alphabet OCR in C#
IronOCR is a C# software component allowing .NET coders to read text from images and PDF documents in 126 languages, including Fraktur Alphabet.
It is an advanced fork of Tesseract, built exclusively for .NET developers and regularly outperforms other Tesseract engines in both speed and accuracy.
Contents of IronOcr.Languages.Fraktur
This package contains 70 OCR languages for .NET:
- FrakturAlphabet
- FrakturAlphabetBest
- FrakturAlphabetFast
Download
Fraktur Alphabet Language Pack [Generic Fraktur]
Installation
The first thing we have to do is install our Fraktur Alphabet OCR package into your .NET project.
PM> Install-Package IronOCR.Languages.Fraktur
PM> Install-Package IronOCR.Languages.Fraktur
Code Example
This C# code example reads Fraktur Alphabet text from an Image or PDF document.
// Requires the IronOcr NuGet package and the Fraktur language package to be installed.
using IronOcr;
class FrakturOCRExample
{
static void Main()
{
// Create an instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Fraktur
Ocr.Language = OcrLanguage.Fraktur;
// Load the image containing Fraktur text
using (var Input = new OcrInput(@"images\Fraktur.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Retrieve and display the recognized text
var AllText = Result.Text;
Console.WriteLine(AllText);
}
}
}
// Requires the IronOcr NuGet package and the Fraktur language package to be installed.
using IronOcr;
class FrakturOCRExample
{
static void Main()
{
// Create an instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Fraktur
Ocr.Language = OcrLanguage.Fraktur;
// Load the image containing Fraktur text
using (var Input = new OcrInput(@"images\Fraktur.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Retrieve and display the recognized text
var AllText = Result.Text;
Console.WriteLine(AllText);
}
}
}
In this example:
- We create an
IronTesseract
object which serves as our OCR engine. - We change the language setting to Fraktur using
OcrLanguage.Fraktur
. - We load an image file (
@"images\Fraktur.png"
) into anOcrInput
object. - The
Ocr.Read()
method processes the input image and returns the OCR result. - Finally, we print the extracted text to the console.