提交
This commit is contained in:
parent
37c22bfa61
commit
e1937e8dde
@ -211,36 +211,34 @@ public partial class MainWindow : Window
|
||||
_videoBitmap.Unlock();
|
||||
});
|
||||
|
||||
//var actualPositions = new List<(double X, double Y)>
|
||||
//{
|
||||
// (290, 510),
|
||||
// (500, 700),
|
||||
// (810, 710),
|
||||
// (120, 880),
|
||||
// (350, 880),
|
||||
// (660, 880)
|
||||
//};
|
||||
|
||||
////判断是否出圈
|
||||
//if (configService.ConfigDic.TryGetValue("JumpRope", out var obj) && obj is ConfigSet cfg)
|
||||
//{
|
||||
// for (int i = 0; i < actualPositions.Count && i < cfg.Points.Count; i++)
|
||||
// {
|
||||
// var (ax, ay) = actualPositions[i];
|
||||
// var pointCfg = cfg.Points[i];
|
||||
|
||||
var actualPositions = new List<(double X, double Y)>
|
||||
{
|
||||
(290, 510),
|
||||
(500, 700),
|
||||
(810, 710),
|
||||
(120, 880),
|
||||
(350, 880),
|
||||
(660, 880)
|
||||
};
|
||||
|
||||
//判断是否出圈
|
||||
if (configService.ConfigDic.TryGetValue("JumpRope", out var obj) && obj is ConfigSet cfg)
|
||||
{
|
||||
for (int i = 0; i < actualPositions.Count && i < cfg.Points.Count; i++)
|
||||
{
|
||||
var (ax, ay) = actualPositions[i];
|
||||
var pointCfg = cfg.Points[i];
|
||||
|
||||
if (!IsInsideCircle(ax, ay, pointCfg))
|
||||
{
|
||||
Console.WriteLine($"⚠️ 学生{i + 1} 已经出圈!(坐标 {ax},{ay})");
|
||||
}
|
||||
else
|
||||
{
|
||||
Console.WriteLine($"✅ 学生{i + 1} 在圈内。");
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (!IsInsideCircle(ax, ay, pointCfg))
|
||||
// {
|
||||
// Console.WriteLine($"⚠️ 学生{i + 1} 已经出圈!(坐标 {ax},{ay})");
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Console.WriteLine($"✅ 学生{i + 1} 在圈内。");
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
//可以进一步进行人体识别等
|
||||
//var humanResult = await Task.Run(() => _humanPredictor.Predicting(buffer, frame.Number));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user