none
Who kinect see? Counting. RRS feed

  • Question

  • Hello,

    This is my first week developing to Kinect SDK. I already did this http://channel9.msdn.com/Series/KinectQuickstart/Skeletal-Tracking-Fundamentals

    I never developing anything to Microsoft, only for Linux. Kinect changed this at me.

    My doubt is how can i see and count all people in front at Kinect? I dont need to track, only count ,all people pass in front at Kinect.

    Kind regards!

    Thursday, May 3, 2012 12:35 AM

Answers

All replies

  • Hi,

    Kinect can track 2 active users and 4 passive users, a total of 6 users.

    For counting the users in kinect view, please check this thread, contains detailed description with necessary code.

    http://social.msdn.microsoft.com/Forums/en-US/kinectsdk/thread/bae1d7be-3898-41af-95b6-3b3e0c89f732

    Hope this helps !

    Thanks,

    Bharat.

    Thursday, May 3, 2012 4:51 AM
  • Thank you very much!

     private int GetTotalSkeleton(AllFramesReadyEventArgs e)
            {
    
                using (SkeletonFrame skeletonFrameData = e.OpenSkeletonFrame())
                {
                    if (skeletonFrameData == null)
                    {
                        return 0;
                    }
    
    
                    skeletonFrameData.CopySkeletonDataTo(allSkeletons);
    
                    //Pessoas nao rastreados
                    int noTrac = (from s in allSkeletons
                                             where s.TrackingState == SkeletonTrackingState.PositionOnly
                                             select s).Count();
    
                    //Pessoas com esqueleto
                    int comEsq = (from s in allSkeletons
                                  where s.TrackingState == SkeletonTrackingState.Tracked
                                  select s).Count();
    
                    int numberOfSkeletons = noTrac + comEsq;
    
                    return numberOfSkeletons;
    
                }
    
            }

     private int GetTotalSkeleton(AllFramesReadyEventArgs e)
            {

                using (SkeletonFrame skeletonFrameData = e.OpenSkeletonFrame())
                {
                    if (skeletonFrameData == null)
                    {
                        return 0;
                    }


                    skeletonFrameData.CopySkeletonDataTo(allSkeletons);

                    //Pessoas nao rastreados
                    int noTrac = (from s in allSkeletons
                                             where s.TrackingState == SkeletonTrackingState.PositionOnly
                                             select s).Count();

                    //Pessoas com esqueleto
                    int comEsq = (from s in allSkeletons
                                  where s.TrackingState == SkeletonTrackingState.Tracked
                                  select s).Count();

                    int numberOfSkeletons = noTrac + comEsq;

                    return numberOfSkeletons;

                }

            }


    I'm not a developer, only likes marketing.

    Thursday, May 3, 2012 12:12 PM