hukkelas/deep_privacy2

Cant open camera by index

ammar-deep opened this issue · 4 comments

I have installed it with docker. It works fine on static images. However when I do webcam anonymization, I get "cant open camera by index".

I have tried built in camera and also usb camera both are giving same error.

I have also tried to change the index here

cap = BufferlessVideoCapture(0, width=1920, height=1080)
from 0-2 but the problem remains.

When i run a dummy open camera on a separate python file using opencv it works fine.

Did you test your dummy script inside of the docker container?

No I didn't. Do I need to?

I tried to run my dummy script inside the docker container and it gives the same above error.
Well what can be the issue in this case?

This is an issue with docker then. Check this stackoverflow post about it, where the same issue is documented.