/// <summary> /// Create a Kalman smoothing joint with default configuration values. /// </summary> /// <param name="jointType">The joint type to create</param> public KalmanJoint(JointType jointType) : base(jointType) { var parms = new KalmanSmoothingParameters(); _measurementUncertainty = new Vector3(parms.MeasurementUncertainty); _jitterRadius = parms.JitterRadius; }
/// <summary> /// Create a Kalman smoothing joint with default configuration values. /// </summary> /// <param name="jointType">The joint type to create</param> public KalmanJoint(JointType jointType) : base(jointType) { var parms = new KalmanSmoothingParameters(); _measurementUncertainty = new Vector3(parms.MeasurementUncertainty); _jitterRadius = parms.JitterRadius; }
/// <summary> /// Create a Kalman smoothing joint with custom configuration values. /// </summary> /// <param name="jointType">The joint type to create</param> /// <param name="parameters">An <c>ExponentialSmoothingParameters</c> object</param> public KalmanJoint(JointType jointType, ISmootherParameters parameters = null) : base(jointType) { var parms = parameters as KalmanSmoothingParameters; if (parms == null) { parms = new KalmanSmoothingParameters(); } _measurementUncertainty = new Vector3(parms.MeasurementUncertainty); _jitterRadius = parms.JitterRadius; }
private void InitBody(float aJitterRadius, float aMeasurementUncertainty) { log.Info("InitBody"); KalmanSmoothingParameters smoothingParam = new KalmanSmoothingParameters(); smoothingParam.JitterRadius = aJitterRadius; smoothingParam.MeasurementUncertainty = aMeasurementUncertainty; _smoothedBodies = new SmoothedBody<KalmanSmoother>[this.KinectSensor.BodyFrameSource.BodyCount]; for (int i = 0; i < this.KinectSensor.BodyFrameSource.BodyCount; i++) { _smoothedBodies[i] = new SmoothedBody<KalmanSmoother>(smoothingParam); } // get the coordinate mapper this.coordinateMapper = this.KinectSensor.CoordinateMapper; // get total number of bodies from BodyFrameSource this.bodies = new Body[this.KinectSensor.BodyFrameSource.BodyCount]; // sets total number of possible tracked bodies this.bodyCount = this.KinectSensor.BodyFrameSource.BodyCount; // open the reader for the body frames this.bodyFrameReader = this.KinectSensor.BodyFrameSource.OpenReader(); // wire handler for frame arrival this.bodyFrameReader.FrameArrived += this.Reader_BodyFrameArrived; }