Have you ever dreamed of wearing Harry Potter's Invisibility Cloak? Well, now you can experience a slice of that magic! Inspired by the wizarding world, I created this Python application to bring the charm of the Invisibility Cloak to life, along with a few extra spellbound features for all the modern-day wizards and witches!
- 🧥 Invisibility Cloak: Hide yourself in plain sight, just like in the movies!
- 💡 Lumos & Nox: Control screen brightness with voice commands.
- ⚡ Expelliarmus & Accio: Toggle the cloak's functionality using magic words.
- 🔥 Sectumsempra: Add a dramatic red filter to your screen (a touch of dark magic).
- 🔊 Amplificus & Minimus: Adjust system volume with the flick of a wand.
- ⚖️ Obliviate: Reset all magic effects to their default state.
- 📜 Guide: Display a detailed spell guide on-screen for your reference.
- ☠️ Avada Kedavra: Exit the application with one deadly spell. (Use responsibly!)
- Python 3.6 or higher
- Webcam and microphone
- Supported OS (Windows, Linux, macOS)
Clone the Repository
Run the following commands to clone the repository and move into the project directory:
git clone https://github.com/Parul-Srivastava/Invisibility-Cloak-and-Beyond.git
cd invisibility-cloak
Use the following command to install all the required libraries:
pip install -r requirements.txt
Before running the application, make sure your webcam, microphone, and screen brightness control are working as they should. This is your first step to mastering your magic!
After setting up the project, run the script by typing the following command in your terminal:
python invisibility_cloak.py
This will launch the application and open your webcam.
Once the webcam is open, a window will appear displaying the live feed from your camera.
Click on the color of your cloak in the video feed.
The application will capture the color you select and use it to hide you in the invisibility effect.
To capture the background (so the cloak blends seamlessly with your surroundings), press the 'b' key on your keyboard.
The captured background will be used to replace the cloak area, making you “invisible” in that part of the screen.
You can now use voice commands to interact with the application and cast spells. Speak clearly to activate different magical effects.
The recognized commands will control various aspects of the system:
- Brightness: Use "Lumos" to brighten the screen and "Nox" to dim it.
- Cloak Functionality: Say "Accio" to enable the cloak and "Expelliarmus" to disable it.
- Volume Control: Use "Amplificus" to increase volume and "Minimus" to decrease it.
- Other Spells: Say "Obliviate" to reset all spells to default, or "Guide" to view the spell guide.
To close the application at any time, use the spell "Avada Kedavra" or simply press the ESC key on your keyboard.
Spell | Functionality |
---|---|
Lumos | Set brightness to maximum. |
Nox | Set brightness to minimum. |
Expelliarmus | Disable the cloak effect. |
Accio | Enable the cloak effect. |
Sectumsempra | Add a red filter to the screen. |
Amplificus | Increase system volume. |
Minimus | Decrease system volume. |
Obliviate | Reset all spells to default. |
Guide | Display the spell guide. |
Avada Kedavra | Exit the application. |
Watch the magic unfold! Check out the demonstration video present in the repository to see the project in action.
Feel free to fork this repository and contribute your own enhancements, bug fixes, or spells. Submit a pull request and help expand the magic!
- The Harry Potter series for endless inspiration 🪄
- Python and OpenCV for making magic real in the muggle world
- OpenAI for the AI wizardry behind some of the magic in my tools
Enjoy your magical journey, and may your spells always be successful! 🎩✨