2023-11-10 07:17:23 +00:00
|
|
|
|
using OpenCVForUnity.CoreModule;
|
2023-11-25 19:37:35 +00:00
|
|
|
|
using System;
|
2023-11-10 07:17:23 +00:00
|
|
|
|
using System.Collections.Generic;
|
2023-11-25 19:37:35 +00:00
|
|
|
|
using UnityEngine;
|
2023-11-10 07:17:23 +00:00
|
|
|
|
|
|
|
|
|
public class HeadTurnUp : PoseBase
|
|
|
|
|
{
|
2023-11-25 19:37:35 +00:00
|
|
|
|
public override Vector2 GetBasicVectorDirection(List<Point> startPoint, List<Point> endPoint)
|
2023-11-10 07:17:23 +00:00
|
|
|
|
{
|
2023-11-25 19:37:35 +00:00
|
|
|
|
List<Vector2> vectors = new List<Vector2>();
|
|
|
|
|
//必要点位 Nose Neck
|
|
|
|
|
//计算鼻子到头颈矢量
|
2023-11-27 05:49:53 +00:00
|
|
|
|
//return GetAverageVector(startPoint, endPoint, "Nose");
|
2023-11-27 18:00:13 +00:00
|
|
|
|
return GetTwoPointAverageVector(startPoint, endPoint, "Neck", "Nose");
|
2023-11-25 19:37:35 +00:00
|
|
|
|
}
|
2023-11-13 02:53:34 +00:00
|
|
|
|
|
2023-11-25 19:37:35 +00:00
|
|
|
|
protected override bool IsMovePoint(string tagName)
|
|
|
|
|
{
|
|
|
|
|
return "Nose" == tagName || "REye" == tagName || "LEye" == tagName || "REar" == tagName || "LEar" == tagName;
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-27 05:49:53 +00:00
|
|
|
|
public override bool? MovementValidation(Vector2 distance, TimeSpan totalTimeSpan, int level)
|
2023-11-25 19:37:35 +00:00
|
|
|
|
{
|
2023-11-27 05:49:53 +00:00
|
|
|
|
return BasicMovementValidation(distance, totalTimeSpan, Vector2.up, level);
|
2023-11-25 19:37:35 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override void ExcellenceEstimate(List<(TimeSpan, Vector2)> frameData, Vector2 distance, TimeSpan totalTimeSpan)
|
|
|
|
|
{
|
|
|
|
|
throw new NotImplementedException();
|
2023-11-10 07:17:23 +00:00
|
|
|
|
}
|
|
|
|
|
}
|