예제 #1
0
        public FreePlayKinectModel(Stream fileStream) : base()
        {
            Messenger.Default.Register <ShuttingDownMessage>(this, (message) => OnShuttingDown(message));
            if (fileStream != null)
            {
                this.fileStream = fileStream;
                isRecorder      = true;
                recorder.Start(fileStream);
            }

            if (Runtime.Kinects.Count > 0)
            {
                this.runtime = Runtime.Kinects[0];
                this.runtime.Initialize(RuntimeOptions.UseSkeletalTracking | RuntimeOptions.UseColor | RuntimeOptions.UseDepthAndPlayerIndex);
                this.runtime.SkeletonEngine.TransformSmooth = true;
                TransformSmoothParameters parameters = new TransformSmoothParameters();
                // parameters used to smooth the skeleton data
                parameters.Smoothing          = 0.3f;
                parameters.Correction         = 0.3f;
                parameters.Prediction         = 0.4f;
                parameters.JitterRadius       = 0.7f;
                parameters.MaxDeviationRadius = 0.2f;
                this.runtime.SkeletonEngine.SmoothParameters = parameters;
                this.runtime.SkeletonFrameReady += new EventHandler <SkeletonFrameReadyEventArgs>(SkeletonFrameReady);
            }
        }
예제 #2
0
        void DirectRecord(string targetFileName)
        {
            recorder = new SkeletonRecorder();
            Stream recordStream = File.Create(targetFileName);

            recorder.Start(recordStream);
            recordOption.Content = "Stop Recording";
        }