Example #1
0
 public NeighborForm()
 {
     InitializeComponent();
     ObjectSerializer<Neighbor> objSerializer = new ObjectSerializer<Neighbor>();
     Neighbor yourObjectFromFile = objSerializer.GetSerializedObject("Neighbor.bin");
     if (yourObjectFromFile != null)
     {
         neighbor = yourObjectFromFile;
     }
     else
     {
         MessageBox.Show("Not reasy");
     }
 }
Example #2
0
 private void button3_Click(object sender, EventArgs e)
 {
     if (numberImageCollection != null)
     {
         NeighbLable.Text = "";
         Neighbor neir = new Neighbor();
         ObjectSerializer<Neighbor> objSerializer = new ObjectSerializer<Neighbor>();
         Neighbor yourObjectFromFile = objSerializer.GetSerializedObject("Neighbor.bin");
         if (yourObjectFromFile != null)
         {
             neir = yourObjectFromFile;
         }
         else
         {
             MessageBox.Show("Neighbor not trained");
         }
         foreach (var item in numberImageCollection)
         {
             NeighbLable.Text = NeighbLable.Text + neir.NameClass(item.bitmap);
         }
     }
     else
     {
         MessageBox.Show("Collection image empty");
     }
 }
Example #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     neighbor = new Neighbor(bitList);
     ObjectSerializer<Neighbor> objSerializer = new ObjectSerializer<Neighbor>();
     objSerializer.SaveSerializedObject(neighbor, "Neighbor.bin");
 }