How to average an Array of Vectors.

edited February 2015 in How To...

Hello,

My kinect skeleton Vectors are a bit flimsy and I remember reading somewhere about a way to stable it more by averaging two positions of the Vector joints position and positionNEW type of thing. I thought of storing x amounts of vector positions and averaging them and then drawing skeleton on the averaged values. Any thoughts on how would the code for averaging the vectors look like?

Answers

  • Answer ✓

    I thought of storing x amounts of vector positions and averaging them and then drawing skeleton on the averaged values.

    It depends over the period of time it takes to measure x values. If the movement is quite rapid and/or the length of time taken to obtain the values is significant then the average position would 'lag' behind the actual position.

    Look at this post to see an efficient algorithm for calculating a moving average. It could easily be modified to work with vectors.

Sign In or Register to comment.