public KinectUpdateFrameData(KinectSensorWrapper kinect, int millisecondsWait)
 {
     ColorFrame    = kinect.Sensor.ColorStream.OpenNextFrame(millisecondsWait);
     DepthFrame    = kinect.Sensor.DepthStream.OpenNextFrame(millisecondsWait);
     SkeletonFrame = kinect.Sensor.SkeletonStream.OpenNextFrame(millisecondsWait);
 }
示例#2
0
        void MainWindow_Loaded( object sender, RoutedEventArgs e )
        {
            try {
                udpWriter = new UdpWriter( ConfigurationManager.AppSettings["DestinationAddress"],
                                           int.Parse( ConfigurationManager.AppSettings["DestinationPort"] ) );

                kinect = new KinectSensorWrapper();
                kinect.AllFrameReady += kinect_AllFrameReady;
                kinect.Start();
            }
            catch ( Exception ex ) {
                MessageBox.Show( ex.Message );
                Close();
            }
        }