CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Threaded View

  1. #1
    Join Date
    Apr 2011

    How to lock in a single skeleton in Microsoft Kinect SDK v 1.7 using vc++?

    I m trying to lock a single skeleton using Microsoft Kinect SDK v 1.7 . My requirements are
    • First lock a single skeleton.
    • Check the tracking state of the of the locked skeleton.
    • If the tracking state of the locked skeleton is NOT Tracked,then
    • ----->check for the next closest skeleton
    • ----->lock this skeleton.
    How do I do this using vc++2010. The code which i tried is given below.

    TrackSingleSkeleton(NUI_SKELETON_FRAME* pSkeletonFrame)
    	 for (int i = 0; i < NUI_SKELETON_COUNT; i++)
    		const NUI_SKELETON_DATA & skeleton = pSkeletonFrame->SkeletonData[i];
    		if (skeleton.eTrackingState == NUI_SKELETON_TRACKED)
    			dwTrackingIDs[0] = skeleton.dwTrackingID;
    			dwTrackingIDs[1] = 0; // or 0, if you want to track only one
    		 else if(skeleton.eTrackingState == NUI_SKELETON_POSITION_ONLY)
    			dwTrackingIDs[0] = skeleton.dwTrackingID;
    			dwTrackingIDs[1] = 0;
    		 if (dwTrackingIDs[0] > 0)
    			m_pNuiSensor->NuiSkeletonSetTrackedSkeletons(dwTrackingIDs); // Track this skeleton
    But here i m not able to lock the skeleton.Help pls...

    Last edited by Arjay; March 25th, 2013 at 12:10 PM. Reason: Changed code tags to use brackets instead of arrows

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.