As part of the thesis, we developed an algorithm that tracks the ball in real time as it flies through the field of view of the camera. In addition, the algorithm also determines the trajectory of the ball’s flight.
First, we tackled the camera calibration challenge. In addition to the internal calibration of the camera, which is necessary to solve the problem of lens distortion, we also had to perform an external calibration, with which we obtained the conversion between the pixels in the image and millimeters in the real world.
Then we had to figure out how to identify the ball in the picture. We tested three methods: color filter, motion detection and Hough transform, as well as various combinations of these three methods. The function based on the color filter method proved to be the most effective.
In the last part of the thesis, we determined the mathematical model of the ball’s flight. Based on the point where the algorithm detected the ball in the previous frames, we determined the trajectory along which the ball moved using the least squares method.
|