openni2 python
时间: 2023-09-25 11:14:45 浏览: 187
回答: 在Python中使用openni2库进行openni2的测试代码如下所示:
```
from openni import openni2
import numpy as np
import cv2
if __name__ == "__main__":
openni2.initialize()
dev = openni2.Device.open_any()
print(dev.get_device_info())
```
这段代码首先导入了openni2库和其他必要的库,然后通过`openni2.initialize()`初始化openni2。接着使用`openni2.Device.open_any()`打开任意一个可用的设备。最后通过`dev.get_device_info()`打印设备信息。<span class="em">1</span>
#### 引用[.reference_title]
- *1* [(17)深度点云学习--python安装openni打开奥比中光RGBD](https://blog.csdn.net/chencaw/article/details/128282578)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文