I’ve had the opportunity lately to try out some new technologies. The first is a C++ creative coding library from the Barbarian Group called Cinder. The other is Adruino, which will be the topic of some upcoming posts.
I specifically wanted to start using Cinder because I ultimately wanted to do some Kinect hacking. There is a Kinect CinderBlock that allows you get the Kinect up and running. Getting all the libraries installed and everything configured correctly can be rather involved, but mostly worth it. Check out my quick start to get set up.
There are two CinderBlocks that you can use to start getting motion detection into you project. The first one is Cinder OpenCV, which is basically blob based motion tracking. It finds the closest/brightest areas in the bitmap returned from the Kinect and gives you back a center and radius of the blob. The second is Cinder OpenNi which is is a motion tracking library that creates a skeleton of the user from the Kinect data. Extremely cool, you can imagine the possibilities.
Here’s a video demonstrating the skeleton tracking in OpenNI. First, I do the recognition pose (arms out to the side, hands up) and the app starts tracking my form. Next, I show how you can use the points returned to locate body joints. Finally, I did a simple image mapping to the hands.
The opportunity came along to build something interesting with Kinect for our staff meeting at Martin, but I only had a couple days. I thought it’d be cool to do a steamy window that you could wipe away the and see yourself through, like a bathroom mirror after a shower.
The effect is created using three layers. One is the video image with a blur shader applied to it. One is an unblurred video image that is only revealed where the fog is wiped away. The last layer is the transparent fog layer that is just an image. The layer’s bitmaps are iterated through and pixels and alpha’d out as needs. The drops that slide down are just an additional touch using the same technique.
I have a couple more ideas in the works that i hope to share with you soon. Thanks for stopping by.