openni2和nite2 python绑定
primesense的Python项目详细描述
OpenNI2的正式PrimeSensepython绑定 以及NiTE2。
这个包只提供python绑定;请确保首先安装openni(以及可选的nite)。
示例:
from primesense import openni2 openni2.initialize() # can also accept the path of the OpenNI redistribution dev = openni2.Device.open_any() print dev.get_sensor_info() 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()
注意
有关文档,请参阅C API