Welcome to the Doctor Strange AR Filter project, where mysticism meets technology! This project leverages Python, Mediapipe, and OpenCV to create an interactive augmented reality (AR) filter inspired by Doctor Strange's spell-casting effects. The filter overlays magical circles onto real-time video, reacting dynamically to hand gestures.
- Hand Tracking & Gesture Recognition: Uses Mediapipe to detect and track hand landmarks, making it possible to overlay effects based on specific gestures.
- Real-Time Magical Circle Overlay: Overlays animated mystical circles on hand movements, simulating Doctor Strange’s magic.
- Smooth Performance: Optimized for real-time processing using OpenCV, ensuring smooth and responsive interaction.
main.py
: Contains the core application logic, initializing the webcam, processing frames, tracking hands, and applying AR effects.functions.py
: Provides helper functions for hand landmark processing, distance calculations, line drawing, and image overlay.
- Python 3.7+
- Mediapipe
- OpenCV
- Numpy
- Clone this repository:
git clone https://github.com/JeetRico/doctor-strange-ar-filter.git
- Install the dependencies:
pip install -r requirements.txt
Simply run the main.py
file:
python main.py
- Adjust camera settings and overlay parameters in
config.json
. - You can customize the rotation speed, line colors, and hand gesture sensitivity as per your preference.
config.json
: Customize camera, overlay paths, and line settings.overlays/
: Contains the magical circle images that overlay in real-time based on gestures.
Check out the demo on YouTube!
- GitHub: JeetRico
- LinkedIn: Jeet Banerjee