sensors.py 文件源码

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

项目:rascal-tensorflow 作者: stayrascal 项目源码 文件源码
def __init__(self, resolution=(160, 120), framerate=12):
        from picamera.array import PiRGBArray
        from picamera import PiCamera

        # initizlize the camera and stream
        self.camera = PiCamera()
        self.camera.resolution = resolution
        self.camera.framerate = framerate
        self.rawCapture = PiRGBArray(self.camera, size=resolution)
        self.stream = self.camera.capture_continuous(self.rawCapture, format'bgr', use_video_port=True)

        # initialize the frame and the variable used to indicate if the thread should be stopped
        self.frame = None
        self.stopped = False

        print('PiVideoStream loaded.. .warming camera')

        time.sleep(2)
        self.start()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号