How would you smooth values of an arraylist?
in
Programming Questions
•
1 year ago
How would you eliminate "jitter" in Kinect data, "smooth" it?:
Picture an array of numbers, ie
time1: 100,120,130
time2: 102,120,132
time3: 98,108,120
The kinect exports at best 30fps. That means, the difference between time1 and time2 is 1/30 seconds at best. I would like to enter a smoothing factor, which removes measurement errors up to a given degree.
Currently it is like this: I created a function which outputs an arraylist. So arraylist kinectvalues is given at best each 1/30 seconds. It contains 17 floats.
How would you convert it into an arraylist that contains the smoothed values without taking much time?
Smoothed arraylist could be
time1: 101,120,131
time2: 100,119,132
time3: 100,118,131
1