24 lines
650 B
C#
24 lines
650 B
C#
using OpenCVForUnity.CoreModule;
|
|
using OpenCVForUnity.ImgprocModule;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public abstract class PoseBase
|
|
{
|
|
public abstract bool CheckPose(List<Point> points);
|
|
|
|
public Dictionary<string, Point> GetVaildPoints(List<Point> points, List<string> pointName)
|
|
{
|
|
var retVal = new Dictionary<string, Point>();
|
|
|
|
foreach (var name in pointName)
|
|
{
|
|
if (points[YogaConfig.BODY_PARTS[name]] != new Point(-1, -1))
|
|
{
|
|
retVal.Add(name, points[YogaConfig.BODY_PARTS[name]]);
|
|
}
|
|
}
|
|
return retVal;
|
|
}
|
|
} |