using OpenCVForUnity.CoreModule; using System; using System.Collections.Generic; using UnityEngine; public class HeadTurnDown : PoseBase { public override Vector2 GetBasicVectorDirection(List startPoint, List endPoint) { List vectors = new List(); //必要点位 Nose Neck //计算鼻子到头颈矢量 //return GetAverageVector(startPoint, endPoint, "Nose"); return GetTwoPointAverageVector(startPoint, endPoint, "Neck", "Nose"); } protected override bool IsMovePoint(string tagName) { return "Nose" == tagName || "REye" == tagName || "LEye" == tagName || "REar" == tagName || "LEar" == tagName; } public override bool? MovementValidation(Vector2 distance, TimeSpan totalTimeSpan, int level) { return BasicMovementValidation(distance, totalTimeSpan, Vector2.down, level); } public override void ExcellenceEstimate(List<(TimeSpan, Vector2)> frameData, Vector2 distance, TimeSpan totalTimeSpan) { throw new NotImplementedException(); } }