Skip to content

iam-salma/InvisibilityCloak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Invisible Cloak Gif

Harry Potter - Invisibility Cloak

Stars Forks Issues Pull Requests Last Commit

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.


✨ Features

📷 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.


📂 Folder Structure

.
├── 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

Getting Started

1. Clone the repo

    git clone https://github.com/yourusername/opencv-invisibility-cloak.git
    cd opencv-invisibility-cloak

2. Install dependencies

    pip install -r requirements.txt

3. Run the app

    python main.py

👉 Tips for Best Results

  • 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! 🎉

About

Make yourself disappear !

Topics

Resources

License

Stars

Watchers

Forks

Languages