Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6919545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:00:16+00:00 2026-05-27T10:00:16+00:00

I would like to track the first person, and use this person’s right hand

  • 0

I would like to track the first person, and use this person’s right hand to navigate in the application that I made.

I can take over the cursor, now I just want only one person being tracked. So basically when one person is navigating in the program, and there are people walking behind him or are looking with this guy, if they move, the kinect shouldn’t recognise anyone else.

How can I implement this, I know it’s something with the trackingId but what? :s

        foreach (SkeletonData s in allSkeletons.Skeletons)
        {

                if (s.TrackingState == SkeletonTrackingState.Tracked)
                {
                    if (s.TrackingID == 0)
                    {

                        foreach (Joint joint in s.Joints)
                        {
                        }
                    }
                }
        }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:00:17+00:00Added an answer on May 27, 2026 at 10:00 am

    Every tracked person has a player index. Just ignore players with other indexes.
    The player index is part of the data in the depth stream image. You have to extract it:

    int playerIdx = depthFrame16[i16] & 0x07;
    

    In order to get this info you have to initialize your Kinect Runtime correctly:

    _kinectNui.Initialize(RuntimeOptions.UseDepthAndPlayerIndex | ....
    

    See here for more infos:
    http://www.codeproject.com/KB/dotnet/KinectGettingStarted.aspx

    I totally recommend this video tutorial from MS:
    http://research.microsoft.com/apps/video/?id=152249

    If you look in the ShapeGameDemo that is coming with the SDK you can see how they do it. (They just use the index of the skeletion in the array):

    int playerId = 0;
    foreach (SkeletonData data in skeletonFrame.Skeletons) {
       if (SkeletonTrackingState.Tracked == data.TrackingState) {
          Player player;
          if (players.ContainsKey(playerId))
             player = players[playerId];
          else
             player = new Player(playerId);
       }
       playerId++;
    }
    

    Simplifying things you can do that (using your code):

    int myPlayerIndex = 0; //probably 0 since you are the first person entered the kinect scope
    int playerId = 0;
    foreach (SkeletonData s in allSkeletons.Skeletons) {
       if(playerId != myPlayerIndex)
          continue;       
    
       if (s.TrackingState == SkeletonTrackingState.Tracked) {
          foreach (Joint joint in s.Joints)
          {
          }
       }
       playerId++;
    }
    

    To round things up here is a similar question in an MS forum that explains it:
    http://social.msdn.microsoft.com/Forums/en-US/kinectsdk/thread/d821df8d-39ca-44e3-81e7-c907d94acfca

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to track the link that a user followed to reach my
I would like to track users clicks on my website. For that purpose, I
I would like to track the path that leads to a 404 with Google
I would like to confirm whether I am on the right track when identifying
i have a file that looks like this: TTITLE0=track name 1 TTITLE1=track name 2
I have a Django model that looks something like this: class Person(models.Model): name =
I would like to simplify this complicated logic for creating unique Track object. def
I would like to track how many surveys have been done by different departments
I have a xml web service which I would like to track using Google
I am making a small game in flash, I would like to track scores

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.