Click here to Skip to main content
15,891,908 members
Articles / Artificial Intelligence / Neural Networks

Multiple convolution neural networks approach for online handwriting recognition

Rate me:
Please Sign up or sign in to vote.
4.95/5 (37 votes)
9 Apr 2013CPOL8 min read 76.6K   25.1K   74  
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.
using System;
using System.Collections.Generic;
using System.Linq;
using UPImage;
using System.Drawing;
using UPImage.FileFormat;
namespace UPImage.Data
{
    public class UPFile : IDisposable
    {
        private String safeName;
        private String fullpath;
        UPFolder parent;
        UPDataSet dataset;
        bool isDataEmply;
        public UPDataSet Dataset
        {
            get
            {
                return dataset;
            }
           
        }
        public bool IsDataEmply
        {
            get
            {
                isDataEmply = !CheckDataSet(fullpath);
                return isDataEmply;
            }
            
        }
        public String SafeFileName
        {
            get
            {
                return safeName;
            }
           
        }
        public String FullPath
        {
            get
            {
                return fullpath;
            }
            set 
            {
                if (fullpath == value)
                {
                    return;
                }
                else
                {
                    fullpath = value;
                    isDataEmply = !CheckDataSet(fullpath);
                }
            }
           
        }
        public UPFolder Parent
        {
            get
            {
                return parent;
            }
          
        }
        public UPFile(String filename,UPFolder parentNode)
        {
            parent = parentNode;
            safeName = filename;
            fullpath = String.Format("{0}\\{1}",parentNode.FullName,filename);
            dataset = new UPDataSet();
            
        }
        public bool FillupDataSet()
        {
            //check if it is UNIPEN data file
            bool result = false;
            String path = fullpath;
            if( dataset.FillDataSetFromFile(path))
            {
                if (dataset.Datalayouts.Count > 0)
                {
                    foreach (var dl in dataset.Datalayouts)
                    {
                        // if file contains unipen stream return true
                        if (dl.UpUnipens.Count > 0)
                        {
                            result = true;
                            break;
                        }
                    }
                }
            }
            return result;
        }
        private bool CheckDataSet(String path)
        {
            //check if it is UNIPEN data file
            bool result = false;
            UPImage.FileFormat.UPDataSet ds = new UPDataSet();
            if (ds.FillDataSetFromFile(path))
            {
                if (ds.Datalayouts.Count > 0)
                {
                    foreach (var dl in ds.Datalayouts)
                    {
                        // if file contains unipen stream return true
                        if (dl.UpUnipens.Count > 0)
                        {
                            result = true;
                            break;
                        }
                    }
                }
            }
            ds = null;
            return result;
        }
        protected virtual void Dispose(bool disposing)
        {
            if (disposing)
            {
                // dispose managed resources

            }
            // free native resources
        }
        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }
    }
}

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)


Written By
Vietnam Maritime University
Vietnam Vietnam
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions