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]
I did the same thing (albeit a bit more kludgey) this summer using the same OpenCV library and python. Check it out at http://code.google.com/p/warai/ , or at http://bespokeblog.wordpress.com/2008/07/27/laughing-man-code-warai/ . I considered using Processing, but I like python more ;)
Love it!
That is sweet. Now to get the hack out to surveillance systems. I love GiS
Would have been nice if you mentioned it was written in Java.
I must admit, I flipped my shit for a second or two when I pulled up the back and was greeted by logo.
Dan, he said it was written in Processing.
http://www.processing.org/
GITS is one of the best anime series ever produced, this is totally awesome!
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?
i am also getting the same problem, need help
Last I tried to use OpenCV in Ubuntu it crashed like nutz because of a bug in the Linux kernel.
Bastards!
So much win I love it ^_^ Should try this out on the school’s camera system.
Cool, now i have something to match my Shirt.
@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.
Ghost in the Shell was great, and projects like this just increase the entertainment value. :)
Using a Creative webcam with their Advanced Video Effects software, you can download this program http://www.mylivecam.com/howtos/article.aspx?id=70078&page=1 to create your own effect doing the same mask thing.
Sweet, love GITS SAC, I considered doing this a few weeks ago, but looks like someone beat me to it :P
great job!
Can’t get it to work :/
Using Windows XP… says it can’t find the openCV library after I installed it.
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.
@TheKhakinator
make sure you have your opencv/bin directory in your PATH variable. my installer claimed to do so, but did not.
http://idisk.mac.com/barrywoods/Public/hackaday/hackaday_man.tiff
@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
i tried both but nothing work for me
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
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?
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 :)
crap i cant get this to work i keep getting a error message saying that,
Does anyone know what that means?
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?
@fang:
did you install the opencv correctly?
Thanks, Ben.
And yeah that absolute thing needs \\ to work.
heh its fun xD
@Julien
I believe so. Ive redone it just to make sure and i get the same problem
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?
@ 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?
@guy
make sure you copied the right file, there is also one called haarcascade_frontalface_alt_tree.xml
You can’t normaly see the _tree part
@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.
Hi guys! Thanks for your interest!
I’ve updated the script with some user suggestions. Now the text rotates and the image scales! Check it out: http://awgh.org/files/laugh-0.2.tgz
Future work: Get OpenCV to work on profiles as well and work out some of the flicker bugs!
Honestly? This is one of the sample programs that comes with openCV, only instead of placing a box around the face, he places an image.
Sorry, just not impressed.
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.
You’re funny!! Lol!
@linus your annoying
Nice work man but im trying to make the same effect with a video but the video show it so slow and there is any sound could you help me please ?????
javierdpp@gmail.com
http://kougaku-navi.net/koukaku.html
this app is much older and has been around for alot longer.
@jojo
Learn how to use “your” and “you’re”.
‘you’re’ = you are,
‘your’ = possessive pronoun, means that something belongs to you
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?
I’ve created a sketch that also does this, but uses the latest openCV (2.3) and processing 1.5.1 for windows.
It’s a Frankenstein bit of code, but it works fine, so I thought I’d share. Here’s the code and some installation tips:
http://pastebin.com/biei1LZ9
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
I copied this “OpenCV.CASCADE_FRONTALFACE_ALT.xml
into the same directory as the laugh script”. Now there is no error but cam shows a black screen only no image is there
For those of us whom are still interested in this. http://note.sonots.com/Software/FaceOcclusion.html#le84b0da
He has made this an executable. (I have not tried this yet.)
Aw, this was a really good post. Spending some time and actual effort to
make a top notch article… but what can I say… I hesitate a lot and don’t
seem to get anything done.