From 856473f2219db2cd28ca8eae972e7d9715e927e3 Mon Sep 17 00:00:00 2001 From: tanglong <842690096@qq.com> Date: Sat, 11 Oct 2025 14:38:02 +0800 Subject: [PATCH] ss --- Wpf_AiSportsMicrospace/MainWindow.xaml.cs | 16 +++++++-------- Wpf_AiSportsMicrospace/Views/Home.xaml.cs | 1 + .../Views/JumpRope/GroupJumpRope.xaml.cs | 20 +++++++++---------- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/Wpf_AiSportsMicrospace/MainWindow.xaml.cs b/Wpf_AiSportsMicrospace/MainWindow.xaml.cs index dd0a409..7648320 100644 --- a/Wpf_AiSportsMicrospace/MainWindow.xaml.cs +++ b/Wpf_AiSportsMicrospace/MainWindow.xaml.cs @@ -407,18 +407,16 @@ public partial class MainWindow : Window double imgHeight = overlayCanvas.ActualHeight; double radius = 100; - double yOffset = -0.10; // 向上移动 10% 屏幕高度 - // 每个圆的位置:X 和 Y 都归一化 0~1 var circlePositions = new List<(double XNorm, double YNorm)> { - (0.10, 0.98 + yOffset), - (0.24, 0.78 + yOffset), - (0.35, 0.98 + yOffset), - (0.48, 0.78 + yOffset), - (0.60, 0.98 + yOffset), - (0.72, 0.78 + yOffset), - (0.88, 0.98 + yOffset) + (0.07, 0.58), + (0.21, 0.88 ), + (0.36, 0.58 ), + (0.50, 0.88), + (0.64, 0.58 ), + (0.78, 0.88), + (0.92, 0.58 ) }; foreach (var pos in circlePositions) diff --git a/Wpf_AiSportsMicrospace/Views/Home.xaml.cs b/Wpf_AiSportsMicrospace/Views/Home.xaml.cs index d271d44..8be5a81 100644 --- a/Wpf_AiSportsMicrospace/Views/Home.xaml.cs +++ b/Wpf_AiSportsMicrospace/Views/Home.xaml.cs @@ -162,6 +162,7 @@ namespace Wpf_AiSportsMicrospace if (human == null) return; + //检测挥手动作 var wavingaction = _sportOperate.VerifyWavingAction(human); diff --git a/Wpf_AiSportsMicrospace/Views/JumpRope/GroupJumpRope.xaml.cs b/Wpf_AiSportsMicrospace/Views/JumpRope/GroupJumpRope.xaml.cs index 780dc2a..5388495 100644 --- a/Wpf_AiSportsMicrospace/Views/JumpRope/GroupJumpRope.xaml.cs +++ b/Wpf_AiSportsMicrospace/Views/JumpRope/GroupJumpRope.xaml.cs @@ -49,7 +49,7 @@ namespace Wpf_AiSportsMicrospace.Views private List sports = new(); private List circleTexts = new(); - private double[] circlePositionsX = { 0.10, 0.24, 0.35, 0.48, 0.60, 0.72, 0.88 }; + private double[] circlePositionsX = { 0.07, 0.21, 0.36, 0.50, 0.64, 0.78, 0.92 }; ConfigService configService = new ConfigService(); public GroupJumpRope() @@ -148,18 +148,16 @@ namespace Wpf_AiSportsMicrospace.Views double imgHeight = overlayCanvas.ActualHeight; double radius = 100; - double yOffset = -0.10; // 向上移动 10% 屏幕高度 - // 每个圆的位置:X 和 Y 都归一化 0~1 var circlePositions = new List<(double XNorm, double YNorm)> { - (0.10, 0.98 + yOffset), - (0.24, 0.78 + yOffset), - (0.35, 0.98 + yOffset), - (0.48, 0.78 + yOffset), - (0.60, 0.98 + yOffset), - (0.72, 0.78 + yOffset), - (0.88, 0.98 + yOffset) + (0.07, 0.58), + (0.21, 0.88 ), + (0.36, 0.58 ), + (0.50, 0.88), + (0.64, 0.58 ), + (0.78, 0.88), + (0.92, 0.58 ) }; foreach (var pos in circlePositions) @@ -206,7 +204,7 @@ namespace Wpf_AiSportsMicrospace.Views for (int i = 0; i < circlePositionsX.Length; i++) { double center = circlePositionsX[i]; - double range = 0.08; + double range = 0.07; double begin = center - range; double end = center + range;