def __init__(self, resolution=config.camera.resolution,
framerate=config.camera.framerate,
rotation=config.camera.rotation, **kwargs):
from picamera.array import PiRGBArray
from picamera import PiCamera
super(PiVideoStream, self).__init__(resolution, **kwargs)
self.camera = PiCamera()
self.camera.resolution = resolution
self.camera.framerate = framerate
self.camera.rotation = rotation
self.camera.exposure_mode = "sports"
self.rawCapture = PiRGBArray(self.camera, size=resolution)
self.frame = None
self.stopped = False
logging.info("PiVideoStream loaded.. .warming camera")
time.sleep(2)
self.start()
评论列表
文章目录