private Point3D getJointError(Point3D jointPosition, KinectBase.TrackingState trackingState) { //TODO: Update this method once I have better information on how good the skeleton measurements of the Kinect v2 are //Note, the error is likely depth dependent, thus the joint position is passed in, inspite of not being used in the current implementation Point3D error = new Point3D(); if (trackingState == KinectBase.TrackingState.NotTracked) { //Set the error really high when the joint isn't tracked so it doesn't messup the the filter if it accidently gets included error.X = 1000; error.Y = 1000; error.Z = 1000; } else { double tempError = 0.005; //Set the tracked error to 5 millimeters if (trackingState == KinectBase.TrackingState.Inferred) { error.X = 10 * tempError; error.Y = 10 * tempError; error.Z = 10 * tempError; } else { error.X = tempError; error.Y = tempError; error.Z = tempError; } } return(error); }
private Point3D getJointError(Point3D jointPosition, KinectBase.TrackingState trackingState) { Point3D error = new Point3D(); if (trackingState != KinectBase.TrackingState.NotTracked) { double depthDepError = 0.0004946 * Math.Exp(0.7 * jointPosition.Z); //Based on "Performance Measurements for the Microsoft Kinect Skeleton" by Livingston, et al. if (trackingState == KinectBase.TrackingState.Inferred) { error.X = 10 * depthDepError; error.Y = 10 * depthDepError; error.Z = 10 * depthDepError; } else //tracked or position only { error.X = depthDepError; error.Y = depthDepError; error.Z = depthDepError; //These are for making the error dependent on the direction //However, these directional errors are not preserved in the coordinate system transformation //Also, I am not 100% sure the ratios are derived from the paper correctly //error.X = 0.669 * depthDepError; //error.Y = 1.011 * depthDepError; //error.Z = 1.321 * depthDepError; } } else { //If the joint isn't tracked, set the error really high so if the filter tries to use it, it doesn't significantly contribute to the estimate error.X = 1000; error.Y = 1000; error.Z = 1000; } return(error); }