public HandUserGameObject(double xPosition, double yPosition, Geometry boundingBoxGeometry, Image notAlreadyTrackedImage, Image image, SkeletonSmoothingFilter skeletonSmoothingFilter) : base(xPosition, yPosition, boundingBoxGeometry, notAlreadyTrackedImage, image, skeletonSmoothingFilter) { }
protected KinectSensorHelper(SkeletonSmoothingFilter skeletonSmoothingFilter) { this.kinectSensor = null; this.trackedSkeleton = null; //values keep from MSDN Joint Filtering at http://msdn.microsoft.com/en-us/library/jj131024.aspx switch (skeletonSmoothingFilter) { case SkeletonSmoothingFilter.DEFAULT_SMOOTHING_LEVEL: this.transformSmoothParameters = new TransformSmoothParameters(); this.transformSmoothParameters.Smoothing = 0.5f; this.transformSmoothParameters.Correction = 0.5f; this.transformSmoothParameters.Prediction = 0.5f; this.transformSmoothParameters.JitterRadius = 0.05f; this.transformSmoothParameters.MaxDeviationRadius = 0.04f; break; case SkeletonSmoothingFilter.MEDIUM_SMOOTHING_LEVEL: this.transformSmoothParameters = new TransformSmoothParameters(); this.transformSmoothParameters.Smoothing = 0.5f; this.transformSmoothParameters.Correction = 0.1f; this.transformSmoothParameters.Prediction = 0.5f; this.transformSmoothParameters.JitterRadius = 0.1f; this.transformSmoothParameters.MaxDeviationRadius = 0.1f; break; case SkeletonSmoothingFilter.HIGH_SMOOTHING_LEVEL: this.transformSmoothParameters = new TransformSmoothParameters(); this.transformSmoothParameters.Smoothing = 0.7f; this.transformSmoothParameters.Correction = 0.3f; this.transformSmoothParameters.Prediction = 1.0f; this.transformSmoothParameters.JitterRadius = 1.0f; this.transformSmoothParameters.MaxDeviationRadius = 1.0f; break; default: throw new Exception("Unexpected SkeletonSmoothingFilter"); } this.initializeKinect(); }
public HeadUserGameObject(double xPosition, double yPosition, Geometry boundingBoxGeometry, Image notAlreadyTrackedImage, Image image, SkeletonSmoothingFilter skeletonSmoothingFilter) { this.firstTimeTracked = false; this.notAlreadyTrackedImage = notAlreadyTrackedImage; this.cursorImage = image; this._image = notAlreadyTrackedImage; base._xPosition = xPosition; base._yPosition = yPosition; base._boundingBoxGeometry = boundingBoxGeometry; base._gameObjectTag = Tags.USER_TAG; //this.kinectSensorHelper = new KinectSensorHelper(skeletonSmoothingFilter); this.kinectSensorHelper = KinectSensorHelper.getKinectSensorHelperSingleton(); //this.kinectSensorHelper.initializeKinect(); //this.calibrateCamera(); }