想用python控制3D物体

问题描述 投票:0回答:1

enter image description here当我运行这个时,两个窗口都不会并排打开

from ursina import *
import tracker


# define a video capture object 

app = Ursina()
player = Entity(model='cube', color=color.orange, scale_y=2)
if app.run():
    tracker.track()
app.run()

追踪器代码

import cv2

def track():

 vid = cv2.VideoCapture(0)
 
 while True:
 
     ret, frame = vid.read() 
     cv2.imshow('frame', frame) 
       
     # the 'q' button is set as the 
     # quitting button you may use any 
     # desired button of your choice 
     if cv2.waitKey(1) & 0xFF == ord('q'): 
         break
   
 # After the loop release the cap object 
 vid.release() 
 # Destroy all the windows 
 cv2.destroyAllWindows() 

track() 

请有人告诉我我可以做这个吗

我想制作一个可以用手势控制3D物体的应用程序

opencv 3d gesture ursina
1个回答
0
投票

当我运行这个时,两个窗口都不会并排打开 侧面

就像这样:

片段:

def run():
    app.run():
    tracker.track()

if __name__=='main':
    run()
© www.soinside.com 2019 - 2024. All rights reserved.