Code Monkey home page Code Monkey logo

8-ball-pool-analysis's Introduction

8 Ball Pool Analysis

This is an Open Source project that analyses game footage from Miniclip's 8 ball pool.

It determines paths, which show the user a possibility of how the balls could be potted.

animated.gif

File Structure

  • Report/ - Contains the report for this project.
  • Slideshow/ - Contains the slideshow for this project.
  • Other files - Contains the source code for this project.

Installation

This tool uses standard image processing techniques through OpenCV, together with some vector algebra and graph logic.

The following packages are required to run this tool, OS (MacOS, Linux):

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Usage

This tool is run via the command-line, and contains various fine-tuning options, depending on the video input.

The current default values for ball and hole sizes were determined after rigorous testing, on a video from a 1080p display, with zoom and scaling set to 100%. As a result, videos which have been captured on displays with a different resolution, zoom and scaling might need further tweaking to obtain adequate results.

usage: start.py [-br N] [-hr N] [-bd N] [-tb type] [-ip file] [-op file] [-sf N] [-show] [-save] [-h]

This project analyses in game footage that indicates the optimal shot predictions using computer vision.

optional arguments:
  -br N, --ball_radius N         Radius of the pool balls (dependent on resolution, zooming and scaling).
  -hr N, --hole_radius N         Radius of the table holes (dependent on resolution, zooming and scaling).
  -bd N, --border_distance N     Distance from the centre of the holes to the outermost edge of the table.
  -tb type, --target_balls type  Choose ball type for path calculation.
  -ip file, --input_video file   File path containing the game footage to be analysed (*.MP4).
  -op file, --output_video file  File path for the output video (*.MP4).
  -sf N, --skip_frame N          Process a frame every N frame when analysing the video.
  -show, --show_video            Show the video while processing is being done.
  -save, --save_video            Save the video after the processing has finished.
  -h, --help                     Show this help message and exit.

8-ball-pool-analysis's People

Contributors

brandonabela avatar kidclone3 avatar keithgeorgeciantar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.