public void openIMage() { Show_Image SI = new Show_Image(); SI.ShowDialog(); loadimage KM = new loadimage(SI.loodim); Process currentProcess1 = System.Diagnostics.Process.GetCurrentProcess(); long totalBytesOfMemoryUsed2 = currentProcess1.WorkingSet64; Benchmark.Start(); double[] res = this.S_V_M.testing(KM); string output_to_Messagebox = "the output is "; string[] f = this.RI.classes.ToArray(); Voting(KM.LM, res, null, KM.classes); double maxf = res.Max(); //int indexk = 0; //for (int d = 0; d < res.Length; d++) //{ // if (res[d] >= maxf) // indexk = d; //} //output_to_Messagebox = f[indexk]; for (int d = 0; d < res.Length; d++) { if (res[d] > 3) { output_to_Messagebox += " " + f[d]; } } Process currentProcess = System.Diagnostics.Process.GetCurrentProcess(); long totalBytesOfMemoryUsed = currentProcess.WorkingSet64; Benchmark.End(); this.testingtime.Text = "The Testing Time : " + Benchmark.GetSeconds().ToString(); this.overall_accuracy_control.Text = this.overall_accuracy.ToString(); label2.Text = "Testing Memory is " + Math.Abs(totalBytesOfMemoryUsed - totalBytesOfMemoryUsed2) + " Bytes"; MessageBox.Show(output_to_Messagebox); Showdrawing SD = new Showdrawing(); SD.IM.Image = pic_after_drow; SD.Show(); }
public void openimage() { Show_Image SI = new Show_Image(); SI.ShowDialog(); loadimage KM = new loadimage(SI.loodim); Process currentProcess1 = System.Diagnostics.Process.GetCurrentProcess(); long totalBytesOfMemoryUsed2 = currentProcess1.WorkingSet64; Benchmark.Start(); double[] res = this.ML.MLPTesting(KM); string output_to_Messagebox = "the output is "; string[] f = this.ReadIm.classes.ToArray(); Voting(KM.LM, res, null, KM.classes); for (int d = 0; d < res.Length; d++) { if (res[d] > 30) { output_to_Messagebox += " " + f[d]; } } Benchmark.End(); Process currentProcess = System.Diagnostics.Process.GetCurrentProcess(); long totalBytesOfMemoryUsed = currentProcess.WorkingSet64; Label2.Text = "The Testing Memory is " + Math.Abs(totalBytesOfMemoryUsed - totalBytesOfMemoryUsed2) + " Bytes"; this.testingtime.Text = "The Testing Time : " + Benchmark.GetSeconds().ToString(); MessageBox.Show(output_to_Messagebox); Showdrawing SD = new Showdrawing(); SD.IM.Image = pic_after_drow; SD.Show(); }