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

The way to grab camera id on Windows is problematic. And my solution included #21

Open
IrvingF7 opened this issue Apr 10, 2024 · 0 comments

Comments

@IrvingF7
Copy link

Hi, Gelsight team!

I noticed that in gsdevice.py, the current way to grab the camera ID is through pygrabber. But as this comment on StackOverflow pointed out, pygrabber sometimes gives problematic ordering of the camera devices and can be different from the actual order that OpenCV accesses them.

For example, in this case, my Windows 11 PC has a Logitech webcam and is connected to a Gelsight mini. pygrabber thinks Gelsight is at index 0, but my PC thinks the default camera is the Logitech webcam. As a result, running \examples\showimages.py will simply open my webcam
Untitled picture

I have a solution that's modified based on this this post and can correctly display device ids on Windows 11 that is based on Window's official API Python/WinRT. If it's okay, I will make a pull request.

Untitled picture2

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

1 participant