Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version
Go to top

Neural Network for Recognition of Handwritten Digits in C#

, 14 Mar 2012
This article is an example of an artificial neural network designed to recognize handwritten digits.
Handwritten_Character_Recognition.zip
Handwritten Character Recognition
AForgeLibrary.dll
Data
Default-ini.ini
hand written characters.bmp
nn23-12-2010.nnt
number 3.bmp
numbers 1.bmp
The quick brown fox (Tahoma).bmp
Thumbs.db
HandwrittenRecognition.exe-bak
NeuralNetworkLibrary.dll
NNHandwrittenCharRecCsDemo.zip
Handwritten character recognition demo
Data
CNN news.bmp
Codeproject.bmp
Default-ini.ini
nn23-12-2010.nnt
numbers 1.bmp
numbers 2.bmp
numbers.bmp
Objects.bmp
The quick brown fox (Tahoma).bmp
HandwrittenRecogniration.exe-bak
NeuralNetworkLibrary.dll
NNHandwrittenCharRecCsSource.zip
HandwrittenRecognition
HandwrittenRecognition
bin
Debug
Release
NeuralNetwork
obj
Debug
Release
x86
Debug
Properties
Settings.settings
Resources
NeuralNetworkLibrary
Activation Functions
ArchiveSerialization
bin
Debug
Release
DataFiles
NeuralNetwork
NNConnections
NNLayers
NNNeurons
NNWeights
obj
Debug
Release
Properties
Service References
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace HandwrittenRecogniration
{
    public struct BackPropagationParameters
    {
        public uint m_AfterEvery;
        public double m_EtaDecay;
        public double m_InitialEta;
        public double m_MinimumEta;
        public string m_strInitialEtaMessage;
        public string m_strStartingPatternNum;
        public uint m_StartingPattern;
        public uint m_cNumThreads;
        public bool m_bDistortPatterns;
        public double m_EstimatedCurrentMSE;
    
    };

    public partial class BackPropagationParametersForm : Form
    {
   
        private BackPropagationParameters m_Parameters;
        /// <summary>
        /// 
        /// </summary>
        /// <param name="value"></param>
        public void SetBackProParameters(BackPropagationParameters value)
        {
            m_Parameters = value;
            textBoxAfterEveryNBackPropagations.Text = m_Parameters.m_AfterEvery.ToString();
            textBoxBackThreads.Text = m_Parameters.m_cNumThreads.ToString();
            textBoxEstimateofCurrentMSE.Text = m_Parameters.m_EstimatedCurrentMSE.ToString();
            textBoxILearningRateEta.Text = m_Parameters.m_InitialEta.ToString();
            textBoxLearningRateDecayRate.Text = m_Parameters.m_EtaDecay.ToString();
            textBoxMinimumLearningRate.Text = m_Parameters.m_MinimumEta.ToString();
            textBoxStartingPatternNumber.Text = m_Parameters.m_StartingPattern.ToString();
            checkBoxDistortPatterns.Checked = m_Parameters.m_bDistortPatterns;
        }
        public BackPropagationParameters GetBackProParameters()
        {
            return m_Parameters;
        }
        public BackPropagationParametersForm()
        {
            InitializeComponent();
            m_Parameters.m_AfterEvery = 0;
            m_Parameters.m_bDistortPatterns = true;
            m_Parameters.m_cNumThreads = 0;
            m_Parameters.m_EstimatedCurrentMSE = 0;
            m_Parameters.m_EtaDecay = 0;
            m_Parameters.m_InitialEta = 0;
            m_Parameters.m_MinimumEta = 0;
            m_Parameters.m_StartingPattern = 0;
            m_Parameters.m_strInitialEtaMessage = "";
            m_Parameters.m_strStartingPatternNum = "";
        }
     

        private void button1_Click(object sender, EventArgs e)
        {
            m_Parameters.m_AfterEvery = Convert.ToUInt32(textBoxAfterEveryNBackPropagations.Text);
            m_Parameters.m_cNumThreads = Convert.ToUInt32(textBoxBackThreads.Text);
            m_Parameters.m_EstimatedCurrentMSE = Convert.ToDouble(textBoxEstimateofCurrentMSE.Text);
            m_Parameters.m_InitialEta = Convert.ToDouble(textBoxILearningRateEta.Text);
            m_Parameters.m_EtaDecay = Convert.ToDouble(textBoxLearningRateDecayRate.Text);
            m_Parameters.m_MinimumEta = Convert.ToDouble(textBoxMinimumLearningRate.Text);
            m_Parameters.m_StartingPattern = Convert.ToUInt32(textBoxStartingPatternNumber.Text);
            m_Parameters.m_bDistortPatterns = checkBoxDistortPatterns.Checked;
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

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.

License

This article, along with any associated source code and files, is licensed under The MIT License

Share

About the Author

Vietdungiitb
Vietnam Maritime University
Vietnam Vietnam
No Biography provided

| Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 14 Mar 2012
Article Copyright 2011 by Vietdungiitb
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid