Ejemplo n.º 1
0
        public async Task <List <NameBox> > GetNameBoxes()
        {
            var tuples = await this.RecogniseFaces();

            List <NameBox> res = new List <NameBox>();

            foreach (var tuple in tuples)
            {
                Face    face    = tuple.Item1;
                string  name    = tuple.Item2;
                NameBox nameBox = new NameBox();
                nameBox.Width               = face.FaceRectangle.Width;
                nameBox.Height              = face.FaceRectangle.Height;
                nameBox.VerticalAlignment   = VerticalAlignment.Top;
                nameBox.HorizontalAlignment = HorizontalAlignment.Left;
                nameBox.Margin              = new Thickness(face.FaceRectangle.Left, face.FaceRectangle.Top, 0, 0);
                nameBox.NameText            = name;
                nameBox.Description         = FaceUtilities.FaceDescription(face);
                res.Add(nameBox);
            }
            return(res);
        }
Ejemplo n.º 2
0
 public ImageRecogniserViewModel()
 {
     string[] images = FaceUtilities.GetAdminsImage();
     recigniser.TrainFaces(images);
 }