示例#1
0
 private void ClearAll()
 {
     NeiroGraphUtils.ClearImage(pictureBox1);
     NeiroGraphUtils.ClearImage(pictureBox2);
     NeiroGraphUtils.ClearImage(pictureBox3);
     label2.Text = "Введіть коррекний символ";
 }
示例#2
0
 private void PictureBox1_Leave(object sender, EventArgs e)
 {
     if (radioButton1.Checked == true)
     {
         int[,] clipArr = NeiroGraphUtils.CutImageToArray((Bitmap)pictureBox1.Image, new Point(pictureBox1.Width, pictureBox1.Height));
         if (clipArr == null)
         {
             return;
         }
         arr = NeiroGraphUtils.LeadArray(clipArr, new int[NeiroWeb.neironInArrayWidth, NeiroWeb.neironInArrayHeight]);
         pictureBox2.Image = new Bitmap(NeiroGraphUtils.GetBitmapFromArr(clipArr), new Size(pictureBox2.Width, pictureBox2.Height));;
         pictureBox3.Image = new Bitmap(NeiroGraphUtils.GetBitmapFromArr(arr), new Size(pictureBox3.Width, pictureBox3.Height));
         string s = neiro.CheckLetter(arr);
         NeiroGraphUtils.ClearImage(pictureBox1);
         textBox1.Text += s;
     }
 }
示例#3
0
 private void Learn()
 {
     int[,] clipArr = NeiroGraphUtils.CutImageToArray((Bitmap)pictureBox1.Image, new Point(pictureBox1.Width, pictureBox1.Height));
     if (clipArr == null)
     {
         return;
     }
     arr = NeiroGraphUtils.LeadArray(clipArr, new int[NeiroWeb.neironInArrayWidth, NeiroWeb.neironInArrayHeight]);
     pictureBox2.Image = new Bitmap(NeiroGraphUtils.GetBitmapFromArr(clipArr), new Size(pictureBox2.Width, pictureBox2.Height));;
     pictureBox3.Image = new Bitmap(NeiroGraphUtils.GetBitmapFromArr(arr), new Size(pictureBox3.Width, pictureBox3.Height));
     if (textBox2.Text == " " || textBox2.Text == "Введіть ваш символ...")
     {
         label2.Text    = "Введіть коррекний символ";
         label2.Visible = true;
         return;
     }
     else
     {
         label2.Text    = "Символ " + "'" + textBox2.Text + "'" + " збережено!";
         label2.Visible = true;
         neiro.SetTraining(textBox2.Text, arr);
         NeiroGraphUtils.ClearImage(pictureBox1);
     }
 }
示例#4
0
 private void Form1_Load(object sender, EventArgs e)
 {
     NeiroGraphUtils.ClearImage(pictureBox1);
     neiro         = new NeiroWeb();
     textBox1.Text = "";
 }