Python で PyOpenni を使用して、Asus Xtion Live Pro からデータ センサーを読み取ります。深度データを読み取ろうとすると、すべてが魅力的に機能します。
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()
これは毎秒 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)
プログラムは命令で停止して多くの待機をします
context.wait_one_update_all(image)
したがって、多かれ少なかれ、毎秒2〜3フレームしか取得できません。
誰かが理由を知っていますか?