-
-
Notifications
You must be signed in to change notification settings - Fork 17.2k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
🐛 Bug
cap.release() function should be embedded in utils.dataset as closing of a webcam will governed by utils.dataset not detect.py.
But on running utils.dataset, it was throwing off error saying cap is not a a self declared variable in Class LoadStream.
To Reproduce (REQUIRED)
Input:
In utils.dataset() file, class LoadStream:
def __next__(self):
self.count += 1
img0 = self.imgs.copy()
if cv2.waitKey(1) == ord('q'): # q to quit
self.cap.release()
cv2.destroyAllWindows()
raise StopIteration
Output:
self.cap.release()
AttributeError: 'LoadStreams' object has no attribute 'cap'
Expected behavior
utlis.dataset should effectively be able to release camera.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working