Пример #1
0
 protected virtual void executeSkeletonFrameEvent(SkeletonFrameEventData sfe)
 {
     SkeletonFrameReadyEventArgs e = new SkeletonFrameReadyEventArgs();
     e.SkeletonFrame = sfe.SkeletonFrame;
     e.eventFileName = sfe.saveFileName;
     SkeletonFrameReady(this, e);
 }
Пример #2
0
        private void executePreviousEvent()
        {
            bool findSkeleton = false;
            bool findDepth = false;
            bool findImage = false;
            SkeletonFrameEventData sfe = new SkeletonFrameEventData();
            DepthFrameEventData dfe = new DepthFrameEventData();
            ImageFrameEventData ife = new ImageFrameEventData();
            while (!findSkeleton || !findImage || !findDepth)
            {
                switch (kinectEventLine.kinectEventType)
                {
                    case EventType.SkeletonFrameEvent:
                        if (!findSkeleton)
                        {
                            findSkeleton = true;
                            sfe = (SkeletonFrameEventData)kinectEventLine.loadKinectEvent(eventRootFolder);
                        }
                        break;
                    case EventType.DepthFrameEvent:
                        if (!findDepth)
                        {
                            findDepth = true;
                            dfe = (DepthFrameEventData)kinectEventLine.loadKinectEvent(eventRootFolder);
                        }
                        break;
                    case EventType.ImageFrameEvent:
                        if (!findImage)
                        {
                            findImage = true;
                            ife = (ImageFrameEventData)kinectEventLine.loadKinectEvent(eventRootFolder);
                        }
                        break;
                    default:
                        break;

                }
                if (kinectEventLine.sequenceNumber == 1)
                {
                    break;
                }
                loadPreviousEvent();
            }
            if (findSkeleton)
                executeSkeletonFrameEvent(sfe);
            if (findDepth)
                executeDepthFrameEvent(dfe);
            if (findImage)
                executeImageEvent(ife);
        }
Пример #3
0
 public void addSkeletonFrameEvent(Microsoft.Research.Kinect.Nui.SkeletonFrameReadyEventArgs e)
 {
     if (!_recording)
         return;
     SkeletonFrameEventData sfe = new SkeletonFrameEventData(e, stopwatch.ElapsedMilliseconds, recordDirecotory, device_id);
     saveNextEvent(sfe.time, sfe.saveFileName, EventType.SkeletonFrameEvent);
 }