This is a simple implentation for object tracking using depth data from Kinect2. It contains connected componet labeling to detect, and 2-polynomial curve fitting to track and predict.
Our team use code with same idea, combined with Kalman-filter and ODE for more complex areodynamics, successfully track badminton in a national robot contest. However, I cannot release original code as it's a group property. If interested, please contact me for details.