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.