Ejemplo n.º 1
0
        private void btnChar_Click(object sender, EventArgs e)
        {
            Button cbx = sender as Button;

            OCRChar obj = new OCRChar(cbx.Text.ToCharArray()[0]);

            byte[] drawVet = obj.toDraw();
            this.SetCheckboxes(drawVet);
        }
Ejemplo n.º 2
0
        private void TesteComposto()
        {
            this.txtResult.Text += Environment.NewLine + Environment.NewLine + Environment.NewLine;

            this.txtResult.Text += "Test: " + Environment.NewLine;

            char[] letras = OCRChar.CharMap;
            for (int i = 0; i < OCRChar.CharMap.Length; i++)
            {
                OCRChar  oc      = new OCRChar(OCRChar.CharMap[i]);
                double[] retorno = this._MLP.Apply(oc.toDrawDoubleMap());

                this.txtResult.Text += "Letter: " + oc.toChar() + Environment.NewLine;
                this.txtResult.Text += "Output values:" + Environment.NewLine + String.Join(Environment.NewLine, retorno);
                this.txtResult.Text += Environment.NewLine + Environment.NewLine;
            }
        }
Ejemplo n.º 3
0
        private void btnTest_Click(object sender, EventArgs e)
        {
            this.txtResult.Text = "";

            double[] applyin = this.GetCheckboxes();

            double[] returnData;

            returnData = this._MLP.NormalizedApply(applyin);

            OCRChar oc = new OCRChar(returnData);

            this.txtResult.Text += "Corresponding letter: " + oc.toChar();
            this.txtResult.Text += Environment.NewLine + Environment.NewLine;

            this.txtResult.Text += "Output vector:" + Environment.NewLine + "[" + String.Join(", ", returnData) + "]";
            this.txtResult.Text += Environment.NewLine + Environment.NewLine;

            returnData           = this._MLP.Apply(applyin);
            this.txtResult.Text += "Output values:" + Environment.NewLine + String.Join(Environment.NewLine, returnData);

            this.TesteComposto();
        }