Example #1
0
        public ImagePair[] FacesCapturedAt(int cameraID, DateTime time)
        {
            string[] files = ImageSearch.FacesCapturedAt(time, cameraID, true);
            ImagePair[] bmps = new ImagePair[files.Length];

            for (int i = 0; i < files.Length ; i++)
            {
                ImagePair ip = new ImagePair();
                ip.Face = (Bitmap) Bitmap.FromFile(files[i]);
                ip.FacePath = files[i];

                bmps[i] = ip;
            }

            return bmps;
        }
Example #2
0
        public ImagePair GetFace(string path)
        {
            Bitmap face = (Bitmap)Image.FromFile(path);

            string bigImgPath = FileSystemStorage.BigImgPathForFace(Core.ImageDetail.FromPath(path));

            Bitmap big = (Bitmap)Image.FromFile(bigImgPath);

            ImagePair ip = new ImagePair();
            ip.Face = face;
            ip.FacePath = path;

            ip.BigImage = big;
            ip.BigImagePath = bigImgPath;

            return ip;
        }
        public ImagePair GetFace(string path)
        {
            Bitmap face = (Bitmap)Damany.Util.Extensions.MiscHelper.FromFileBuffered(path);

            string bigImgPath = new FileSystemStorage(Properties.Settings.Default.OutputPath).BigImgPathForFace(Core.ImageDetail.FromPath(path));

            Bitmap big = (Bitmap)Damany.Util.Extensions.MiscHelper.FromFileBuffered(bigImgPath);

            ImagePair ip = new ImagePair();
            ip.Face = face;
            ip.FacePath = path;

            ip.BigImage = big;
            ip.BigImagePath = bigImgPath;

            return ip;
        }
 public void AddFace(ImagePair pair)
 {
     this.faceImageList.Images.Add(pair.Face);
     string text = System.IO.Path.GetFileName(pair.FacePath);
     ListViewItem item = new ListViewItem
     {
         Tag = pair,
         Text = text,
         ImageIndex = this.faceImageList.Images.Count - 1,
     };
     this.facesListView.Items.Add(item);
 }