alexwiese / FIGlet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FIGlet

library write in C# for generating Ascii-Art text and recognize this characters. Article : auriou.wordpress.com/2014/02/09/figlet-net-gnration-et-ocr-de-textes-art-ascii/

Example :

#
#  __  __  _                                  __  _       _   _        _
# |  \/  |(_)  ___  _ __   ___   ___   ___   / _|| |_    | \ | |  ___ | |_
# | |\/| || | / __|| '__| / _ \ / __| / _ \ | |_ | __|   |  \| | / _ \| __|
# | |  | || || (__ | |   | (_) |\__ \| (_) ||  _|| |_  _ | |\  ||  __/| |_
# |_|  |_||_| \___||_|    \___/ |___/ \___/ |_|   \__|(_)|_| \_| \___| \__|
#
# OCR-ArtASCII result : Microsoft.Net

Code :

var fig = new Figlet();
//Load specific font (Figlet format)
//fig.LoadFont(@"D:\FIGLET\FONTS\standard.flf");
//Generate ASCII-Art Text
var asciiart = fig.ToAsciiArt("Microsoft.Net");
Console.WriteLine(asciiart);

//Prepare alphabet for recognize 
fig.PrepareAlphabet("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.");
//Recognize Ascii-Art
var recognize = fig.RecognizeAsciiArt(asciiart);
Console.WriteLine("OCR-ArtASCII: {0}", recognize);
Console.ReadLine();

About


Languages

Language:C# 100.0%