โจ Ever wished you could disappear like Harry Potter under his invisibility cloak?
With this Python + OpenCV project, you can! It detects a specific color (like red) and replaces it with the background in real time โ creating an invisibility illusion using your webcam.
- Captures the background frame
- Detects the cloak color using HSV masking (e.g., red)
- Masks the cloak and replaces it with the saved background
- Real-time display makes the person appear invisible!
- Python ๐
- OpenCV ๐ฅ
- NumPy โ
- (Optional)
playsoundfor magical sound effects โจ
git clone https://github.com/sandhya-tomar/InvisibilityCloak.git
cd InvisibilityCloak
pip install -r requirements.txt
๐ฎ Run the App
python app.py
๐งฅ Wear a red cloak (or any target color set in code) ๐ฅ Stand in front of your webcam ๐ช Watch yourself disappear!
Press q to quit.
๐ References & Credits Inspired by Harry Potterโs iconic invisibility cloak ๐งโโ๏ธ Based on tutorials by CodeWithHarry, Murtaza's Workshop, and OpenCV docs
๐ค What I Learned Real-time video capture with OpenCV
Color detection using HSV space
Masking and bitwise operations for creative effects
Blending creativity with code = โจ MAGIC โจ
