private void button4_Click(object sender, EventArgs e) { //recognize a picture with smv OpenFileDialog fileDialog = new OpenFileDialog(); fileDialog.Title = "Please select a picture"; fileDialog.Multiselect = false; fileDialog.Filter = "PNG|*.png"; DialogResult dr = fileDialog.ShowDialog(); if (dr == DialogResult.OK) { string fileName = Path.GetFileName(fileDialog.FileName); string parameter = "4 " + fileName; ProcesInitiator.GetProcesInitiator().InitProcess(parameter); var listaPredictii = ReadFile.ReadListaPozeAsociate(); new ImageCategory(listaPredictii[0], listaPredictii).Show(); new ImageSlideShow(listaPredictii[0], listaPredictii).Show(); } }
private void button1_Click(object sender, EventArgs e) { // browse for a picture OpenFileDialog fileDialog = new OpenFileDialog(); fileDialog.Title = "Please select a picture"; fileDialog.Multiselect = false; fileDialog.Filter = "PNG|*.png"; DialogResult dr = fileDialog.ShowDialog(); if (dr == DialogResult.OK) { string fileName = Path.GetFileName(fileDialog.FileName); string path = fileDialog.FileName; textBox1.Text = path; pictureBox1.Image = Image.FromFile(path); string parameter = "5 " + fileName; ProcesInitiator.GetProcesInitiator().InitProcess(parameter); button4.Enabled = true; //activam butonul de recognize label4.Text = string.Empty; } }
private void button3_Click(object sender, EventArgs e) { //read the pictures from db, make the xml format with pictures descriptor and create the file with this descriptors //we need to run the c++ open cv app ProcesInitiator.GetProcesInitiator().InitProcess("1"); }
private void button2_Click(object sender, EventArgs e) { //train svm ProcesInitiator.GetProcesInitiator().InitProcess("2"); }