The subject of this project described in this document is the planning and implementation of a tracking system for a two-dimensional (basketball) shooting target and assessing the likelihood of hitting a given interval (basket). In our work, we built a prediction system for a basketball model that moves under gravity only, as well as a system for a basketball model that is affected by gravity in addition to the force of gravity.
To deal with the two different models, we implemented two types of basketball tracking filters, a linear Kalman filter and a nonlinear Kalman filter, which helped us better cope with each of the models. In addition, during the project, we worked on implementing techniques for extracting information from sensors that provided us with samples for tracking. The measurement acquisition is tailored to the parameters of a typical standard mobile phone camera, both in terms of frames per second (fps) and noise and image processing capabilities.
In addition to tracking the ball, we also implemented a model for estimating the future position of the ball based on the measurements received and other parameters of the ball and the environment. Moreover, we developed methods for assessing the likelihood of the ball hitting the basket at any moment during the ball’s flight, taking into account probabilistic models, as well as clear and intuitive display methods for these statistical test results.
As a second part of the project, we designed an algorithm to detect the ball in an image and with the help of the optical model of the camera’s operation we mapped pixels in the image to points in the real world. These points constituted the measurement vectors based on which the filter predicted the injection results.

