Skip to content

Raghava44u/Harry-Potter-Magic-Cloak

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hie this is @Raghava4u

The Tech Behind the Magic

Webcam (The Eye of the Spell): This is your live camera, watching everything in real time. -Background Image (The Invisible World): Your background image that replaces your body once the magic happens. -HSV Color Detection (The Wizard’s Eye): This is how the computer knows to look for red—kind of like giving it a map of the color you want to disappear into. -Skin Masking (Face Guarding Spell): Stops your face from going invisible, because we all know we need to see where we’re going. -*Morphological Magic (Edge Smoothing Charm): Cleans up any messy cloak edges to make everything look super smooth. No one likes jagged edges on a cloak, right? -*Bitwise Magic (The Combining Spell): The secret sauce that lets the background and the cloak blend together. It’s the final touch to make everything seamless.

make sure : pip install -r requirements.txt

1: Webcam Setup
Take a current background pic and name it as image.jpg

First, you turn on your webcam. It's like opening the door to a magical world, where your computer starts seeing what’s around you. We’re about to get a sneak peek at some wizard-level trickery.

2: The Cloak Appears
Now, you load up your background image (think your favorite place — maybe you’re chilling in Home/Collage Hostals right?). The background resizes to match your webcam view. It’s like setting up your magic scene. A perfect stage for your invisible cloak to shine.

3: The Red Cloak Spell
You put on a red cloak (or any red cloth). The computer detects the color red. It's like the computer has a magical eye that can spot that exact red shade. The program is on the lookout for that color so it can make you disappear.

4: Face? No, Thanks!
We don’t want the magic to make your face disappear (no one’s ready for that just yet, right?). So, the program uses a special "skin filter" to ignore your face and focus on the cloak instead. It’s like your personal invisibility shield protecting your identity.

5: Clean Up Time
But wait—no one likes rough edges. The computer smooths out the detection by cleaning up the messy parts of the cloak (like fixing up a spell gone wrong). This makes the magic a lot smoother.

6: The Magic Trick
Here’s where the real magic happens: the red cloak blends into the background! It’s like a real invisibility cloak—your body becomes invisible, and all that’s left is the background showing through. Poof! You’re hidden, but still there. How cool is that? 7: The Grand Finale
Finally, the magic is displayed in all its glory. Your red cloak melts into the background, and your body goes invisible, all in real-time. It’s like you’re performing live magic!

When Can You Use It?

Show Off to Friends: Imagine you’re on a Zoom call and—boom!—you’re gone. You’ve turned into the ultimate magic trick. Perfect for Insta & Streams: Want to perform real-time magic tricks for your followers? This is your chance to show off your invisibility skills! Theme Parties: Ever wanted to become an invisible wizard at a party? Now you can! Make an entrance (or an exit) like never before. Learn Magic (aka Computer Vision): Yeah, this is tech, but it’s also a fun way to dive into learning about color detection and real-time video effects. It’s like casting a tech spell while learning how to make it work.

Fun Fact

Don’t worry if it doesn’t work perfectly every time—hey, even Harry Potter had some moments where the cloak didn’t work as expected. And hey, why stop at red? Maybe you’ll get curious and try other colors next. Who knows what magical color you’ll discover?

So, go ahead, test it out, and have fun turning into a real-life wizard. You’ve got the magic in you!

Thank You !

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages