Skip to content
This project focuses on predicting the final golf ball location after the ball is hit by the golfer with only one camera using Machine Learning Algorithms and Open CV.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github
__pycache__
Capture.JPG
LICENSE
README.md
final_show.py
fingraph.JPG
frame1.png
gif (1).gif
gif.gif
gif1.gif
gif3.gif
gif4.gif
gif5.gif
graph.JPG
motion.csv
params.csv
side_view_shot_16.mp4
side_view_shot_4.mp4
side_view_shot_6.mp4
side_view_shot_8.mp4

README.md

Golf Trail

This project focuses on predicting the final golf ball location after the ball is hit by the golfer with only one camera using Machine Learning Algorithms and Open CV.

Getting Strated

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.Some files are intentionally ommited to avoid direct copying my code. If anyone wants guidence they can mail me at utkarsh1148@gmail.com.

  1. To install the dependencies, you need to install the following:
  • python 3
  • openCV-python
  • numpy
  • mathplotlib
  • scipy
  • csv
  1. Capture the side view of the shot.

  2. Run final_show.py to get real time prediction.

Side Shot

  1. Mark the position of ball to create a contour over it.

  2. Press 'enter' to Continue.

  3. Optical Flow would mark 3 points on the ball and track the pixel coordinates.

OF

  1. Graph is plotted.

Graph

  1. Close that figure and you would get the final graph of the ball.

Final Graph

  1. This would give your final predictible position of the shot.

Factors Considered

  • Initial Speed
  • Angle of projection
  • Angle from Ground
  • Spin of the ball
  • Wind speed
  • Air drag
  • Magnus Effect
  • Coefficient of friction of ground
  • Ball Weight

Versioning

We use SemVer for versioning.

Contributing

Please feel free to contribute. We would love to see pull requests from you guys.

Authors

  • Prayag Lehna
  • Utkarsh Mishra
  • Abhishek Sikari
  • Pranav Magga
You can’t perform that action at this time.