private void averageToolStripMenuItem_Click(object sender, EventArgs e) { ImageFeatureVector fv = screenClassifier.AverageFeature(dataPath + cmbScreenType.Text + @"\"); if (fv != null) { fv.SaveToFile(dataPath + cmbScreenType.Text + ".txt"); Bitmap bmpMask = (Bitmap)Bitmap.FromFile(dataPath + cmbScreenType.Text + @"\mask.png"); fv.ToBitmap(bmpMask).Save(dataPath + "avg.png"); logDebug("avg done"); } else { logDebug("mask not found"); } }
private void createToolStripMenuItem_Click(object sender, EventArgs e) { if (cmbScreenType.Text != "") { SimpleImageClassifier imgClassifier = new SimpleImageClassifier(); ImageFeatureVector fv = imgClassifier.CreateFeatureVector(dataPath + cmbScreenType.Text + @"\"); if (fv == null) { logDebug("fv=null"); } else { logDebug("fv=" + fv.Count); fv.SaveToFile(dataPath + cmbScreenType.Text + ".txt"); logDebug("Save to " + dataPath + cmbScreenType.Text + ".txt"); } } else { logDebug("ScreenType not select"); } }