SimpleOpenNI x OpenCV on Processing

So this afternoon, I had some time at the school, and I really didn't feel like doing anymore illustrator presentations (I came to realize it is a really important side effect of being in a design school). A few days ago I came across a really great work about image projections on objects. As you can see on this video, their results are quite impressive:

Since I had access to both a Kinect and a projector I thought this could be a great little project. I didn't really get through, but I had time to write a little Processing snipplet which may come in handy: it goes through the Kinect depthmap , converts the point in a specific depth zone (say the top of your desk) into a black and white image, which is processed by the OpenCV blob detection. In the end, it project on the objects on your desktop the rectangle containing their shape. Nothing very complicated, but since the conversion from a Kinect object to an OpenCV object isn't obvious, it might be useful (didn't take any pictures, sorry!).

Get the code here! (you need SimpleOpenNI and OpenCV to make it work)