Tuesday, December 13, 2011


I've tried to upgrade to the new unstable OpenNI version ( The installation was okay (had to restart because OpenNI didn't find an environment variable, but then it worked).

Everything seemed to run when I started the sample project from Visual Studio. But when I executed the compiled CCT.NUI.Samples.exe I only got an exception (nullreference exception because the pointer to the depth data is IntPtr.Zero). When I catched the exception the result was only noise:

I don't know why this happend but I guessed it might have something to do with the fact that I've got a 64bit machine but installed the 32bit version (this used to work with the stable version when I set the build output to x86).

After installing the 64bit version everything seems to work now. I've commited this version to CodePlex. The published binary will now also be compiled to run on 64bit.

To upgrade OpenNI follow the instructions given here: Avin KinectSensor

Download [Source] or [Binary]


  1. a quick feedback
    I run the binary on my 64bit machine, i installed the 32bit openni/avin sensor on it, version ( /
    It could run perfectly, however sometimes it crash when switching between rgb and depth image.

    I also tried the binary on my 32bit machine with same openni/avin installation, it just crash whenever i click rgb or depth image. (sometimes it show some noise)

  2. Maybe it's because it's the unstable version... don't know. I could run the OpenNI samples though; I'll investigate more if I find time.

  3. for 64bit machine, do u recommend installing 64bit or 32bit openni?
    I tried 64bit openni before, but i cannot run my own vs project. I am not sure where is the problem, maybe is the references. Running the openni samples has no problem though.
    So I tried install 32bit openni in 64bit machine and thank god it works. So i never look back

  4. Usually you should install 64bit versions on 64bit machines. I think it didn't work for me either sometime, but now it does.
    I'm not sure if I should compile a 32bit version too, but I don't have any 32bit machine to test it anymore. Might have to start using VMs.

  5. I initially could not run the 32-bit version, but after I switch the config.xml (copy and rename form the SamplesConfig.xml), I am now able to run 32-bit version. I don't know if this helps or not.

  6. Hi Anonymous

    Thanks for the hint! I'll look into it!