public void database_add_new_activation(Image <Bgr, byte> frame)
        {
            string[] lines       = File.ReadAllLines(activations_path + "DatabaseFile.txt");
            int      next_img_ix = lines.Length + 1;

            File.AppendAllLines(activations_path + "DatabaseFile.txt", IEnumerableExt.FromSingleItem(DateTime.Now.ToString(CultureInfo.GetCultureInfo("en-us"))));
            frame.Save(activations_path + "Activation" + next_img_ix.ToString("D3") + ".png");
        }
        public void database_add_new_person(string name, Image <Bgr, byte> frame, Image <Gray, byte> face)
        {
            // update systemData
            Debug.WriteLine($"adding {name} to outgoingData peopleNames");
            this.commHelper.outgoingData.people = this.systemData.kinectData.people;
            this.commHelper.outgoingData.people.Add(name, label_to_int[name]);

            // add name to database file, create a new directory for this person, main image = frame, face = new facialrectraining image
            File.AppendAllLines(people_path + "DatabaseFile.txt", IEnumerableExt.FromSingleItem(name));
            // save image
            Directory.CreateDirectory(pathToPeopleFolder + name);
            File.WriteAllText(pathToPeopleFolder + name + "/Info.txt", DateTime.Now.ToString(CultureInfo.GetCultureInfo("en-us")));
            frame.Save(pathToPeopleFolder + name + "/MainImage.png");
            face.Convert <Bgr, byte>().Save(pathToPeopleFolder + name + "/FacialRecTraining01.png");
            Debug.WriteLine("saved png!");
        }
 public void update_single(Image <Gray, byte> face, int label)
 {
     face_recognizer.Update(IEnumerableExt.FromSingleItem(face).ToArray(), IEnumerableExt.FromSingleItem(label).ToArray());
 }