Beispiel #1
0
        private async void IdentifyCheck_Click(object sender, RoutedEventArgs e)
        {
            Debug.WriteLine("Checking if it works...");

            var stream = await capturePhotoStreamAsync();

            if (stream != null)
            {
                var image = new BitmapImage();
                await image.SetSourceAsync(stream);

                photo.Source = image;

                var res = await FaceApiService.IdentifyPersonAsync(personGroupId, stream);

                viewModel.FaceRecognized = (currentPerson.personId == res);
                Debug.WriteLine($"Logged in person: {currentPerson.personId}, identified person: {res}");

                stream.Dispose();
            }
            else
            {
                viewModel.OxfordStatus = "Unable to capture photo.";
            }
        }