handy
handy copied to clipboard
test.py not been able to start with webcam
Open CV was installed and I was able to access the webcam with my other small code but this file seems to not be opening as of now.
This shows webcam is perfectly working with other code but no with this one. Help me with this one. Thanks
Have you found a solution? I have exactly the same problem.
What i think is that cap = cv2.VideoCapture(0) and cv2.VideoCapture(0) in hist = handy.capture_histogram(source=0) Triggers the same camera at the same time. Hence this camera. I don't know for the rest, but for me , my camera crashes and i need to wait for sometime to get my camera be okay .
Exactly. All you have to do is invert the lines:
hist = handy.capture_histogram(source=0) # will release the camera after execution
cap = cv2.VideoCapture(0)
thanks brother @libasoles you saved my time !!