Main Page
Namespaces
Classes
Files
File List
File Members
wrappers
python
demo_cv_async.py
Go to the documentation of this file.
1
#!/usr/bin/env python
2
import
freenect
3
import
cv
4
import
frame_convert
5
6
cv.NamedWindow(
'Depth'
)
7
cv.NamedWindow(
'RGB'
)
8
keep_running =
True
9
10
11
def
display_depth
(dev, data, timestamp):
12
global
keep_running
13
cv.ShowImage(
'Depth'
,
frame_convert.pretty_depth_cv
(data))
14
if
cv.WaitKey(10) == 27:
15
keep_running =
False
16
17
18
def
display_rgb
(dev, data, timestamp):
19
global
keep_running
20
cv.ShowImage(
'RGB'
,
frame_convert.video_cv
(data))
21
if
cv.WaitKey(10) == 27:
22
keep_running =
False
23
24
25
def
body
(*args):
26
if
not
keep_running:
27
raise
freenect.Kill
28
29
30
print(
'Press ESC in window to stop'
)
31
freenect.runloop(depth=display_depth,
32
video=display_rgb,
33
body=body)
demo_cv_async.display_rgb
def display_rgb(dev, data, timestamp)
Definition:
demo_cv_async.py:18
demo_cv_async.display_depth
def display_depth(dev, data, timestamp)
Definition:
demo_cv_async.py:11
demo_cv_async.body
def body(args)
Definition:
demo_cv_async.py:25
frame_convert.pretty_depth_cv
def pretty_depth_cv(depth)
Definition:
frame_convert.py:21
frame_convert.video_cv
def video_cv(video)
Definition:
frame_convert.py:42
libfreenect
Author(s): Hector Martin, Josh Blake, Kyle Machulis, OpenKinect community
autogenerated on Thu Jun 6 2019 19:25:38