Predict the trajectory of a ping pong ball in 2D with OpenCV [C++]

Viewed 124

I'm trying to make the basic robot arm which can hit the ping pong ball using OpenCv and C++. I managed to detect the ball and move the robot arm according to XY coordinates using inverse kinematics, but now I need to hit the ball, and that's a hard thing.

I thought that if I'll predict the trajectory of the ball, the things would be easier, but unfortunately, this part doesn't seems easy to me either.

I thought that trajectory equations would be a good way to start, so I measured the distance of the ball between 2 frames, also I found the time between those, the angle between table and ball when the ball hits the table, but I don't know how to predict the future trajectory (or how to implement in C++) and I need some help with this.

Also, if you know any way to hit the ball in 2D it would help me a lot. Thanks!

0 Answers
Related