Foosball is an open-source application created by stduents for academic purposes.
It allows to process and analyze video recordings of table soccer games in order to:
- detect a table (using Aruco markers),
- detect and track a ball,
- detect red and blue players,
- count score (based on ball motion and position)
You can watch this demonstration video (click here for original raw input video) too see how it works in practice. In section at the bottom of this page, you can also find a few screenshots of our video recording in different phases of processing.
- compiler supporting C++17 standard,
- OpenCV == 3.4.1,
- CMake >= 3.10.0
An executable binary file created after building process requires JSON configuration file named configuration.json to work.
Configuration parameters that have to specified are listed in config_example.json file. You can use this file to create your own configuration.json and set internal values adequately.
Meaning of particular configurations:
| Parameter | Short description |
|---|---|
| videoPath | path where video recording file can be found |
| videoSkipFramesStep | if video FPS rate is too high, it is possible to skip `n` frames after each processed frame |
| arucoDictionaryPath | path where aruco symbols are stored as black and white bitmap |
| arucoDetectorConfigPath | (optional) path to yaml file containing aruco detector parameters [OpenCV Doc](https://docs.opencv.org/3.4.1/d1/dcd/structcv_1_1aruco_1_1DetectorParameters.html) |
| calibPerformCalibration | TBD |
| calibConfigPath | TBD |
| calibInitConfigPath | (optional) TBD |
| gameTableWidth | Width of the output image with table |
| gameTableHeight | Height of the output image with table |
Below we present few screenshots from our application:
- source video raw frame,
- frame after lens distortion removal
- result frame including detected table area, ball/players markers and GUI with hotkeys and game score displayed.


