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

Multiple convolution neural networks approach for online handwriting recognition

, 9 Apr 2013 CPOL
The research focuses on the presentation of word recognition technique for an online handwriting recognition system which uses multiple component neural networks (MCNN) as the exchangeable parts of the classifier.
capital_letter_v2.zip
capital letter v2.nnt
digit_v2.zip
digit v2.nnt
lower_case_letter_v2.zip
lower case letter v2.nnt
UNIPENviewer_source_code-noexe.zip
UNIPENviewer
DocToolkit
DocToolkit.csproj.user
DocToolkit.snk
obj
Debug
Release
DrawTools
about.bmp
App.ico
bin
Debug
Release
DrawTools.csproj.user
ellipse.bmp
Ellipse.cur
line.bmp
Line.cur
new.bmp
obj
Debug
DrawTools.DrawArea.resources
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
Release
DrawTools.DrawArea.resources
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
open.bmp
pencil.bmp
Pencil.cur
pointer.bmp
PolyHandle.cur
rectangle.bmp
Rectangle.cur
save.bmp
NNControl
bin
Debug
Common
NNTesting
NNTraining
obj
Debug
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
NNControl.Common.UPTemplateControl.resources
NNControl.FlashForm.resources
NNControl.NNTesting.NNTestingControl.resources
NNControl.NNTesting.TextSpellControl.resources
NNControl.NNTraining.ConvolutionForm.resources
NNControl.NNTraining.CreateNetworkForm.resources
NNControl.NNTraining.FullConnectedForm.resources
NNControl.NNTraining.InputLayerForm.resources
NNControl.NNTraining.OutputLayerForm.resources
NNControl.NNTraining.UP_NNTrainingControl.resources
NNControl.Properties.Resources.resources
NNControl.TrainingParametersForm.resources
NNControl.UPViewer.UpImageViewer.resources
UPControl.Common.BaseControl.resources
UPControl.Common.UPTemplateControl.resources
UPControl.FlashForm.resources
UPControl.NNTraining.UP_NNTrainingControl.resources
UPControl.TrainingParametersForm.resources
UPControl.UPViewer.UpImageViewer.resources
UP_NeuralTraining.FlashForm.resources
UP_NeuralTraining.TrainingParametersForm.resources
UP_NeuralTraining.UP_NNTrainingControl.resources
Release
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
NNControl.Common.UPTemplateControl.resources
NNControl.FlashForm.resources
NNControl.NNTesting.NNTestingControl.resources
NNControl.NNTraining.ConvolutionForm.resources
NNControl.NNTraining.CreateNetworkForm.resources
NNControl.NNTraining.FullConnectedForm.resources
NNControl.NNTraining.InputLayerForm.resources
NNControl.NNTraining.OutputLayerForm.resources
NNControl.NNTraining.UP_NNTrainingControl.resources
NNControl.Properties.Resources.resources
NNControl.TrainingParametersForm.resources
NNControl.UPViewer.UpImageViewer.resources
Properties
Resources
btnBack.png
btnDrag.png
btnFitToScreen.png
btnNext.png
btnOpen.png
btnPreview.png
btnRotate270.png
btnRotate90.png
btnSelect.png
btnZoomIn.png
btnZoomOut.png
circle.png
clear.png
color_line.png
cry.png
document-new.png
Drag.cur
draw_line.png
ellipse.png
export.png
file.png
fingerprint-recognition.png
folder-open.png
folder.png
folders_explorer.png
Grab.cur
home.png
label-link.png
pointer.png
rectangle.png
save_accept.png
script_(stop).gif
smile.png
stock_draw-line.png
Stop sign.png
Upload.png
user-group-new.png
UPViewer
Perceptron
ActivationFunction
ArchiveSerialization
bin
Debug
Common
Connections
Layers
Network
Neurons
obj
Debug
ANN.Perceptron.Common.BaseControl.resources
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
Neurons.BaseControl.resources
Release
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
Neurons.BaseControl.resources
Properties
Weights
SpellChecker
bin
Debug
Controls
Dictionary
Affix
Dictionary.bmp
Phonetic
doc
NetSpell.ndoc
Forms
Interactive.bmp
obj
Debug
ResGen.read.1.tlog
ResGen.write.1.tlog
SpellChecker.Dictionary.WordDictionary.resources
SpellChecker.Forms.OptionForm.resources
SpellChecker.MultipleSpelling.resources
SpellChecker.NewSpelling.resources
Spell.snk
Spelling.bmp
UNIPENviewer.suo
UNIPENviewer.v11.suo
UNIPENviewer
bin
Debug
Config
de-DE.dic
en-US.dic
fr-FR.dic
it-IT.dic
UNIPENviewer.vshost.exe.manifest
Release
Config
obj
Debug
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
UNIPENviewer.MainForm.resources
UNIPENviewer.Properties.Resources.resources
Release
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
UNIPENviewer.MainForm.resources
UNIPENviewer.Properties.Resources.resources
x86
Debug
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
UNIPENviewer.Form1.resources
UNIPENviewer.Properties.Resources.resources
Properties
Settings.settings
UPImage
Common
Data
FileFormat
obj
Debug
Release
Properties
UNIPENviewer_source_code.zip
bin
Debug
DocToolkit.dll
Release
DocToolkit.dll
DocToolkit.csproj.user
DocToolkit.snk
DocToolkit.dll
DocToolkit.dll
about.bmp
App.ico
DocToolkit.dll
DrawTools.dll
DocToolkit.dll
DrawTools.dll
DrawTools.csproj.user
ellipse.bmp
Ellipse.cur
line.bmp
Line.cur
new.bmp
DrawTools.dll
DrawTools.DrawArea.resources
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
DrawTools.dll
DrawTools.DrawArea.resources
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
open.bmp
pencil.bmp
Pencil.cur
pointer.bmp
PolyHandle.cur
rectangle.bmp
Rectangle.cur
save.bmp
DocToolkit.dll
DrawTools-LinhLam.dll
DrawTools.dll
NNControl-LinhLam.dll
NNControl.dll
Perceptron.dll
SpellChecker.dll
UP-NeuralTraining.dll
UPImage-LinhLam.dll
UpImage.dll
Release
DocToolkit.dll
DrawTools.dll
Neurons.dll
NNControl.dll
UPImage.dll
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
NNControl-LinhLam.dll
NNControl.Common.UPTemplateControl.resources
NNControl.dll
NNControl.FlashForm.resources
NNControl.NNTesting.NNTestingControl.resources
NNControl.NNTesting.TextSpellControl.resources
NNControl.NNTraining.ConvolutionForm.resources
NNControl.NNTraining.CreateNetworkForm.resources
NNControl.NNTraining.FullConnectedForm.resources
NNControl.NNTraining.InputLayerForm.resources
NNControl.NNTraining.OutputLayerForm.resources
NNControl.NNTraining.UP_NNTrainingControl.resources
NNControl.Properties.Resources.resources
NNControl.TrainingParametersForm.resources
NNControl.UPViewer.UpImageViewer.resources
TempPE
Properties.Resources.Designer.cs.dll
UP-NeuralTraining.dll
UPControl.Common.BaseControl.resources
UPControl.Common.UPTemplateControl.resources
UPControl.FlashForm.resources
UPControl.NNTraining.UP_NNTrainingControl.resources
UPControl.TrainingParametersForm.resources
UPControl.UPViewer.UpImageViewer.resources
UP_NeuralTraining.FlashForm.resources
UP_NeuralTraining.TrainingParametersForm.resources
UP_NeuralTraining.UP_NNTrainingControl.resources
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
NNControl.Common.UPTemplateControl.resources
NNControl.dll
NNControl.FlashForm.resources
NNControl.NNTesting.NNTestingControl.resources
NNControl.NNTraining.ConvolutionForm.resources
NNControl.NNTraining.CreateNetworkForm.resources
NNControl.NNTraining.FullConnectedForm.resources
NNControl.NNTraining.InputLayerForm.resources
NNControl.NNTraining.OutputLayerForm.resources
NNControl.NNTraining.UP_NNTrainingControl.resources
NNControl.Properties.Resources.resources
NNControl.TrainingParametersForm.resources
NNControl.UPViewer.UpImageViewer.resources
TempPE
Properties.Resources.Designer.cs.dll
btnBack.png
btnDrag.png
btnFitToScreen.png
btnNext.png
btnOpen.png
btnPreview.png
btnRotate270.png
btnRotate90.png
btnSelect.png
btnZoomIn.png
btnZoomOut.png
circle.png
clear.png
color_line.png
cry.png
document-new.png
Drag.cur
draw_line.png
ellipse.png
export.png
file.png
fingerprint-recognition.png
folder-open.png
folder.png
folders_explorer.png
Grab.cur
home.png
label-link.png
pointer.png
rectangle.png
save_accept.png
script_(stop).gif
smile.png
stock_draw-line.png
Stop sign.png
Upload.png
user-group-new.png
AForgeLibrary.dll
NeuralNetworkLibrary.dll
Perceptron.dll
SpellChecker.dll
UpImage.dll
Release
NeuralNetworkLibrary.dll
Neurons.dll
UPImage.dll
ANN.Perceptron.Common.BaseControl.resources
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
NeuralNetworkLibrary.dll
Neurons.BaseControl.resources
Perceptron.dll
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
NeuralNetworkLibrary.dll
Neurons.BaseControl.resources
Neurons.dll
SpellChecker.dll
Dictionary.bmp
NetSpell.ndoc
Interactive.bmp
NetSpell.SpellChecker.dll
ResGen.read.1.tlog
ResGen.write.1.tlog
SpellChecker.Dictionary.WordDictionary.resources
SpellChecker.dll
SpellChecker.Forms.OptionForm.resources
SpellChecker.MultipleSpelling.resources
SpellChecker.NewSpelling.resources
Spell.snk
Spelling.bmp
UNIPENviewer.suo
UNIPENviewer.v11.suo
de-DE.dic
DocToolkit.dll
DrawTools-LinhLam.dll
DrawTools.dll
en-US.dic
fr-FR.dic
it-IT.dic
NNControl-LinhLam.dll
NNControl.dll
Perceptron.dll
SpellChecker.dll
UNIPENviewer-LinhLam.exe
UNIPENviewer.exe
UNIPENviewer.vshost.exe
UNIPENviewer.vshost.exe.manifest
UPImage-LinhLam.dll
UpImage.dll
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
TempPE
Properties.Resources.Designer.cs.dll
UNIPENviewer-LinhLam.exe
UNIPENviewer.exe
UNIPENviewer.MainForm.resources
UNIPENviewer.Properties.Resources.resources
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
UNIPENviewer.exe
UNIPENviewer.MainForm.resources
UNIPENviewer.Properties.Resources.resources
GenerateResource.read.1.tlog
GenerateResource.write.1.tlog
UNIPENviewer.exe
UNIPENviewer.Form1.resources
UNIPENviewer.Properties.Resources.resources
Settings.settings
bin
Debug
AForgeLibrary.dll
UPDatabase.dll
UpImage-LinhLam.dll
UpImage.dll
UPUnipenLib.dll
Release
UPImage.dll
UPDatabase.dll
UpImage-LinhLam.dll
UpImage.dll
UPUnipenLib.dll
UPImage.dll
Word_samples.zip
Word samples
beach.dtl
Bengal.dtl
best.dtl
Brower.dtl
Buy.dtl
Byte byte.dtl
Change.dtl
Color.dtl
Company.dtl
Complet.dtl
copy.dtl
cup.dtl
draw tool.dtl
Eastern.dtl
Eat.dtl
eldest.dtl
Emergency.dtl
English.dtl
File.dtl
Finist.dtl
found nothing.dtl
France.dtl
Future.dtl
help me now.dtl
Hey hello.dtl
Hobby.dtl
How are you.dtl
Huck.dtl
icon.dtl
inker.dtl
Internet.dtl
Link.dtl
load.dtl
Local.dtl
Lonely.dtl
loosen.dtl
love you.dtl
Madden.dtl
Main gate.dtl
Mercy.dtl
Module.dtl
monday.dtl
Moon.dtl
mouse.dtl
my turn.dtl
net spell.dtl
network.dtl
never.dtl
newest.dtl
noted.dtl
Novel.dtl
oldest.dtl
Option.dtl
Pencil.dtl
petro.dtl
Pink.dtl
quick and slow.dtl
Rock.dtl
save.dtl
Sell.dtl
slam.dtl
smart phone.dtl
Strong.dtl
Strongest.dtl
success.dtl
Summer.dtl
Take.dtl
Text.dtl
Took.dtl
Train.dtl
Tuesday.dtl
Valence.dtl
Victory.dtl
viewer.dtl
vintage.dtl
Volume.dtl
water.dtl
Weak.dtl
Window.dtl
Windy.dtl
word expert.dtl
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace UPImage.Common
{
    public static class UpCommonLib
    {
        public const bool cTrue = true;
        public const bool cFalse = false;

        /* match                                                                 */
        /* environment variable to search for unipen.def and include files */

        public const String cUnipenDefinition   =     "UNIPEN_DEFINITION_FILE";
        public const String cUnipenIncludePath  =     "UNIPEN_INCLUDE_PATH";
        public const String cIncludeInheritanceKey =  ".INHERIT";

        /*************************************************************************/
        /*                                                                       */
        /* error                                                                 */
        /*                                                                       */
        /*************************************************************************/

        public const String errOutOfMemory     =      "Out of memory";

        public const String errInvalidKeyword      =  "in [{1}]: request for keyword \"{2}\" unsucessful (not found)\n";
        public const String errMultipleCoords   =     "in [{1}]: Multiple coordinates ({2})\n";
        public const String errMultipleHierarchies =   "in [{1}]: Multiple hierarchies ({2})\n";
        public const String errMultipleSets       =   "in [{1}]: Multiple sets ({2})\n";
        public const String errNoCoord             =  "in [{1}]: No coordinates ({2})\n";
        public const String errNoHierarchy          = "in [{1}]: No hierarchy ({2})\n";

        /* .SEGMENT quality NOTE NOTE NOTE: some extra quality indications are
           added for the NICI .SEGMENT CHAR entries */

        public const String qUnknown = "?";
        public const String qBad  =    "BAD";
        public const String qOk    =   "OK";
        public const String qGood   =  "GOOD";
        public const int Q_UNKNOWN = 0;
        public const int Q_BAD  =   1;
        public const int Q_OK  =    2;
        public const int Q_GOOD =   3;

        /* the NICI qualifications */

        public const String qLbl  =   "LBL";
        public const String qLbr   =   "LBR";
        public const String qLbg    =  "LBG";
        public const String qLbs   =   "LBS";
        public const int Q_LBL   =  Q_OK;
        public const int Q_LBR   =  Q_BAD;
        public const int Q_LBS   =  4;

        /* sub string                                                            */
        public const String cScheiders         =      "\t\n\r ";
        /* unipen                                                                */
        public const String cDefFile       =         "unipen.def";
        public const String keyComment     =         ".COMMENT";
        public const String keyCoord       =         ".COORD";
        public const String keyHierarchy   =         ".HIERARCHY";
        public const String keyInclude     =         ".INCLUDE";
        public const String keyKeyword     =         ".KEYWORD";
        public const String keyPenDown     =         ".PEN_DOWN";
        public const String keyPenLapse    =         ".DT";
        public const String keyPenUp       =         ".PEN_UP";
        public const String keyReserve     =         ".RESERVE";
        public const String keySegment     =         ".SEGMENT";
        public const String keySampleRate  =         ".POINTS_PER_SECOND";
        public const String keySet         =        ".START_SET";
        public const String keyX_Dim       =        ".X_DIM";
        public const String keyY_Dim       =        ".Y_DIM";
        public const int cPenAdded         =      -1;
        /// <summary>
        /// //
        /// </summary>
        public static List <String> keyworkNames = new List<String>(61) { { ".COMMENT" }, { ".KEYWORD" }, 
        { ".INCLUDE" }, { ".VERSION" }, { ".DATA_SOURCE" }, { ".DATA_ID" }, { ".COORD" }, { ".HIERARCHY" },
        { ".DATA_CONTACT" }, { ".DATA_INFO" }, { ".SETUP" }, { ".PAD" }, { ".ALPHABET" }, { ".ALPHABET_FREQ" }, 
        { ".LEXICON_SOURCE" }, { ".LEXICON_ID" }, { ".LEXICON_CONTACT" }, { ".LEXICON_INFO" }, { ".LEXICON" }, 
        { ".LEXICON_FREQ" }, { ".X_DIM" }, { ".Y_DIM" }, { ".H_LINE" }, { ".V_LINE" }, { ".X_POINTS_PER_INCH" }, 
        { ".Y_POINTS_PER_INCH" }, { ".Z_POINTS_PER_INCH" }, { ".X_POINTS_PER_MM" }, { ".Y_POINTS_PER_MM" }, { ".Z_POINTS_PER_MM" }, 
        { ".POINTS_PER_GRAM" }, { ".POINTS_PER_SECOND" }, { ".PEN_DOWN" }, { ".PEN_UP" }, { ".DT" }, { ".DATE" }, { ".STYLE" },
        { ".WRITER" }, { ".COUNTRY" }, { ".HAND" }, { ".AGE" }, { ".SEX" }, { ".SKILL" }, { ".WRITER_INFO" }, { ".WRITER_ID" },{ ".RESERVE" },
        { ".SEGMENT" }, { ".START_SET" }, { ".START_BOX" }, { ".REC_SOURCE" }, { ".REC_ID" }, { ".REC_CONTACT" }, { ".REC_INFO" },
        { ".IMPLEMENT" }, { ".TRAINING_SET" }, { ".TEST_SET" }, { ".ADAPT_SET" }, { ".LEXICON_SET" }, { ".REC_TIME" }, { ".REC_LABELS" }, { ".REC_SCORES" } };

        //Add all of the characters you wish to ignore in the method you choose

        //Use a function here to get a return

        public static bool SubStringSearch(List<string> ignoredStrings, string orginalString, string toMatch)
        {
            //Copy Your string to a temp

            string tempString = orginalString;
            bool match = false;

            //Replace Everything that you don't want
            if (ignoredStrings != null)
            {
                foreach (string item in ignoredStrings)
                {
                    tempString = tempString.Replace(item, "");
                }
            }
            //Check if your substring exist
            if (tempString.Contains(toMatch))
            {
                match = true;
            }
            return match;
        }
        public static bool SubStringSearch(List<string> ignoredStrings, string replacedString, string orginalString, string toMatch)
        {
            //Copy Your string to a temp

            string tempString = orginalString;
            bool match = false;

            //Replace Everything that you don't want
            if (ignoredStrings != null)
            {
                foreach (string item in ignoredStrings)
                {
                    tempString = tempString.Replace(item, replacedString);
                }
            }
            //Check if your substring exist
            if (tempString.Contains(toMatch))
            {
                match = true;
            }
            return match;
        }
        public static bool SubStringSearch(List<string> ignoredStrings, List<string> replacedStrings, string orginalString, string toMatch)
        {
            if (ignoredStrings.Count != replacedStrings.Count)
            {
                return false;
            }
            //Copy Your string to a temp
            string tempString = orginalString;
            bool match = false;

            //Replace Everything that you don't want
            if (ignoredStrings != null)
            {
                foreach (string item in ignoredStrings)
                {
                    tempString = tempString.Replace(item, replacedStrings[ignoredStrings.IndexOf(item)]);
                }
            }
            //Check if your substring exist
            if (tempString.Contains(toMatch))
            {
                match = true;
            }
            return match;
        }
        public static bool SubStringSearch(this string s, string value, char[] ignoreChars, out string result)
        {
            if (String.IsNullOrEmpty(value))
                throw new ArgumentException("Search value cannot be null or empty.", "value");

            bool found = false;
            int matches = 0;
            int startIndex = -1;
            int length = 0;

            for (int i = 0; i < s.Length && !found; i++)
            {
                if (startIndex == -1)
                {
                    if (s[i] == value[0])
                    {
                        startIndex = i;
                        ++matches;
                        ++length;
                    }
                }
                else
                {
                    if (s[i] == value[matches])
                    {
                        ++matches;
                        ++length;
                    }
                    else
                        if (ignoreChars != null && ignoreChars.Contains(s[i]))
                        {
                            ++length;
                        }
                        else
                        {
                            startIndex = -1;
                            matches = 0;
                            length = 0;
                        }
                }

                found = (matches == value.Length);
            }

            if (found)
            {
                result = s.Substring(startIndex, length);
            }
            else
            {
                result = null;
            }
            return found;
        }
        public static bool GetWordsFromString(List<string> ignoredStrings, string orginalString, out List<String> sList)
        {
            bool result = false;
            if (String.IsNullOrEmpty(orginalString))
                throw new ArgumentException("Original string cannot be null or empty.", "myString");
            string tempString = orginalString;
            try
            {
                //Replace Everything that you don't want
                if (ignoredStrings != null)
                {
                    foreach (string item in ignoredStrings)
                    {
                        tempString = tempString.Replace(item, "");
                    }
                }
                // if string have Tab character , replace it by " "
                tempString = ReplaceSubString(tempString, "\t", " ");
                String subString = tempString.Trim();
                int index = subString.IndexOf(" ");
                sList = new List<string>();
                while (true)
                {
                    if (index > 0)
                    {
                        String sWord = subString.Substring(0, index);
                        subString = subString.Substring(index + 1).Trim();
                        sList.Add(sWord);
                        index = subString.IndexOf(" ");
                    }
                    else
                    {
                        sList.Add(subString);
                        break;
                    }
                }
                result = true;
            }
            catch (Exception ex)
            {
                result = false;
                throw new ArgumentException( ex.ToString());
            }
            return result;
        }
        public static bool GetWordsFromString(List<string> ignoredStrings, string replacedString, string orginalString, out List<String> sList)
        {
            bool result = false;
            if (String.IsNullOrEmpty(orginalString))
                throw new ArgumentException("Original string cannot be null or empty.", "myString");
            string tempString = orginalString;
            try
            {

                //Replace Everything that you don't want
                if (ignoredStrings != null)
                {
                    foreach (string item in ignoredStrings)
                    {
                        tempString = tempString.Replace(item, replacedString);
                    }
                }
                // if string have Tab character , replace it by " "
                tempString = ReplaceSubString(tempString, "\t", " ");
                String subString = tempString.Trim();
                int index = subString.IndexOf(" ");
                sList = new List<string>();
                while (true)
                {
                    if (index > 0)
                    {
                        String sWord = subString.Substring(0, index);
                        subString = subString.Substring(index + 1).Trim();
                        sList.Add(sWord);
                        index = subString.IndexOf(" ");
                    }
                    else
                    {
                        sList.Add(subString);
                        break;
                    }
                }
                result = true;
            }
            catch (Exception ex)
            {
                result = false;
                throw new ArgumentException(ex.ToString());
            }
            return result;
        }
        public static String ReplaceSubString(String original, String oldString, String newString)
        {
            String tempString = original;
            tempString = tempString.Replace(oldString, newString);
            return tempString;
        }
    }
}

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 Code Project Open License (CPOL)

Share

About the Author

Vietdungiitb
Vietnam Maritime University
Vietnam Vietnam
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.1411028.1 | Last Updated 10 Apr 2013
Article Copyright 2013 by Vietdungiitb
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid