V

Avatar



OpenNI Block of Code

OpenNI, a library created by PrimeSense. It’s quite famous for its ability to use the Kinect to track users and feed us with a usable skeleton per user. Since i wanted to give this a try and play around with the skeleton tracking i had to have this. So i did. In the end i ended up with a wrapper around this API. It’s open-source and available to everyone. Its not perfect and needs work and more features, but it’s just a start. Use it at your own risk and with your favourite creative framework. It’s possible.

You can find it at github.





CLNUI 4 Java (Kinect)

Kinect is a new product from Microsoft for XBox360. With an RGB camera, a 3D depth sensor (structured IR light) and  a multi-array microphone , it is able to compute a depth map, something very interesting for the interactive world of creativity and gaming. Nothing new as technology, but still, interesting and cheap. Since its release people have been trying to work in order to hack it and get it to work with windows and mac OS. Quite a few people have been working on drivers and a way to hack the gadget to get access to the color/depth data. One of these people is called Alex from Code Laboratories, the man behind the PS3eye camera drivers for PC’s. Recently, he released a new package (C and C#) that includes drivers and SDK for Kinect. I took the SDK and with  JNA i wrote a library for java that wraps the original one and also tries to make its use easy for starters.

A very early release is available http://victamin.googlecode.com/files/CLNUI4J_01.zip. This might or might not work out-of-the-box and it sure needs improvement and more work, but as they say, release early, release often. This package includes the library and basic examples running on Eclipse IDE and processing IDE (untested). It is known that this library does not work directly with Processing.

EDIT! Version 0.2 is now available at: http://victamin.googlecode.com/files/CLNUI4J_02.zip.
You can now find a friendly wrapper and a couple of examples to get you started.

I would love to get some feedback, so if you’re a Kinect owner and you’re into java/processing, give it a  spin and let me know how it works out for you.

Have fun.





MSAOpenCL for Java and Processing

Recently I have been doing some work with OpenCL and i found myself messing up with old code and re-writing most of it .  At first it was interesting and quite funny but no more, so,  I thought it was time to make things easier for myself and just make things reusable by creating a wrapper which would wrap most of the boring and time-consuming parts. This would be a wrapper on OpenCL for Java and/or Processing. Well, a well known guy named Mehmet “Memo” Akten has done such a wrapper in C++ for the OpenFrameworks and Cinder libraries. I have ported it  to Java.

There are some problems with reading/writing from/to GL textures. For some reason it crashes on me. I have been working with JavaCL‘s author, so hopefully it will be working soon.

:: Download

Download it, install it and try it.
If you find any problems or if you have suggestions, let me know.

Have fun.





JavaCL, the new OpenCL4Java

I have noticed that OpenCL4Java is on version 1.4beta by now and that my examples were crashing when running on a GPU device. Today i took the time to do something about it. I have downloaded the new version and have updated the examples to run with 1.4beta. Everything seems to work just fine now, if you have a different opinion, please do let me know.

Download: http://victamin.googlecode.com/files/JavaCL_1_4b.zip

Have fun!





OpenCL 4 Java & Processing

I finally took  the time to play with OpenCL. I was motivated by the particle example from Rui Madeira. After speaking with him, he gave me a few other links on more examples like Memo Akten‘s 1.000.000 particles running with mouse interaction on the GPU, the very NVidia’s first OpenCL application example, etc. I was intriged!  So i took the day to play with OpenCL4Java and ported Rui’s example to Java running on Processing’s IDE.  I’ve tested it with a Intel Quad core and i found the Rui’s sample to crash with GTX280 videocard. I didn’t gave it much thought but it might be for that for-loop in the program on the particle-particle iteration. In the other hand, Memo’s example ran easily on the gpu side. I should have made an example of mine, but it was easier to just port their examples and get things running. That was the main goal.

I have only tested this under Windows XP 64bit with ATI Stream SDK and Nvidia drivers. If you find any problem, please report.
One other thing: Memo’s example isn’t the real thing. It’s simply the CL program. So you won’t be able to get all the fuzzy million particles around. Not yet.

Library/Examples available here: http://victamin.googlecode.com/files/OpenCL4Java_1b.zip

Installation steps:
1. Copy the library to processing’s libraries folder
2. Install ATI Stream SDK (i have packed the OpenCL.dll file, still you might have to install the whole pack). If you’re using Nvidia, install the OpenCL drivers and toolkit
3. Open the example and run it.

Enjoy and have fun!