private void PersonLeaveAnimation() { ButtonLabel.Text = "Empezar"; ButtonLabel.SetValue(Grid.RowProperty, 3); ButtonLabel.Visibility = Visibility.Collapsed; StartButton.SetValue(Grid.RowProperty, 3); StartButton.Visibility = Visibility.Collapsed; BottomPanel.Visibility = Visibility.Collapsed; BottomPanelText.Visibility = Visibility.Collapsed; BottomPanelText.Text = "Ubícate para que tu cabeza se alinee con la imagen. Presiona continuar cuando hayas terminado."; SmallLabel.Text = "Levanta tu mano y presiona el boton para empezar."; SmallLabel.Visibility = Visibility.Collapsed; MainLabel.Text = "¿Quieres ayudar a crear un algoritmo de identificación facial?"; MainLabel.Visibility = Visibility.Visible; VideoCapture.Visibility = Visibility.Collapsed; ImgReference.Visibility = Visibility.Collapsed; ImgReferenceBG.Visibility = Visibility.Collapsed; Timer.Visibility = Visibility.Collapsed; TimerBG.Visibility = Visibility.Collapsed; TemplateImage.Visibility = Visibility.Visible; string[] fromGradient = { "#ffd52941", "#ffe45f42", "#ffee894c", "#fff6b061", "#fffcd581" }; string[] toGradient = { "#ff1f719b", "#ff238aad", "#ff33a3bc", "#ff4cbcc9", "#ff6bd5d3" }; UIAnimations.GradientAnimation(1.0, fromGradient, toGradient, BGCanvas); }
private void OnStartButton(object sender, RoutedEventArgs e) { if (stage == CaptureStage.Tracking) { stage = CaptureStage.Agreement; ButtonLabel.Text = "Aceptar"; MainLabel.Text = "Vamos a tomar una serie de fotos que ayudaran a entrenar el algoritmo"; SmallLabel.Text = "Debes aceptar darnos permiso de usar las imágenes capturadas en el entrenamiento del algoritmo. \n * Estas imágenes no serán publicadas ni mostradas en ninguna parte."; } else if (stage == CaptureStage.Agreement) { stage = CaptureStage.Alignment; SmallLabel.Visibility = Visibility.Collapsed; StartButton.SetValue(Grid.RowProperty, 2); ButtonLabel.SetValue(Grid.RowProperty, 2); ButtonLabel.Text = "Continuar"; BottomPanel.Visibility = Visibility.Visible; BottomPanelText.Visibility = Visibility.Visible; VideoCapture.Visibility = Visibility.Visible; TemplateImage.Visibility = Visibility.Visible; MainLabel.Visibility = Visibility.Collapsed; } else if (stage == CaptureStage.Alignment) { stage = CaptureStage.Demo; capture.NewSubject(); CaptureData(0); currentCapture = 1; TemplateImage.Visibility = Visibility.Collapsed; BottomPanelText.Text = "Imagenes de guia apareceran en la pantalla, por cada una intenta imitar la orientación de la cabeza mostrada en la imagen. Presiona continuar para empezar las capturas."; ImgReference.Visibility = Visibility.Visible; ImgReferenceBG.Visibility = Visibility.Visible; DemoReel(); } else if (stage == CaptureStage.Demo) { stage = CaptureStage.ImageCaptures; StartButton.Visibility = Visibility.Collapsed; ButtonLabel.Visibility = Visibility.Collapsed; BottomPanel.Visibility = Visibility.Collapsed; BottomPanelText.Visibility = Visibility.Collapsed; ImgReference.Source = (ImageSource)FindResource("Ref_1"); Task.Delay(3000).ContinueWith(t => NextCapture()); } }