Ошибка в Libfreenect2 для Kinectv2
Я пытаюсь использовать libfreenect2
в Python 3.6 для получения матрицы глубины 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'