Takes an IObservable over a collection of SkeletonData and parses it to show new skeletons and provide an IObservable for each skeleton tracked
Esempio n. 1
0
        private SkeletonTracking(KinectSensor sensor)
        {
            Contract.Requires(sensor != null);

            mySensor = sensor;
            var skeletonFrames =
                mySensor
                .SkeletonFrames
                .Select(sf => sf.SkeletonFrame);

            //skeletonFrames
            //    .Sample(TimeSpan.FromSeconds(5.0))
            //    .Subscribe(PrintSkeletonFrames);

            _SkeletonPresent = skeletonFrames
                .Select(sf => sf.Skeletons.Any(skel => skel.TrackingState != SkeletonTrackingState.NotTracked))
                .DistinctUntilChanged();

            mySkeletonTracker = new SkeletonDispatcher(skeletonFrames.Select(sf => sf.Skeletons));
        }
Esempio n. 2
0
        private SkeletonTracking(KinectSensor sensor)
        {
            Contract.Requires(sensor != null);

            mySensor = sensor;
            var skeletonFrames =
                mySensor
                .SkeletonFrames
                .Select(sf => sf.SkeletonFrame);

            //skeletonFrames
            //    .Sample(TimeSpan.FromSeconds(5.0))
            //    .Subscribe(PrintSkeletonFrames);

            _SkeletonPresent = skeletonFrames
                               .Select(sf => sf.Skeletons.Any(skel => skel.TrackingState != SkeletonTrackingState.NotTracked))
                               .DistinctUntilChanged();

            mySkeletonTracker = new SkeletonDispatcher(skeletonFrames.Select(sf => sf.Skeletons));
        }