Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test.py not been able to start with webcam #1

Open
tarunkalra opened this issue Feb 15, 2019 · 4 comments
Open

test.py not been able to start with webcam #1

tarunkalra opened this issue Feb 15, 2019 · 4 comments

Comments

@tarunkalra
Copy link

screenshot from 2019-02-15 16-04-24

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.

screenshot from 2019-02-15 16-07-59
This shows webcam is perfectly working with other code but no with this one. Help me with this one. Thanks

@DilaraAlbayrak
Copy link

Have you found a solution? I have exactly the same problem.

@ayushmankumar7
Copy link

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 .

@libasoles
Copy link

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)

@b31ngd3v
Copy link

thanks brother @libasoles you saved my time !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants