Skip to content

Commit 89d0e5b

Browse files
committed
必须使用freenect或openni库
1 parent 1dde81a commit 89d0e5b

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

cv-Kinect深度相机/Xbox-Kinect-深度相机.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
- 安装驱动
99
- sudo apt install python-freenect
10-
10+
- 必须使用freenect或openni库
1111

1212
- 结果,截图
1313
![depth_image](depth_image.png)

cv-Kinect深度相机/camera.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def set(self, prop_id, value):
7272
self.cap.set(prop_id, value)
7373

7474

75-
if __name__ == '__main__':
75+
if __name__ == '__main__':# V4L2 not support
7676
callback = lambda gray, fps: cv2.imshow('gray', gray)
7777

7878
with Camera(0) as cam:

cv-Kinect深度相机/kinect.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66

77
"""
88
kinect.py:
9+
python3
10+
11+
result:
12+
Camera: 0x0, 0
13+
Grabs the next frame failed
14+
15+
必须使用freenect或openni库
916
"""
1017

1118
#!/usr/bin/env python
@@ -14,8 +21,8 @@
1421
import cv2
1522
import numpy as np
1623

17-
from .camera import Camera
18-
from .draw import Gravity, put_text
24+
from camera import Camera
25+
from draw import Gravity, put_text
1926

2027

2128
def main():
@@ -50,4 +57,4 @@ def callback(frame, depth, fps):
5057
# Using Kinect and other OpenNI compatible depth sensors:
5158
# http://docs.opencv.org/master/d7/d6f/tutorial_kinect_openni.html
5259
# OpenCV Python unable to access correct OpenNI device channels:
53-
# https://github.com/opencv/opencv/issues/4735
60+
# https://github.com/opencv/opencv/issues/4735

0 commit comments

Comments
 (0)