} /// mst // clusters private void btnGaussSmooth_Click(object sender, EventArgs e) { try { if (txtKC.Text != "0") { int Kclusters = int.Parse(txtKC.Text); Result = ImageOperations.OpenImage(globalpathforimage); GraphOperations.Kcluster(Kclusters, DistinctColors, mst); ImageOperations.DisplayImage(Result, pictureBox2); pictureBox2.Visible = true; } else { MessageBox.Show("Clusers Can't be Zero"); } } catch { MessageBox.Show("Please Select a Photo"); } }
private void button1_Click(object sender, EventArgs e) { try { GraphOperations.GlobalData.setData(); List <RGBPixel> test = new List <RGBPixel>(); DistinctColors = GraphOperations.getD(test); List <GraphOperations.Edgee> testt = new List <GraphOperations.Edgee>(); mst = GraphOperations.GetMST(DistinctColors, testt); long sz = GraphOperations.GlobalData.DC; double sz2 = GraphOperations.GlobalData.mstcost; textBox1.Text = sz.ToString(); textBox2.Text = sz2.ToString(); } catch { MessageBox.Show("Please Select a Photo"); } } /// mst