本文整理汇总了Python中Controller.Controller.render方法的典型用法代码示例。如果您正苦于以下问题:Python Controller.render方法的具体用法?Python Controller.render怎么用?Python Controller.render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Controller.Controller
的用法示例。
在下文中一共展示了Controller.render方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: hasattr
# 需要导入模块: from Controller import Controller [as 别名]
# 或者: from Controller.Controller import render [as 别名]
else:
ret, controller_frame = capture.read()
#Flip controller_frame
controller_frame = cv2.flip(controller_frame, 1)
#Find the position of the user
users = controller.scan(frame = controller_frame,
backsub = backsub)
#Perform the user's action
controller.vote(users = users,
emulator = emulator)
#Draw the controller on the capture_frame
controller.render(frame = controller_frame)
#Draw the stage
stage.render( stage_frame = stage_frame,
controller_frame = controller_frame,
keylog = emulator.keylog)
#Display the results
cv2.imshow('Stage_frame', stage_frame)
#Stream the results
if hasattr(config, 'STREAM'):
stream.init_stream_pipe()
stream.broadcast(stage_frame)
if cv2.waitKey(1) ==27:
exit(0)