Skip to content
This repository has been archived by the owner on Jun 24, 2023. It is now read-only.

Latest commit

 

History

History
executable file
·
35 lines (20 loc) · 1.28 KB

README.md

File metadata and controls

executable file
·
35 lines (20 loc) · 1.28 KB

Juggle Counter

Date

May of 2020. Around the end of 9th grade school year.

What problem does this solve?

My brother is getting very good at juggling a soccer ball and he records himself to count how many he has done after finishing. As you progress, this number can be in the thousands. Counting this number of juggles by hand to see if you broke your PB is not that fun. Instead, this program counts the number of juggles for you. Automation.

Overview

side

The user selects the ball in order to track it with colors (HSV). The program runs quickly over the video and keeps into acount the ball's Y coordination with relation to the video's frame. After that's done, the program counts the number of peaks in the ball's coordinates, and that number is the number of juggles.

This programming just uses simple computer vision (color) to find and track the ball.

Tech stack

  • Python 3
  • OpenCV - tracking and locating the ball
  • SciPy - finding peaks
  • Matplotlib - plotting and graphing
  • NumPy - everything. NumPy is very useful

Reflection and project improvements

Go here.

How to run

OpenCV can either be compiled with CUDA or just CPU, works the same either way.

python3 src/counter_HSV.py path/to/juggling-soccer-ball-video.mov