Sunday, 15 March 2015

openni - Crash on Nite initialisation in python program written using primesense2.2.0.30-5 -



openni - Crash on Nite initialisation in python program written using primesense2.2.0.30-5 -

i using ubunut 14.04 , have installed openni 2.2, nite 2.2 , primesense2.2.0.30-5 (https://pypi.python.org/pypi/primesense/2.2.0.30-5)

the sample programme mentioned @ above site works quite when trying utilize initialize nite2 programme crashes.

here code:

from primesense import openni2, nite2 openni2.initialize() # can take path of openni redistribution nite2.initialize() if (nite2.is_initialized()): print "nite2 initialized" else: print "nite2 not initialized" dev = openni2.device.open_any() print dev.get_sensor_info(openni2.sensor_depth) depth_stream = dev.create_depth_stream() depth_stream.start() frame = depth_stream.read_frame() frame_data = frame.get_buffer_as_uint16() depth_stream.stop() openni2.unload()

error study :

traceback (most recent phone call last): file "test.py", line 4, in <module> nite2.initialize() file "/usr/local/lib/python2.7/dist-packages/primesense/nite2.py", line 81, in initialize ("\n ".join("%s: %s" % (dir, ex) dir, ex in exceptions)),) primesense.utils.initializationerror: nite2 not loaded: /home/user/project/kinect/nite-linux-x64-2.2/samples/bin/libnite2.so: /home/user/project/kinect/nite-linux-x64-2.2/samples/bin/libnite2.so: undefined symbol: nitedumpusertrackercalibrationdatatofile openni2-freenectdriver: closing device freenect://0

i want nite python bindings user tracking , hand tracking . did done before successfully

a workaround comment next lines in file _openni2.py primesense python bindings:

global _nitedumpusertrackercalibrationdatatofile _nitedumpusertrackercalibrationdatatofile = dll.nitedumpusertrackercalibrationdatatofile _nitedumpusertrackercalibrationdatatofile.restype = nitestatus _nitedumpusertrackercalibrationdatatofile.argtypes = [niteusertrackerhandle, niteuserid, ctypes.c_char_p]

also, create sure have copy/symlink of both nite2 library , folder (redist/nite2 in archive) in same directory python script.

openni primesense nite

No comments:

Post a Comment