Friday, March 22, 2013

Test Kinect in Win7 x64 using x86 driver

In the previous posts [1][2] I tried to rebuild a VS project using Kinect given by my colleague and encountered some problems. Because my Win7 is the x64 version but the project had been built for x86 (Win32) platform, the rebuilding work in my Win7 machine cost me and my colleague almost a whole working day (without my colleague's help, I may give up the rebuilding).

Although I changed the project configuration to x64 [2], there were still problems with other libraries, for instance, OpenCV, built along with the project for x86 platform. When I was wondering the next step, my colleague suggested me to try the x86 driver of Kinect and if it works, just keep sticking on the Win32 setting of the project configuration.

Hmm, it seemed I had taken a long route and headed back to the origin... XD

Okay, the happy news is the x86 driver really worked in the x64 Win7, and here is a working log of the test.



Install OpenNI and Kinect driver


What we need is the OpenNI SDK and NiTE. I installed the Windows-x32 versions (OpenNI SDK v1.5.4.0 and NiTE v1.5.2.21).

The Kinect driver I installed is the SensorKinect by avin2. In the page you can find the x86 version for Windows: Bin/SensorKinect093-Bin-Win32-v5.1.2.1.msi

After the installation and connecting the Kinect to the PC, we can check whether the system has recognized the device via Device Manager as shown in Figure 1.

Fig 1. The system has recognized Kinect device

Test the driver with OpenNI samples

OpenNI provides sample code with compiled binaries in the installed directory. In my Win7, the path is as follows:
C:\Program Files (x86)\OpenNI\Samples\Bin\Release
I chose NiViewer.exe and got the test output as shown in Figure 2.

Fig 2. Test output of NiViewer

Summation


---
[1] 'WIN32': No such file or directory
[2] Change VS2005 project from Win32 to x64

No comments:

Post a Comment