Laughing Man In Processing

laughing_man

The Laughing Man is the antagonist from the anime series Ghost in the Shell: Stand Alone Complex. During each of his public appearances in the series he manages to hack all video feeds/cyborg eyes in the vicinity to obscure his face with the logo above.

[Ben Kurtz] had been watching the series recently and realized he could put together a similar effect using Processing. The interesting bit, and what makes this more fun than a simple demo, is that he’s using the OpenCV library. OpenCV is a open source computer vision library. [Ben] uses it to handle the facial recognition in Processing and then apply the image.

It’s only 100 lines and we wonder what other fun tricks could be employed. Here’s a Hack a Day skull you can swap in for the logo.

[thanks dakami]

50 thoughts on “Laughing Man In Processing

  1. sorry, noob here, when I run the code I get a video window to open, but no face recognition. The bottom window says:

    The haar classifier cascade file ‘haarcascade_frontalface_alt.xml’ can not be found in folders, you must specify the full path instead.

    any ideas?

  2. @zorink

    Change the text:

    OpenCV.CASCADE_FRONTALFACE_ALT

    to

    “C:\\Program Files\\OpenCV\data\\haarcascades\\haarcascade_frontalface_alt.xml”

    include the quotes, and remember to double the backslashes. If that doesn’t work, find where you installed the OpenCV facial recognition profiles and put that in instead.

  3. Sweet! but remember that in GitS SAC, the text around the logo scrolled… someone called deltadesu posted an updated animated version on the comments. He says it’s low res, though.

  4. @ben

    that didn’t work either, it didn’t like the \ character

    I finally got it to work by copying the OpenCV.CASCADE_FRONTALFACE_ALT.xml
    into the same directory as the laugh script

    1. processing said OpenCV.CASCADE_FRONTALFACE_ALT.xml cannot be resolved or is not a field.
      and i don’t understand this “copying the OpenCV.CASCADE_FRONTALFACE_ALT.xml
      into the same directory as the laugh script”.
      thanking you in advance

  5. ok so i got this working, but (sorry if this is noob, this is my first experience with processing) how would i go about incorporating this into iChat when i video chat with people? would i have to extract the application to some where in the libraries of Ichat where it would run when the video chat was triggered?

  6. Hah, awesome. I did the same thing with an apple a while back so as to create my own digital version of the “son of man” painting.

    Incidentally, in case anyone is interested, I’m going to be putting up some Processing + OpenCV tutorials on my site probably some time in the next week :)

  7. crap i cant get this to work i keep getting a error message saying that,

    the package “hypermedia” does not exist. You might be missing a library.

    Does anyone know what that means?

  8. Dreamy idea, hardly yet achievable, would be to couple openVC with things like unwarp-mosaic (from siggraph 2008) and then write code automatically morphing all faces in a videoe.g. to smile like joker or aphex twin. Anyone knows of things similar in effect to unwarp-mosaic?

  9. @ Zorink

    I did what you said, by copying the OpenCV.CASCADE_FRONTALFACE_ALT.xml
    into the same directory as the laugh script. Now it opens my webcam, but doesn’t display the logo on my face. Know how to fix this?

  10. @chaostheory
    Well I found haarcascade_frontalface_alt_tree.xml, it was in C:/Program Files/OpenCV/data/haarcascades/haarcascade_frontalface_alt.xml. Now what am I supposed to do with it? I tried moving it into the same directory as the laugh folder but that didn’t do anything. I feel like such a newb.

  11. SERIOUSLY. WHO THE FUCK DID THIS STUPIF PROGRAM?
    IT FUCKING WANNABIE “CRASHES” MY GOD DAMN SERVER.
    no this is not funny, thanx to that fucking idiot who made this i’ve lost 200$ usd.

    The one who did this deserves a bulldozer up his/her ass.

    If i ever get your name ill sue you. Good luck.

  12. I have been trying on and off for a year to get
    OpenCV working with Processing sketches.

    I always get:
    The package “Hypermedia” does not exist etc etc warnings on compile.

    Many others have had similar problems – there’s a thread that has been discussing the problem for over a year, with no solution apparent:
    http://processing.org/discourse/yabb2/YaBB.pl?num=1238338691/0

    I have tried all the suggestions on this thread, and many others, on four different Windows XP machines, with every version of OpenCV ever released.
    I can’t get the darn thing to work.

    Is anyone clever enough to have a solution?

  13. processing shows this OpenCV.CASCADE_FRONTALFACE_ALT.xml cannot be resolved or is not a field.
    and i don’t understand this “copying the OpenCV.CASCADE_FRONTALFACE_ALT.xml
    into the same directory as the laugh script”.
    thanking you in advance

Leave a Reply to BlindCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.