This project is read-only.

Having Trouble Getting Started (AlgorithmicPostureDetector)

Jan 6, 2012 at 11:24 PM
Edited Jan 6, 2012 at 11:25 PM

A couple things to add some context: I'm fairly new at programming in the Java-spawn languages, and very new at real Object Orientated Programming. 

I tried implementing the Kinect Toolbox so that I could try and track the "RightHandOverHead" posture. However, my implementation is not working. I'm getting no errors, so clearly it's a logic bug, so please tell me where I'm messing up.


Instantiating the AlgorithmPostureDetector (inside the MainWindow class):


public MainWindow()
            uiInstance = new socialKinectionUI();
            userDominanceTracker = new AlgorithmicPostureDetector();

        //static socialKinectionUI uiInstance = new socialKinectionUI();
        //uiInstance = new socialKinectionUI();

        public static socialKinectionUI uiInstance;
        public static AlgorithmicPostureDetector userDominanceTracker;

Calling the reference (and even creating a ReplaySkeletonData instance):


ReplaySkeletonData replayData = new ReplaySkeletonData(data);
//Debug.WriteLine("Posture detected: " + userDominanceTracker.PostureDetected);
Debug.WriteLine("CurrentPosture: " + userDominanceTracker.CurrentPosture.ToString());


There's more code that references it, but I can't even get anything in the Debug.WriteLine so clearly it's failing before that point. What do I need to do to have it try to track for the "RightHandOverHead" posture?


Jan 9, 2012 at 1:26 PM

Hello, you choose have a look to GestureViewer sample (in the download section) where I coded something like what you need.

The main point here is that you must have an event to handle skeleton data updated.