Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

It's likely that your measurements are noisy, but if you've got more than 3, you can use something called a Kalman Filter.

You can use this to get accurate estimates of noisy measurements. Set up the filter correctly, input the position of the ball every time you measure it, and read the sate for estimates of position, speed, and acceleration.

It's beyond the scope of this forum to explain how to use it, but there are many tutorials on the internet, and the OpenCV syntax is explained in the documentation (linked above) and the kalman.cpp example.