MCPcopy Create free account
hub / github.com/PyImageSearch/imutils / __init__

Method __init__

imutils/video/filevideostream.py:17–29  ·  view source on GitHub ↗
(self, path, transform=None, queue_size=128)

Source from the content-addressed store, hash-verified

15
16class FileVideoStream:
17 def __init__(self, path, transform=None, queue_size=128):
18 # initialize the file video stream along with the boolean
19 # used to indicate if the thread should be stopped or not
20 self.stream = cv2.VideoCapture(path)
21 self.stopped = False
22 self.transform = transform
23
24 # initialize the queue used to store frames read from
25 # the video file
26 self.Q = Queue(maxsize=queue_size)
27 # intialize thread
28 self.thread = Thread(target=self.update, args=())
29 self.thread.daemon = True
30
31 def start(self):
32 # start a thread to read frames from the file video stream

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected