A real-time, devotional Augmented Reality experience built with OpenCV & MediaPipe. Channel the divine — wear the Sudarshan Chakra on your fingertip and the Peacock Mukut upon your brow.
Madhav Vision overlays two sacred Krishna symbols onto your live webcam feed:
| Symbol | Placement | Effect |
|---|---|---|
| 🔵 Sudarshan Chakra | Index fingertip | Spinning disc with depth shading, glow, and particles |
| 👑 Peacock Mukut | Forehead anchor | Face-width-aware divine crown |
Both overlays respond to your body in real-time — move your hand, the chakra follows; face the camera, the mukut appears.
The architecture mirrors the Pancha Mahabhuta — the five great elements of creation.
╔══════════════════════════════════════════════════════════════════╗
║ 🔥 AGNI — Fire / Energy ║
║ chakra/renderer.py ║
║ Spinning blades, depth shading, particles, specular light. ║
║ The chakra feels alive — it burns. ║
╠══════════════════════════════════════════════════════════════════╣
║ 💨 VAYU — Air / Motion ║
║ hand/tracker.py · face/face_tracker.py ║
║ Landmark smoothing keeps overlays stable across movement. ║
╠══════════════════════════════════════════════════════════════════╣
║ 💧 JAL — Water / Flow ║
║ app.py ║
║ The real-time loop — capture → track → render → blend. ║
╠══════════════════════════════════════════════════════════════════╣
║ 🌍 PRITHVI — Earth / Structure ║
║ Modular codebase — hand, face, chakra, mukut separated. ║
╠══════════════════════════════════════════════════════════════════╣
║ 🌌 AKASH — Ether / Presence ║
║ Gaussian glow blending gives divinity without hard edges. ║
╚══════════════════════════════════════════════════════════════════╝
- 🎥 Real-time webcam AR pipeline — 60 fps capable
- ☝️ Finger-driven Chakra — tracks index fingertip, activates when finger is open
- 👁️ 3D depth simulation — Z-axis tilt & size shift make the chakra feel volumetric
- 🌟 Particle emission — glowing sparks trail from the spinning disc
- 👑 Face-width-aware Mukut — crown scales with your face automatically
- 🪞 Selfie mirror mode — natural left/right interaction
- ⌨️ ESC to exit
| Tool | Role |
|---|---|
| Python 3.8+ | Core language |
| OpenCV | Video capture, drawing, blending |
| MediaPipe | Hand & face landmark detection |
| NumPy | Math, arrays, coordinate transforms |
python -m venv venv
source venv/bin/activate # Linux / macOS
# venv\Scripts\activate # Windowspip install -r requirements.txtpython app.pyThe window Krishna AR (Chakra + Mukut) will open. Point your index finger at the camera and look into it.
| Action | Result |
|---|---|
| Show open hand | Hand landmarks activate |
| Extend index finger | Sudarshan Chakra appears at fingertip |
| Face the camera | Peacock Mukut aligns to forehead |
| Press ESC | Exit |
Madhav_Vision/
├── app.py ← 💧 JAL — main loop
├── requirements.txt
│
├── chakra/
│ └── renderer.py ← 🔥 AGNI — chakra drawing & particles
│
├── crown/
│ └── mukut_renderer.py ← 🌌 AKASH — mukut overlay & glow
│
├── face/
│ └── face_tracker.py ← 💨 VAYU — face landmark tracking
│
└── hand/
└── tracker.py ← 🌍 PRITHVI — hand landmark tracking
ModuleNotFoundError: mediapipe.python
Your environment has a mismatched MediaPipe install. Fix it:
pip uninstall -y mediapipe
pip install mediapipe==0.10.21
python app.pyCamera not opening
- Close any other app using your webcam (Zoom, Teams, browser)
- Re-run from the project root directory
- On Linux, check camera permissions:
ls -l /dev/video*
Chakra not showing
- Ensure your index finger is clearly extended and visible
- Good lighting helps MediaPipe detect landmarks accurately
🕯️ Use in a well-lit room — MediaPipe tracks better with good contrast. 🖐️ Keep your hand fully visible — all 21 landmarks need to be in frame. 👁️ Look directly at the camera for the Mukut to align to your forehead.
For fun and learning purpose only.
Built with devotion. Powered by code.