PyImageSearch / imutils

A series of convenience functions to make basic image processing operations such as translation, rotation, resizing, skeletonization, and displaying Matplotlib images easier with OpenCV and Python.
MIT License
4.51k stars 1.03k forks source link

Possible getting repeated frames from VideoStream #213

Open jaysonph opened 3 years ago

jaysonph commented 3 years ago

@jrosebr1 I notice that in VideoStream. 'self.stream' grabs new frame and store it in a variable called 'self.stream.frame' . In this case, if a process is faster than the frame update function, then my process will possibly be getting repeated frames, which imposes redundant workload (i.e. doing prediction on same frame for several times). In your blog, I notice that you teach us to do the frame updating using multi-threading and queue. Why do you not change the codes here to use queue also? Is there any reason I missed?