From 442387922b29bee99ed6720dd4905a16b2226644 Mon Sep 17 00:00:00 2001 From: tanglong Date: Tue, 24 Mar 2026 17:00:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Wpf_AiSportsMicrospace/Views/Home.xaml | 2 +- .../Views/JumpLong/StandingLeap.xaml | 2 +- .../Views/JumpLong/StandingLeap.xaml.cs | 9 ++++++++- .../Views/JumpRope/GroupJumpRope.xaml.cs | 2 ++ .../Wpf_AiSportsMicrospace.csproj | 16 ++++++++++++++++ 5 files changed, 28 insertions(+), 3 deletions(-) diff --git a/Wpf_AiSportsMicrospace/Views/Home.xaml b/Wpf_AiSportsMicrospace/Views/Home.xaml index 8dd3583..dbd0b1d 100644 --- a/Wpf_AiSportsMicrospace/Views/Home.xaml +++ b/Wpf_AiSportsMicrospace/Views/Home.xaml @@ -26,7 +26,7 @@ VerticalAlignment="Top" Height="900" Width="1920" - Margin="0,60,0,0" + Margin="0,60,60,0" Padding="0,100" /> diff --git a/Wpf_AiSportsMicrospace/Views/JumpLong/StandingLeap.xaml b/Wpf_AiSportsMicrospace/Views/JumpLong/StandingLeap.xaml index efdef62..6bc5572 100644 --- a/Wpf_AiSportsMicrospace/Views/JumpLong/StandingLeap.xaml +++ b/Wpf_AiSportsMicrospace/Views/JumpLong/StandingLeap.xaml @@ -35,7 +35,7 @@ - + = 3 && _sportType == 0) //举手完成 开始跳远检测 { TipBox.Opacity = 0; + TipBox.Visibility = Visibility.Hidden; _sportType = 1; StartSport(); } @@ -152,7 +153,10 @@ namespace Views.JumpLong return; var buffer = frame.GetImageBuffer(ImageFormat.Jpeg).ToArray(); - var humanResult = await Task.Run(() => _humanPredictor.Predicting(buffer, frame.Number)); + var humanResult = await Task.Run(() => + + + _humanPredictor.Predicting(buffer, frame.Number)); var objects = _sport.Equipment ? await Task.Run>(() => _objectDetector.Detecting(buffer)) : new List(); if (_sport.MeasureApparatus != null) objects.AddRange(_sport.MeasureApparatus.Apparatuses); @@ -274,7 +278,10 @@ namespace Views.JumpLong //centerImg3.Opacity = 1; _sportType = 2; RankingGrid.BeginAnimation(UIElement.OpacityProperty, fadeInAnimation); + ImageBehavior.SetRepeatBehavior(centerImg4, new RepeatBehavior(2)); + ImageBehavior.SetRepeatBehavior(centerImg4, new RepeatBehavior(1)); ImageBehavior.GetAnimationController(centerImg4).Pause(); + //_mainWin.WebcamClient.OnExtractFrame -= this.OnFrameExtracted; for (int i = 12; i >= 0; i--) diff --git a/Wpf_AiSportsMicrospace/Views/JumpRope/GroupJumpRope.xaml.cs b/Wpf_AiSportsMicrospace/Views/JumpRope/GroupJumpRope.xaml.cs index cd90fcc..05f7a60 100644 --- a/Wpf_AiSportsMicrospace/Views/JumpRope/GroupJumpRope.xaml.cs +++ b/Wpf_AiSportsMicrospace/Views/JumpRope/GroupJumpRope.xaml.cs @@ -242,6 +242,8 @@ namespace Wpf_AiSportsMicrospace.Views private async void StartCountdown(int start = 3) { tipImage.Visibility = Visibility.Collapsed; + tipImage.Opacity = 0; + userBox.Children.Remove(tipImage); _mainWin.ShowCountDownAnimation(); //_currentCountdown = start; diff --git a/Wpf_AiSportsMicrospace/Wpf_AiSportsMicrospace.csproj b/Wpf_AiSportsMicrospace/Wpf_AiSportsMicrospace.csproj index 0ba84d4..f89ad20 100644 --- a/Wpf_AiSportsMicrospace/Wpf_AiSportsMicrospace.csproj +++ b/Wpf_AiSportsMicrospace/Wpf_AiSportsMicrospace.csproj @@ -48,8 +48,12 @@ + + + + @@ -162,12 +166,24 @@ Always + + Always + + + Always + + + Always + Always Always + + Always + Always