Beispiel #1
0
        private void Compute3DFeatures(GestureFeatures typeOfFeaturesToCompute)
        {
            List <float> allFeatures = new List <float>();
            XYZFeatures  points = null, inversePoints = null, velocities = null, inverseVelocities = null, strokes = null;

            switch (typeOfFeaturesToCompute)
            {
            case GestureFeatures.Points:
                points = new XYZFeatures(InterpretedPoints3D);
                break;

            case GestureFeatures.PointsStroke:
                points  = new XYZFeatures(InterpretedPoints3D);
                strokes = new XYZFeatures(StrokePoints3D);
                break;

            case GestureFeatures.PointsStrokeInverse:
                points        = new XYZFeatures(InterpretedPoints3D);
                strokes       = new XYZFeatures(StrokePoints3D);
                inversePoints = new XYZFeatures(InterpretedPoints3D);
                break;

            case GestureFeatures.PointsVelocities:
                points     = new XYZFeatures(InterpretedPoints3D);
                velocities = new XYZFeatures(Velocities3D);
                break;

            case GestureFeatures.PointsVelocitiesInverseVelocities:
                points            = new XYZFeatures(InterpretedPoints3D);
                velocities        = new XYZFeatures(Velocities3D);
                inverseVelocities = new XYZFeatures(InverseVelocities3D);
                break;

            case GestureFeatures.PointsStrokesVelocitiesInverseVelocities:
                points            = new XYZFeatures(InterpretedPoints3D);
                velocities        = new XYZFeatures(Velocities3D);
                inverseVelocities = new XYZFeatures(InverseVelocities3D);
                strokes           = new XYZFeatures(StrokePoints3D);
                break;
            }

            //allFeatures.AddRange(SpeakerAngles);
            allFeatures.AddRange(points.NormalFeatures);
            if (inversePoints != null)
            {
                allFeatures.AddRange(inversePoints.VelocityFeatures);
            }
            if (velocities != null)
            {
                allFeatures.AddRange(velocities.VelocityFeatures);
            }
            if (inverseVelocities != null)
            {
                allFeatures.AddRange(inverseVelocities.VelocityFeatures);
            }
            if (strokes != null)
            {
                allFeatures.AddRange(strokes.NormalFeatures);
            }

            allFeatures.Add(this.Duration);
            Features = allFeatures.ToArray();
        }
Beispiel #2
0
        private void Compute3DFeatures(GestureFeatures typeOfFeaturesToCompute)
        {
            List<float> allFeatures = new List<float>();
            XYZFeatures points = null, inversePoints = null, velocities = null, inverseVelocities = null, strokes = null;

            switch (typeOfFeaturesToCompute)
            {
                case GestureFeatures.Points:
                    points = new XYZFeatures(InterpretedPoints3D);
                    break;
                case GestureFeatures.PointsStroke:
                    points = new XYZFeatures(InterpretedPoints3D);
                    strokes = new XYZFeatures(StrokePoints3D);
                    break;
                case GestureFeatures.PointsStrokeInverse:
                    points = new XYZFeatures(InterpretedPoints3D);
                    strokes = new XYZFeatures(StrokePoints3D);
                    inversePoints = new XYZFeatures(InterpretedPoints3D);
                    break;
                case GestureFeatures.PointsVelocities:
                    points = new XYZFeatures(InterpretedPoints3D);
                    velocities = new XYZFeatures(Velocities3D);
                    break;
                case GestureFeatures.PointsVelocitiesInverseVelocities:
                    points = new XYZFeatures(InterpretedPoints3D);
                    velocities = new XYZFeatures(Velocities3D);
                    inverseVelocities = new XYZFeatures(InverseVelocities3D);
                    break;
                case GestureFeatures.PointsStrokesVelocitiesInverseVelocities:
                    points = new XYZFeatures(InterpretedPoints3D);
                    velocities = new XYZFeatures(Velocities3D);
                    inverseVelocities = new XYZFeatures(InverseVelocities3D);
                    strokes = new XYZFeatures(StrokePoints3D);
                    break;
            }

            //allFeatures.AddRange(SpeakerAngles);
            allFeatures.AddRange(points.NormalFeatures);
            if (inversePoints != null)
                allFeatures.AddRange(inversePoints.VelocityFeatures);
            if (velocities != null)
                allFeatures.AddRange(velocities.VelocityFeatures);
            if (inverseVelocities != null)
                allFeatures.AddRange(inverseVelocities.VelocityFeatures);
            if (strokes != null)
                allFeatures.AddRange(strokes.NormalFeatures);

            allFeatures.Add(this.Duration);
            Features = allFeatures.ToArray();
        }