I’m using OpenCV and python to do some image processing.
Here is the gist of the code.
# start listening to video stream cap = cv2.VideoCapture(0) #%% main loop while(1): # the actual image processing k = cv2.waitKey(5) & 0xFF if k == 27: break #%% clean up # release camera cap.release() # close windows cv2.destroyAllWindows()
It worked well for a while, but I think something has happened where the code hasn’t released hold of my webcam. Now when I try to use the same code, it doesn’t work. I tried to open the camera app on windows and it shows a “Webcam already in use” error with the code: 0xA00F4243(OXC00D3704)
I have tried:
Shutting down and waiting
Uninstalling webcam driver
Disconnecting and connecting the webcam
I can’t find anything useful about this on Google and I’m feeling hopeless.