Skip to content

rominkevadiya/Madhav_Vision

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

7 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿชท Madhav Vision โ€” Shree Krishna AR

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.


Python OpenCV MediaPipe NumPy


๐ŸŒŒ What Is This?

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 Five Elements โ€” Design Philosophy

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.   โ•‘
โ•šโ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

โœจ Features

  • ๐ŸŽฅ 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

๐Ÿ› ๏ธ Tech Stack

Tool Role
Python 3.8+ Core language
OpenCV Video capture, drawing, blending
MediaPipe Hand & face landmark detection
NumPy Math, arrays, coordinate transforms

๐Ÿš€ Quick Start

1 ยท Create a virtual environment

python -m venv venv
source venv/bin/activate        # Linux / macOS
# venv\Scripts\activate         # Windows

2 ยท Install dependencies

pip install -r requirements.txt

3 ยท Run

python app.py

The window Krishna AR (Chakra + Mukut) will open. Point your index finger at the camera and look into it.


๐ŸŽฎ Controls

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

๐Ÿ—‚๏ธ Project Layout

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

๐Ÿ”ง Troubleshooting

ModuleNotFoundError: mediapipe.python

Your environment has a mismatched MediaPipe install. Fix it:

pip uninstall -y mediapipe
pip install mediapipe==0.10.21
python app.py
Camera 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

๐Ÿ’ก Tips for Best Experience

๐Ÿ•ฏ๏ธ 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages