i use this code to start the camera
from imutils.video import Videostream
vs = VideoStream(0).start()
but when i try this
vs.stop()
the camera doesn't stop and the variable vs show this value :
<imutils.video.webcamvideostream.WebcamVideoStream instance at 0x7f2c40e75b00>
imutils actually uses cv2.VideoCapture() to initialize stream, but didn't release it in stop.
vs.stream.release() shall work.
I've created pull request in imutils github repo :) https://github.com/jrosebr1/imutils/pull/81/files
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With