12,820,283 members (29,848 online)

#### Stats

776.7K views
367 bookmarked
Posted 11 Aug 2005

# Neural Network OCR

, 11 Aug 2005 GPL3
Some ideas about optical character recognition using neural networks.
 AForge.Imaging.dll AForge.Math.dll AForge.NeuralNet.dll NeuroOCR.exe SourceGrid2.dll SourceLibrary.dll AForge Math Math.csproj.user NeuralNet Learning NeuralNet.csproj.user NeuroOCR App.ico NeuroOCR.csproj.user References AForge.Imaging.dll SourceGrid2.dll SourceLibrary.dll ```// AForge Math Library // // Copyright � Andrew Kirillov, 2005 // andrew.kirillov@gmail.com // namespace AForge.Math { using System; /// /// Complex number /// public struct Complex { public float Re; // real component public float Im; // imaginary component // Get zero value public static Complex Zero { get { return new Complex(0, 0); } } // Get magnitude (absolute) value public float Magnitude { get { return (float) System.Math.Sqrt(Re * Re + Im * Im); } } // Get phase value public float Phase { get { return (float) System.Math.Atan(Im / Re); } } // Get squred magnitude value public float SquaredMagnitude { get { return (Re * Re + Im * Im); } } // Constructors public Complex(float re, float im) { this.Re = re; this.Im = im; } public Complex(Complex c) { this.Re = c.Re; this.Im = c.Im; } // Get complex number as string public override string ToString() { return String.Format("{0}{1}{2}i", Re, ((Im < 0) ? '-' : '+'), Math.Abs(Im)); } // Add two complex numbers public static Complex operator+(Complex a, Complex b) { return new Complex(a.Re + b.Re, a.Im + b.Im); } // Subtract two complex numbers public static Complex operator-(Complex a, Complex b) { return new Complex(a.Re - b.Re, a.Im - b.Im); } // Multiply two complex numbers public static Complex operator*(Complex a, Complex b) { return new Complex( a.Re * b.Re - a.Im * b.Im, a.Re * b.Im + a.Im * b.Re); } // Divide one complex number by another public static Complex operator/(Complex a, Complex b) { float divider = b.Re * b.Re + b.Im * b.Im; if (divider == 0) throw new DivideByZeroException(); return new Complex( (a.Re * b.Re + a.Im * b.Im) / divider, (a.Im * b.Re - a.Re * b.Im) / divider); } } }```

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

## Share

 Software Developer IBM United Kingdom
Started software development at about 15 years old and it seems like now it lasts most part of my life. Fortunately did not spend too much time with Z80 and BK0010 and switched to 8086 and further. Similar with programming languages – luckily managed to get away from BASIC and Pascal to things like Assembler, C, C++ and then C#. Apart from daily programming for food, do it also for hobby, where mostly enjoy areas like Computer Vision, Robotics and AI. This led to some open source stuff like AForge.NET and not so open Computer Vision Sandbox.

Going out of computers I am just a man loving his family, enjoying traveling, a bit of books, a bit of movies and a mixture of everything else. Always wanted to learn playing guitar, but it seems like 6 strings are much harder than few dozens of keyboard’s keys. Will keep progressing ...

 Pro