camera.py 文件源码

python
阅读 36 收藏 0 点赞 0 评论 0

项目:Projects 作者: it2school 项目源码 文件源码
def get_and_flip(self):
        # if you don't want to tie the framerate to the camera, you can check and
        # see if the camera has an image ready.  note that while this works
        # on most cameras, some will never return true.
        if 0 and self.camera.query_image():
            # capture an image

            self.snapshot = self.camera.get_image(self.snapshot)

        if 0:
            self.snapshot = self.camera.get_image(self.snapshot)
            #self.snapshot = self.camera.get_image()

            # blit it to the display surface.  simple!
            self.display.blit(self.snapshot, (0,0))
        else:
            self.snapshot = self.camera.get_image(self.display)
            #self.display.blit(self.snapshot, (0,0))


        pygame.display.flip()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号