Replace Your Face Just Like The Laughing Man

Updates below!

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

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!