private void button2_Click(object sender, EventArgs e)//LEARN { int[,] clip = NeironUtill.cutImage( (Bitmap)pictureBox1.Image, new Point(pictureBox1.Width, pictureBox1.Height)); if (clip == null) { return; } this.arr = NeironUtill.laodArray(clip, new int[NeironNet.neironWidth, NeironNet.neironHeight]); string litera = net.checkLitera(arr); if (litera != null) { pictureBox2.Image = NeironUtill.getBitmap(clip); pictureBox3.Image = NeironUtill.getMemory(net.getByName(litera)); } else { litera = "null"; } DialogResult askResult = MessageBox.Show("Result = " + litera + "?", "", MessageBoxButtons.YesNo); if (askResult != DialogResult.Yes || !enableTrain) { return; } net.setTrain(litera, arr); }
private void button4_Click(object sender, EventArgs e)//DRAW { NeironUtill.clearImage(pictureBox1); NeironUtill.clearImage(pictureBox2); NeironUtill.clearImage(pictureBox3); pictureBox1.Image = NeironUtill.drawLitera(pictureBox1.Image, (String)comboBox1.SelectedItem); }
private void Form1_Load(object sender, EventArgs e) { NeironUtill.clearImage(pictureBox1); this.net = new NeironNet(); String[] items = net.getLitaras(); if (items.Length > 0) { comboBox1.Items.AddRange(items); } }
private void button1_Click(object sender, EventArgs e)//CLEAR { NeironUtill.clearImage(pictureBox1); NeironUtill.clearImage(pictureBox2); NeironUtill.clearImage(pictureBox3); }