Skip to content

Posiadacz07/foosball

 
 

Repository files navigation

Foosball Build Status License: MIT

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.

Requirements

  • compiler supporting C++17 standard,
  • OpenCV == 3.4.1,
  • CMake >= 3.10.0

Configuration

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

Screenshots

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.

Source video frame

Undistorted video frame

Result video frame

About

Analysis of table soccer games based on video recordings

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 99.1%
  • CMake 0.9%