Exemplo n.º 1
0
        private async void RunFacialDetection()
        {
            SetBusy("Detecting faces...");

            ProgressIndeterminate = false;
            ProgressMin           = 0;
            ProgressMax           = Frames.Count;
            ProgressValue         = 0;

            await Task.Run(() =>
            {
                for (int i = 0; i < Frames.Count; i++)
                {
                    BusyMessage       = $"Checking for faces {(i + 1).ToString("#,###")} of {Frames.Count.ToString("#,###")}";
                    ProgressValue     = i;
                    Frames[i].HasFace = FaceHelper.HasFace(Frames[i].FullPath);
                }
            });

            ProgressIndeterminate = true;
            SetFree();
        }