def __init__(self, resolution=(CAMERA_WIDTH, CAMERA_HEIGHT), framerate=CAMERA_FRAMERATE, rotation=0,
hflip=CAMERA_HFLIP, vflip=CAMERA_VFLIP):
# initialize the camera and stream
try:
self.camera = PiCamera()
except:
print("ERROR - PiCamera Already in Use by Another Process")
print("INFO - Exit %s" % progName)
quit()
self.camera.resolution = resolution
self.camera.rotation = rotation
self.camera.framerate = framerate
self.camera.hflip = hflip
self.camera.vflip = vflip
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
评论列表
文章目录