siddharthlh24 / OpenCV-tennis-game-control

This project uses OpenCV for object tracking to control player position in Unity3d tennis game. Uses Colour tracking and UDP socket to transmit data

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OpenCV-tennis-game-control

This project uses python OpenCV for object tracking to control player in a tennis game. The player is tracked using colour based tracking. Lateral movement Data is sent to Unity3D over UDP.

Video link



Dependencies

  1. Unity...
  2. Python 3.7 with the following libraries ( Opencv , numpy )

How to do it yourself

  1. Get game : https://drive.google.com/file/d/1vjJqjmb__F4aycuzMgblkQp6clUmwgjf/view
    1.1) If the link ever goes down, I have uploaded the zip.
  2. Replace the player.cs file.
  3. Run python script, track something blue, then run game
  4. Yah no, that's pretty much it.

About

This project uses OpenCV for object tracking to control player position in Unity3d tennis game. Uses Colour tracking and UDP socket to transmit data


Languages

Language:C# 67.2%Language:Python 32.8%