Example #1
0
 /// <summary>
 /// Demonstrates how to use our Kinect calibration to convert a depth image point to color image coordinates.
 /// </summary>
 /// <param name="calibration"></param>
 /// <param name="kinectSensor"></param>
 public void Run(Kinect2Calibration calibration, KinectSensor kinectSensor)
 {
     this.calibration               = calibration;
     this.kinectSensor              = kinectSensor;
     depthImage                     = new ShortImage(Kinect2Calibration.depthImageWidth, Kinect2Calibration.depthImageHeight);
     depthFrameReader               = kinectSensor.DepthFrameSource.OpenReader();
     depthFrameReader.FrameArrived += depthFrameReader_FrameArrived;
 }
 /// <summary>
 /// Demonstrates how to use our Kinect calibration to convert a depth image point to color image coordinates.
 /// </summary>
 /// <param name="calibration"></param>
 /// <param name="kinectSensor"></param>
 public void Run(Kinect2Calibration calibration, KinectSensor kinectSensor)
 {
     this.calibration = calibration;
     this.kinectSensor = kinectSensor;
     depthImage = new ShortImage(Kinect2Calibration.depthImageWidth, Kinect2Calibration.depthImageHeight);
     depthFrameReader = kinectSensor.DepthFrameSource.OpenReader();
     depthFrameReader.FrameArrived += depthFrameReader_FrameArrived;
 
 }
Example #3
0
        void CoordinateMapper_CoordinateMappingChanged(object sender, CoordinateMappingChangedEventArgs e)
        {
            kinect2Calibration = new Kinect2.Kinect2Calibration();
            kinect2Calibration.RecoverCalibrationFromSensor(kinectSensor);
            kinect2CalibrationReady.Set();

            depthFrameReader = kinectSensor.DepthFrameSource.OpenReader();
            depthFrameReader.FrameArrived += depthFrameReader_FrameArrived;

            colorFrameReader = kinectSensor.ColorFrameSource.OpenReader();
            colorFrameReader.FrameArrived += colorFrameReader_FrameArrived;

            bodyFrameReader = kinectSensor.BodyFrameSource.OpenReader();
            bodyFrameReader.FrameArrived += bodyFrameReader_FrameArrived;

            audioBeamFrameReader = kinectSensor.AudioSource.OpenReader();
            audioBeamFrameReader.FrameArrived += audioBeamFrameReader_FrameArrived;

            audioBeamFrameReader.AudioSource.AudioBeams[0].AudioBeamMode = AudioBeamMode.Manual;
            audioBeamFrameReader.AudioSource.AudioBeams[0].BeamAngle     = 0;
        }
Example #4
0
        //CoordinateMappingExample cooordinateMappingExample;

        void CoordinateMapper_CoordinateMappingChanged(object sender, CoordinateMappingChangedEventArgs e)
        {
            kinect2Calibration = new RoomAliveToolkit.Kinect2Calibration();
            kinect2Calibration.RecoverCalibrationFromSensor(kinectSensor);
            kinect2CalibrationReady.Set();

            //cooordinateMappingExample = new CoordinateMappingExample();
            //cooordinateMappingExample.Run(kinect2Calibration, kinectSensor);

            depthFrameReader = kinectSensor.DepthFrameSource.OpenReader();
            depthFrameReader.FrameArrived += depthFrameReader_FrameArrived;

            colorFrameReader = kinectSensor.ColorFrameSource.OpenReader();
            colorFrameReader.FrameArrived += colorFrameReader_FrameArrived;

            bodyFrameReader = kinectSensor.BodyFrameSource.OpenReader();
            bodyFrameReader.FrameArrived += bodyFrameReader_FrameArrived;

            audioBeamFrameReader = kinectSensor.AudioSource.OpenReader();
            audioBeamFrameReader.FrameArrived += audioBeamFrameReader_FrameArrived;

            audioBeamFrameReader.AudioSource.AudioBeams[0].AudioBeamMode = AudioBeamMode.Manual;
            audioBeamFrameReader.AudioSource.AudioBeams[0].BeamAngle = 0;
        }
Example #5
0
 public Camera()
 {
     pose = new Matrix(4, 4);
     pose.Identity();
     calibration = new Kinect2Calibration();
 }