コード例 #1
0
 public void Delete(Gesture gesture)
 {
     _recordedGestures.Remove(gesture);
 }
コード例 #2
0
 /// <summary>
 /// Add a seqence with a label to the known sequences library.
 /// The gesture MUST start on the first observation of the sequence and end on the last one.
 /// Sequences may have different lengths.
 /// </summary>
 /// <param name="skeletnTimeSequence">The sequence</param>
 /// <param name="lab">Sequence name</param>
 public void AddOrUpdate(Gesture gesture)
 {
     var skeletonTimeSequence = gesture.JointRecords.ToDictionary(joint => joint.Id, joint => joint.Positions.ToList());
     _recordedGestures.Remove(gesture);
     /*
     var comparer = EnumComparer<JointID>.Instance;
     //Deep copy the time Sequence
     Dictionary<JointID, List<Vector4>> seqCopy = new Dictionary<JointID, List<Vector4>>(comparer);
     foreach (JointID joint in skeletonTimeSequence.Keys)
     {
         List<Vector4> newList = new List<Vector4>();
         foreach (Vector4 v in skeletonTimeSequence[joint])
         {
             Vector4 vClone = new Vector4(v.X, v.Y, v.Z, v.W);
             newList.Add(vClone);
         }
         seqCopy.Add(joint, newList);
     }
      * */
     _recordedGestures.Add(gesture, skeletonTimeSequence);
 }
コード例 #3
0
ファイル: Provider.cs プロジェクト: jeanlauliac/kynapsee
 public void RemoveGesture(Gesture gesture)
 {
     dtw_.Delete(gesture);
 }
コード例 #4
0
ファイル: Provider.cs プロジェクト: jeanlauliac/kynapsee
 public void AddOrUpdateGesture(Gesture gesture)
 {
     dtw_.AddOrUpdate(gesture);
 }
コード例 #5
0
ファイル: NuiEventArgs.cs プロジェクト: jeanlauliac/kynapsee
 public NuiEventArgs(Gesture gesture, int recordedFrameCount)
 {
     Gesture = gesture;
     RecordedFrameCount = recordedFrameCount;
 }
コード例 #6
0
 void NuiProviderGestureDone(object sender, Nui.NuiEventArgs e)
 {
     if (!captureMode_)
     {
         var st = "Gesture recognized: " + e.Gesture.Name;
         if (e.Gesture == lastGesture_)
         {
             lastGestureCount_++;
             st += " (" + lastGestureCount_ + ")";
         }
         else
             lastGestureCount_ = 1;
         lastGesture_ = e.Gesture;
         StatusText = st;
     }
 }