Skip to content

Latest commit

 

History

52 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MocapV2 - Computer Vision Motion Capture

License: MIT Personal Use

MocapV2 is a Python-based motion capture system that utilizes computer vision techniques, primarily leveraging OpenCV, to detect and track infrared (IR) markers attached to objects in real-time.

Table of Contents

Overview

MocapV2 aims to provide an accessible motion capture solution using readily available hardware, such as standard webcams. The system analyzes video input frame by frame, identifies IR markers, and estimates their 3D positions.

Originally developed for tracking studio cameras, MocapV2 can also be used for general motion capture applications. The modular architecture facilitates easy extension and integration into larger projects.

Features

  • Real-time Tracking: Detects and tracks IR markers from a video stream.
  • OpenCV Integration: Uses OpenCV for video capture, image processing, and tracking.
  • Visual Feedback: The GUI displays camera feeds and allows real-time parameter adjustments.
  • Realtime Socket Communication: The calculated object transformations can be transmitted via sockets, enabling integration with applications like Unity 3D, Unreal Engine, and Blender.
  • Modular Codebase: Organized structure for ease of development and scalability.

Tech Stack

  • Language: Python 3.x
  • Core Libraries:
    • OpenCV (opencv-python) - Video capture, image processing, and display.
    • NumPy - Efficient numerical computations.

Installation

Follow these steps to set up the project:

1. Clone the Repository

git clone https://github.com/RashmikaDushan/MocapV2.git
cd MocapV2

2. Create a Virtual Environment (Recommended)

Using venv:

python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

Using conda:

conda create -n mocapv2 python=3.9  # Adjust Python version if needed
conda activate mocapv2

3. Install Dependencies

pip install opencv-python numpy

Note: Depending on your OS and Python version, OpenCV might require additional system dependencies.

Usage

To run the real-time motion capture demo:

  1. Ensure that at least two webcams are connected and accessible.
  2. Navigate to the project's root directory:
    cd MocapV2
  3. Activate the virtual environment (if not already activated).
  4. Run the main application script:
    python app.py

A window will open, displaying the webcam feed with settings in real-time. Press Esc to close the program.

Contributing

Contributions are welcome! To contribute:

  1. Fork the repository on GitHub.
  2. Clone your fork:
    git clone https://github.com/YourUsername/MocapV2.git
  3. Create a new branch:
    git checkout -b feature/your-feature-name  # or bugfix/issue-description
  4. Make changes and commit:
    git commit -am 'Add feature X'
  5. Push changes:
    git push origin feature/your-feature-name
  6. Open a Pull Request (PR) on the original repository.

Ensure your code follows best practices and update documentation if needed. You can also report bugs or suggest features by opening an issue on GitHub.

License

This project is licensed under the MIT Personal Use License.

You may use and modify this software for personal, non-commercial purposes only.

For full details, refer to the LICENSE file.

Acknowledgements

About

Real-time IR marker motion capture (mocap) using Python & OpenCV. Calculates 3D positions from multiple webcams & streams transform data via socket.

Topics

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Contributors

Languages