本文整理汇总了Python中VisionEgg.set_time_func_to_frame_locked方法的典型用法代码示例。如果您正苦于以下问题:Python VisionEgg.set_time_func_to_frame_locked方法的具体用法?Python VisionEgg.set_time_func_to_frame_locked怎么用?Python VisionEgg.set_time_func_to_frame_locked使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VisionEgg
的用法示例。
在下文中一共展示了VisionEgg.set_time_func_to_frame_locked方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DotArea2D
# 需要导入模块: import VisionEgg [as 别名]
# 或者: from VisionEgg import set_time_func_to_frame_locked [as 别名]
dots = DotArea2D( position = ( screen.size[0]/2.0, screen.size[1]/2.0 ),
size = ( 300.0 , 300.0 ),
signal_fraction = 0.1,
signal_direction_deg = 180.0,
velocity_pixels_per_sec = 10.0,
dot_lifespan_sec = 5.0,
dot_size = 3.0,
num_dots = 100)
text = Text( text = "Vision Egg makeMovie2 demo.",
position = (screen.size[0]/2,2),
anchor = 'bottom',
color = (1.0,1.0,1.0))
viewport = Viewport( screen=screen, stimuli=[dots,text] )
VisionEgg.config.VISIONEGG_MONITOR_REFRESH_HZ = 60.0 # fake framerate
VisionEgg.set_time_func_to_frame_locked() # force VisionEgg to fake this framerate
num_frames = 5
for i in range(num_frames):
screen.clear()
viewport.draw()
swap_buffers()
im = screen.get_framebuffer_as_image(buffer='front',format=gl.GL_RGB)
filename = "movie_%02d.jpg"%(i+1)
im.save(filename)
print 'saved',filename