I am trying to use OpenNI2 and NITE2 python bindings. I'm under Windows 7 and I have Kinect SDK1.8, OpenNI 2.2 and NITE 2.2 working without problems in Visual C++ with their 32 bits versions. I have python 2.7.5 32 bits.
Now, my intention is to translate some of the examples provided in NITE to python, but I still haven't found how to create a UserTracker without the program crashing (the same goes for HandTracker). I have been able to run the toy example provided (which doesn't make use of NITE). This is what I'm doing and the error I get -which I don't find very informative-:
In [1]: from primesense import openni2, nite2
In [2]: nite2.initialize()
In [3]: dev = openni2.Device.open_any()
In [4]: ut = nite2.UserTracker(dev)
---------------------------------------------------------------------------
NiteError Traceback (most recent call last)
<ipython-input-4-5be0b82b0a2b> in <module>()
----> 1 ut = nite2.UserTracker(dev)
C:\Python27\lib\site-packages\primesense-2.2.0.30_5-py2.7.egg\primesense\nite2.p
yc in __init__(self, device)
198 self._devstruct = _NiteDevStruct()
199 self._devstruct.device = device._handle
--> 200 c_api.niteInitializeUserTrackerByDevice(ctypes.byref(self._d
evstruct), ctypes.byref(handle))
201 HandleObject.__init__(self, handle)
202 _registered_user_trackers.add(self)
C:\Python27\lib\site-packages\primesense-2.2.0.30_5-py2.7.egg\primesense\_nite2.
pyc in wrapper(*args)
693 res = func(*args)
694 if res != NiteStatus.NITE_STATUS_OK:
--> 695 raise NiteError(res)
696 return res
697
NiteError: NiteStatus.NITE_STATUS_ERROR
I have already tried initializing the depth stream of the device before passing it to the UserTracker creator, but still doesn't work.
Has anyone been able to make NITE2 python bindings work? If so, is there something I'm missing?