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

Method update

imutils/video/pivideostream.py:37–51  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

35 return self
36
37 def update(self):
38 # keep looping infinitely until the thread is stopped
39 for f in self.stream:
40 # grab the frame from the stream and clear the stream in
41 # preparation for the next frame
42 self.frame = f.array
43 self.rawCapture.truncate(0)
44
45 # if the thread indicator variable is set, stop the thread
46 # and resource camera resources
47 if self.stopped:
48 self.stream.close()
49 self.rawCapture.close()
50 self.camera.close()
51 return
52
53 def read(self):
54 # return the frame most recently read

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected