This project demonstrates motion analysis by detecting and calculating angles of human joints in real-time using a webcam. It utilizes OpenCV and MediaPipe for pose estimation.
Follow these instructions to get the project up and running on your local machine for development and testing purposes.
- Python 3.10 or higher
- pip (Python package installer)
-
Clone the repository
To get started with the project, first, clone the repository to your local machine.
git clone https://github.com/aleattene/motion_analysis.git
-
Set up a virtual environment
Navigate to the project directory and create a virtual environment.
python3 -m venv motion_analysis_venv
-
Activate the virtual environment
On Windows:
.\motion_analysis_venv\Scripts\activate
On macOS and Linux:
source motion_analysis_venv/bin/activate
-
Install dependencies
Install all the required dependencies using
pip
:pip install -r requirements.txt
To run the application, execute the main script:
python3 main.py
Once the application starts, it will use your webcam to detect and display the angles of your movements in real-time.
To exit the application, press the q
key.
Upon exiting, the last detected angle will be printed to the console.
This project is licensed under the MIT License - see the LICENSE.md file for details.