def __init__(self, resolution=(640, 480), framerate=32, save_image_interval=1):
'''
@param save_image_interval, interval in sec to save imave
'''
# initialize 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.rects = [] # list of matching faces
self.stopped = False
评论列表
文章目录