Example #1
0
 protected virtual void executeImageEvent(ImageFrameEventData ife)
 {
     ImageFrameReadyEventArgs e = new ImageFrameReadyEventArgs();
     e.ImageFrame = ife.imageFrame;
     e.eventFileName = ife.saveFileName;
     VideoFrameReady(this, e);
 }
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
 public void addImageFrameEvent(Microsoft.Research.Kinect.Nui.ImageFrameReadyEventArgs e)
 {
     if (!_recording)
         return;
     ImageFrameEventData ife = new ImageFrameEventData(e, stopwatch.ElapsedMilliseconds, recordDirecotory, device_id);
     saveNextEvent(ife.time, ife.saveFileName, EventType.ImageFrameEvent);
 }