Kinectv2的Libfreenect2错误

问题描述 投票:1回答:1

我正在尝试在python 3.6中使用libfreenect2来获取Kinectv2的深度矩阵。但是有一个错误。看一下代码。

import freenect2
import cv2

import numpy as np

"""
Grabs a depth map from the Kinect sensor and creates an image from it.
"""


def getDepthMap():

      depth, timestamp = freenect2.get_depth()

      np.clip(depth, 0, 2**10 - 1, depth)
      depth >>= 2
      depth = depth.astype(np.uint8)

      return depth

while True:
      depth = getDepthMap()

      blur = cv2.GaussianBlur(depth, (5, 5), 0)

      cv2.imshow('image', blur)
      cv2.waitKey(10)

错误-module 'freenect2' has no attribute 'get_depth'

python-3.x ubuntu-16.04 kinect-v2 libfreenect2
1个回答
0
投票

兄弟,我也面临有关freenect2的问题。您能解释一下如何在python 3.7 Windows 10中安装软件包的步骤。我进行了过多搜索,但未找到任何合适的解决方案。谢谢

© www.soinside.com 2019 - 2024. All rights reserved.