(self, src=0, usePiCamera=False, resolution=(320, 240), framerate=32, **kwargs)
| 3 | |
| 4 | class VideoStream: |
| 5 | def __init__(self, src=0, usePiCamera=False, resolution=(320, 240), |
| 6 | framerate=32, **kwargs): |
| 7 | # check to see if the picamera module should be used |
| 8 | if usePiCamera: |
| 9 | # only import the picamera packages unless we are |
| 10 | # explicity told to do so -- this helps remove the |
| 11 | # requirement of `picamera[array]` from desktops or |
| 12 | # laptops that still want to use the `imutils` package |
| 13 | from .pivideostream import PiVideoStream |
| 14 | |
| 15 | # initialize the picamera stream and allow the camera |
| 16 | # sensor to warmup |
| 17 | self.stream = PiVideoStream(resolution=resolution, |
| 18 | framerate=framerate, **kwargs) |
| 19 | |
| 20 | # otherwise, we are using OpenCV so initialize the webcam |
| 21 | # stream |
| 22 | else: |
| 23 | self.stream = WebcamVideoStream(src=src) |
| 24 | |
| 25 | def start(self): |
| 26 | # start the threaded video stream |
nothing calls this directly
no test coverage detected