Inspiration

One of the warmest memories I have of my childhood is reading Harry Potter with my father well past bedtime. I'm not alone: ask anyone born after the return of He Who Must Not Be Named what their Hogwarts house is-whether their acceptance letter came or not-and they'll be able to tell you. We may be in college now, schedules full of classes on circuits and code rather than divination and defense against the dark arts, but that doesn't mean the magic has to stop.

What it does

Expelliarmus! is an ode in code to our favorite childhood story. Using computer vision and infra-red LEDs, two aspiring wizards can battle it out by casing familiar spells. Land your attacks and counters with our custom hacker-style wands to knock out your opponent in a real-time duel!

How I built it

Deconstructed remotes and recycled pizza boxes provided the hardware for our custom wands. The "lumos" of infra-red they cast is then picked up by webcams running on each duelist's laptop. Wizards and witches match gestures for spells from the retro-style game interface to battle for supremacy. The first to miss their spell becomes vulnerable to a powerful finishing move: one of the three Unforgivable Curses.

Challenges I ran into

This project was originally going to use the Microsoft Kinect, but due to compatiblity issues, the swtich to a combination of OpenCV and a computer's native webcam was deemed necessary. This transition required a complete shift in how the wand's movement was registered- going from infra-red reflectors to infra-red emmeting LEDs. Computer vision and gesture recognition also proved to be rather difficult, though careful adjusting of parameters finally yeilded the accuracy we wanted.

Accomplishments that I'm proud of

No fires... yet! >:) Otherwise, getting the wands really and truly working as infra-red emitters was a big success. Gesture recognition was also a major milestone. We went from lines and circles being marked as similar to a program able to distinguish between nine distinct shapes.

What I learned

IR and CV!

What's next for Expelliarmus!

The world! Or maybe just a few new spells. :)

Built With

Share this project:

Updates