Quantcast
Channel: IT Security Lab » Delphi Kinect example
Viewing all articles
Browse latest Browse all 2

Having Fun with Kinect and Delphi (examples of 2D and 3D visualization)

$
0
0

Well well well... All signs in the Sky and on the Earth clearly say: it's a Christmas time! So it's time to have some rest and fun, and definitely nothing can be better then to spend some time with family and a new toy. ;-) Actually it's my son who got the XBox with the Kinect, but well... let parents have some fun too, right!

It's not like I am trying to reinvent the wheel (there are plenty of applications using Kinect on PC), but recently I did not find any nice examples of how this incredibly cool thing can be used with Delphi. And you don't think I can leave it "just like that", don't you? ;-) So see the results below (video) and so more technical details of both applications (2D and 3D visualization). So as for today there will be no hacking, boys and girls, but just pure awesome 3D-virtual-reality joy... :-)

Ok, so you want to try to get those samples tweak them probably and run your own code? There is nothing more simple:

Prerequisits:

Everything is installing like a charm. Some subtle obstacles with GLScene, but nothing too complicated to be mentioned really. Important: Before you run anything - be sure that the Kinect device is recognizable by your computer (check it in you Device Management panel).

Ach, almost forgotten: take the source files of my applications from here:

Running all that stuff

Now you can try to compile and test both applications. More details about how those application can be used you have already seeing in the movie. Pre-compiled exe files are already included into ZIP packages, just for your convenience. So at the end this is what we have:

2D data visualization

The experiment showing how to collect, process and draw the Kinect's data on the screen. Rather typical,- you've seen it before for sure. Additional challenge was to write a function which would be able to "track  blobs" - areas on the screen with similar pixels. This is needed to track your hands, fingers, nose or whatever you want to use. It is far far from ideal, but surprisingly works!

One more remark: this DOF function, selecting pixels in certain 3D range - is a part of the application, not the Kinect hardware.

I also hope you will forgive me such eeee... "untypical" way of getting depth data from pixel's color by such innocent transformation: RGB -> HLS -> [custom function] -> range [0..255]

3D data visualization

You can see my room (and actually yours too) in 3D in wobbling 3D virtual screen, containing tiny colorful dots :-) Do you like my Xmass tree?

So you see, Delphi is so nice and (important!) easy language (appropriate for lazy coders), so even writing pretty complex applications can take you just couple of hours. I also hope now even more people will start playing with Kinect and do some cool things, [so more happiness will come on Earth this Christmas, etc, etc.]. Remember: You are the controller®. Amen. :-)

Special thanks for Simon J Stuart for his TKinect Delphi component
and for Jet Noir (http://soundcloud.com/jet-noir) for her music for the video!

This is it. Let me know it you like those crazy apps, and well... Have a nice Christmas and a happy New Year! :-)


Viewing all articles
Browse latest Browse all 2

Trending Articles