SHARE
TWEET

Untitled

a guest Feb 23rd, 2019 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. for (int i = 1; i < trainingImages.ToArray().Length + 1; i++)
  2. {
  3.     trainingImages.ToArray()[i - 1].Save(Application.StartupPath + "/TrainedFaces/eladena/face" + i + ".bmp");
  4.     File.AppendAllText(Application.StartupPath + "/TrainedFaces/TrainedLabels.txt", labels.ToArray()[i - 1] + "%");
  5. }
  6. MessageBox.Show(textBox1.Text + "´s face detected and added :)", "Training OK", MessageBoxButtons.OK, MessageBoxIcon.Information);
  7.  
  8. string[] filePaths = Directory.GetFiles(Application.StartupPath + "/TrainedFaces/", "*.bmp");
  9. foreach (string filePath in filePaths)
  10. {
  11.     if (filePath.Contains(".bmp"))
  12.         File.Delete(filePath);
  13. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top