I’d like to share two things with all of you.Â The first is a dark, personal secret.Â The second is a toy I made.
The secret is that for the past few months I have been harboring an unhealthy obsession with the Japanese television series ‘Ghost in the Shell: Standalone Complex.’
What I love about this show the most is one of the recurring bad guys, an impossibly-skilled hacker called the Laughing Man who exhibits a number of extremely bad-ass qualities.
First and foremost, he can hack in to people’s minds and control them.Â In the show, he uses this to carry out a series of political assassinations.
During these attacks, he also simultaneously hacks in to all security cameras and news feeds in the surrounding area, and blocks out the face of the person he’s currently controlling with a custom graphic.
This graphic is a smiley face with a baseball cap and a quote from Catcher in the Rye: “I thought what I’d do was, I’d pretend I was one of those deaf-mutes…”
Watching this show the other day, I suddenly realized that I could write a program that did face detection and substitution quite easily.Â Once I realized I could do it, I had to.
So I quickly whipped up a program in Processing that does the following:
1)Â Opens up a video camera (for example, the web cam in your MacBook).
2) Finds all faces in the frame using the OpenCV library for Processing (installation instructions here).
3) Replaces all faces with the Laughing Man graphic, borrowed from elmex over at ta-sa.org.
Try it out yourself!Â It’s minutes of fun for the whole family.Â Also, it could be useful in case you ever find yourself in control of some kind of video feed.
The hack-in-to-your-mind thing will have to wait for the time being…
Once you’ve got Processing and OpenCV for Processing installed, download laugh-0.2.tgz.
Update: I’ve merged in changes from the comments!Â Text now rotates and the image scales!Â Thanks to Josh, Brett, and Deltadesu!