Commit ea52abda authored by Alexander Krause's avatar Alexander Krause

added confidence value for jump recognition

parent 80a100af
......@@ -7,6 +7,7 @@ using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Media.Media3D;
using System.Linq;
namespace ExplorVizGestureControl.Gestures
{
......@@ -254,20 +255,26 @@ namespace ExplorVizGestureControl.Gestures
public Boolean StartOrReset()
{
Boolean[] confidenceArray = new Boolean[maxCapacity];
int gestureIndex = 0;
if (gesturesProgress[gestureIndex] == 0) return false;
foreach (Vector3D oldHead in headsStack)
{
if (head.Y > oldHead.Y + 0.05)
{
return true;
int arrayLength = headsStack.Length;
for(int i = 0; i < arrayLength; i++) {
if (head.Y > headsStack[i].Y + 0.05) {
confidenceArray[i] = true;
} else {
confidenceArray[i] = false;
}
}
return false;
int confidence = confidenceArray.Count(c => c == true);
return confidence > 6 ? true : false;
}
#endregion
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment