Example #1
0
 public void addDepthFrameEvent(Microsoft.Research.Kinect.Nui.ImageFrameReadyEventArgs e)
 {
     if (!_recording)
         return;
     DepthFrameEventData dfe = new DepthFrameEventData(e, stopwatch.ElapsedMilliseconds, recordDirecotory, device_id);
     saveNextEvent(dfe.time, dfe.saveFileName, EventType.DepthFrameEvent);
 }
Example #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);
        }
Example #3
0
 protected virtual void executeDepthFrameEvent(DepthFrameEventData dfe)
 {
     ImageFrameReadyEventArgs e = new ImageFrameReadyEventArgs();
     e.ImageFrame = dfe.imageFrame;
     e.eventFileName = dfe.saveFileName;
     DepthFrameReady(this, e);
 }