Browse Source

fixed crashed caused by missing trackIDs

Alexander Hendrich 10 years ago
parent
commit
3cd9548a45

+ 2 - 2
bbiwarg/Parameters.cs

@@ -42,7 +42,7 @@ namespace BBIWARG
         /// <summary>
         /// the input source type
         /// </summary>
-        public static readonly InputType InputSource = InputType.Movie;
+        public static readonly InputType InputSource = InputType.Camera;
 
         #endregion input
 
@@ -56,7 +56,7 @@ namespace BBIWARG
         /// <summary>
         /// true iff the timer output should be shown
         /// </summary>
-        public static readonly bool LoggerTimerOutputEnabled = true;
+        public static readonly bool LoggerTimerOutputEnabled = false;
 
         #endregion Logger
 

+ 1 - 0
bbiwarg/Recognition/PalmRecognition/TrackedPalm.cs

@@ -115,6 +115,7 @@ namespace BBIWARG.Recognition.PalmRecognition
         private void updateOptimizedPalm(Palm detectedPalm)
         {
             OptimizedPalm = new Palm(detectedPalm.Hand, detectedPalm.ThumbDefect, detectedPalm.HandSide, WristUpperPrediction, FingersUpperPrediction, FingersLowerPrediction, WristLowerPrediction);
+            OptimizedPalm.setTracked(ID);
         }
     }
 }

+ 1 - 0
bbiwarg/Recognition/TouchRecognition/TrackedTouch.cs

@@ -145,6 +145,7 @@ namespace BBIWARG.Recognition.TouchRecognition
         private void updateOptimizedTouch(Touch detectedTouch)
         {
             OptimizedTouch = new Touch(AbsolutePositionPrediction, detectedTouch.Finger, detectedTouch.Palm);
+            OptimizedTouch.setTracked(ID);
         }
     }
 }

+ 2 - 0
bbiwarg/Recognition/Tracking/TrackedObject.cs

@@ -77,6 +77,8 @@
             this.numFramesLostUntilDeleted = numFramesLostUntilDeleted;
             wasTrackedBefore = false;
 
+            detectedObject.setTracked(ID);
+
             CurrentObject = detectedObject;
             LastObject = detectedObject;
             CurrentState = TrackingState.Detected;