Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 1; i < trainingImages.ToArray().Length + 1; i++)
- {
- trainingImages.ToArray()[i - 1].Save(Application.StartupPath + "/TrainedFaces/eladena/face" + i + ".bmp");
- File.AppendAllText(Application.StartupPath + "/TrainedFaces/TrainedLabels.txt", labels.ToArray()[i - 1] + "%");
- }
- MessageBox.Show(textBox1.Text + "´s face detected and added :)", "Training OK", MessageBoxButtons.OK, MessageBoxIcon.Information);
- string[] filePaths = Directory.GetFiles(Application.StartupPath + "/TrainedFaces/", "*.bmp");
- foreach (string filePath in filePaths)
- {
- if (filePath.Contains(".bmp"))
- File.Delete(filePath);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement