A real-time computer vision application that creates the illusion of invisibility using a solid blue-colored cloak and background subtraction techniques. Built with OpenCV and PyQt5 for an interactive GUI.
📷 Live Webcam Feed
→ Real-time video stream using OpenCV embedded in PyQt5.
🧥 Invisible Cloak Effect
→ Hides cloak based on blue color detection.
🧼 Noise Reduction
→ Smoothens mask with morphological operations (open → dilate → erode).
🖼️ Background Capture
→ Captures a clean, averaged background over 60 frames.
🔁 Mirror View
→ Flips video horizontally for natural webcam behavior.
💬 Voice Feedback
→ Text-to-speech guides user during background capture.
🌗 Lighting Detection
→ Skips background capture if lighting is too low.
🎨 Dark Mode GUI
→ Modern interface with a dark theme and live video preview.
.
├── main.py # Entry point – launches the GUI
│
├── cloak/ # Core cloak effect logic
│ ├── cloak.py # Cloak blending logic
│ ├── capture.py # Webcam capture and mask generation
│ └── utils.py # Helper functions (e.g., brightness checks)
│
├── ui/ # User interface components
│ └── window.py # Main application window using PyQt
│
├── styles/ # Custom themes or stylesheets
│ └── dark_theme.py # Dark theme stylesheet
│
├── assets/ # Static resources
│ └── harry-potter-invisible.gif # Demo GIF, icons, images
│
└── README.md # Project documentation git clone https://github.com/yourusername/opencv-invisibility-cloak.git
cd opencv-invisibility-cloak pip install -r requirements.txt python main.py- Use a solid blue-colored cloak.
- Ensure even lighting — avoid shadows or reflections.
- Capture the background without the person.
If you found this project helpful or interesting, please consider giving it a ⭐️ on GitHub — it motivates and helps others discover it! ✌️
ENJOY! 🎉
