(self, index, cap)
| 287 | print('WARNING: Different stream shapes detected. For optimal performance supply similarly-shaped streams.') |
| 288 | |
| 289 | def update(self, index, cap): |
| 290 | # Read next stream frame in a daemon thread |
| 291 | n = 0 |
| 292 | while cap.isOpened(): |
| 293 | n += 1 |
| 294 | # _, self.imgs[index] = cap.read() |
| 295 | cap.grab() |
| 296 | if n == 4: # read every 4th frame |
| 297 | _, self.imgs[index] = cap.retrieve() |
| 298 | n = 0 |
| 299 | time.sleep(0.01) # wait time |
| 300 | |
| 301 | def __iter__(self): |
| 302 | self.count = -1 |
nothing calls this directly
no outgoing calls
no test coverage detected