google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.46k stars 5.15k forks source link

Webcam Access Being Requested When Not Using #2633

Closed JelaniThompson closed 2 years ago

JelaniThompson commented 3 years ago

Hello there,

I'm working on a project with selfie segmentation and loving the performance so far. I'm making a background/foreground subtraction project and I've run into a bit of an issue. The browser I'm currently using doesn't have webcam access and I'm running the background subtraction on MP4 videos. It works great when I'm able to allow webcam access, but I have no idea why it's being requested in the first place.

Here's my code: https://gist.github.com/JelaniThompson/fe18bb5b431ec0815b8b136cd309591a

Would any of you guys happen to know how to prevent webcam access being asked for in my example? I'd like it to default to not asking and only trigger if I choose to toggle the mode to webcam view.

sureshdagooglecom commented 2 years ago

Hi @JelaniThompson , It seems like the error is because of OpenCV not being able to access the camera. Since your camera works in other applications, it is likely that there is an issue with using OpenCV on your desktop.

google-ml-butler[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you.

google-ml-butler[bot] commented 2 years ago

Closing as stale. Please reopen if you'd like to work on this further.

google-ml-butler[bot] commented 2 years ago

Are you satisfied with the resolution of your issue? Yes No