motion_tracker.py 文件源码

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

项目:smart-monitor-system 作者: MostafaBalata 项目源码 文件源码
def update3(self):
        # keep looping infinitely until the thread is stopped
        stream = io.BytesIO()
        with picamera.PiCamera() as camera:

            for f in camera.capture_continuous(stream, format='jpeg'):  # self.stream:
                # grab the frame from the stream and clear the stream in
                # preparation for the next frame
                self.frame = f.array
                self.rawCapture.truncate(0)

                # if the thread indicator variable is set, stop the thread
                # and resource camera resources
                if self.stopped:
                    self.stream.close()
                    self.rawCapture.close()
                    self.camera.close()
                    return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号