Hello,
I just want to use some math equation that helps take out the input jitter from my Leap Motion Controller. Leap Motion
Heres the Code:
//Cameras look at angle, up or Down
if (HandOpen(leftHand)) {
camRotateVertically = leftHand.PalmNormal.Pitch;
//Debug.Log (((-camRotateVertically) - 1.5f) * 80.0f);
CameraControl.yAngl = ((-camRotateVertically) - 1.5f) * 80.0f;
}
Unfortunately I am getting some slightly random input when i dont move my hand at all (very minimal BUT its directly controlling the camera, which makes it obvious), i need the camera movement to be very responsive as well, so its just a matter of finding averages? Something along those lines
Thanks for the Help!
Daniel
Feel free to look at any of the following:
Article 1
Article 2
Wikipedia: Averaging
Wikipedia: Smoothing
To sum it up briefly:
- Average will help you eliminate some of the noise, but will add latency. You’ll want to find the sweet spot for your back buffer length to get the best results in terms of reliability/latency.
- Apply smoothing to enhance your results.
Another deviation on the said above, which I’ve used before, would be to create a weighted mean function, where you give less weight to new points of data the higher the delta is from previous points. This helps filter out erratic noise spikes, but has limited effect on subtle noise, and is pretty laggy.
Either way, good luck
[Late Edit:]
Just noticed you mentioned the issues you encounter stem from subtle continuous noise. In which case, if you haven’t done so already, it could be simply solved by adding a minimal treshold and avoiding the headache of improving your signal