简体   繁体   English

华硕Xtion Pro Live和PyOpenni RGB

[英]Asus Xtion Pro Live and PyOpenni RGB

I am using PyOpenni in python to read data sensor from an Asus Xtion Live Pro. 我在python中使用PyOpenni从华硕Xtion Live Pro读取数据传感器。 All works like a charm if I try to read depth data: 如果我尝试读取深度数据,则所有操作都像一个咒语:

depth = DepthGenerator()
depth.create(context)
depth.set_resolution_preset(DefResolution.RES_VGA)
depth.fps = 30
context.start_generating_all()

while True:
     context.wait_one_update_all(depth)
     print depth.get_raw_depth_map_8()

This works fine even at 20-30 frame per second, but the problem is when I try to get the RGBImage with the same method: 即使以每秒20-30帧的速度运行也可以,但是问题是当我尝试使用相同的方法获取RGBImage时:

image = ImageGenerator()
image.create(context)
image.set_resolution_preset(DefResolution.RES_VGA)
image.fps = 30
context.start_generating_all()

while True:
     context.wait_one_update_all(image)
     print image.get_raw_image_map)

The program waits a lot stopped in the instruction 程序在指令中停了很多

 context.wait_one_update_all(image)

So I can get only, more or less, 2-3 frame per second. 因此,我每秒只能获得大约2-3帧。

Does anyone know why? 有人知道为什么吗?

Did you try to use: context.wait_any_update_all() ? 您是否尝试使用: context.wait_any_update_all() (takes no parameters) (不带参数)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM