ubuntu python 通过奥比中光摄像头获取深度图片和彩色图片
1. 依赖
安装Openni Openni下载Openni添加至环境(要通过全局变量找到Openni头文件和库) 安装primesense和openni
pip install primesense pip install openni
2. Python代码
from openni import openni2
import numpy as np
import cv2
def mousecallback(event,x,y,flags,param):
if event==cv2.EVENT_LBUTTONDBLCLK:
print(y, x, dpt[y,x])
if __name__ == "__main__":
openni2.initialize()
dev = openni2.Device.open_any()
共有 0 条评论