Forum Discussion
emre_tanirgan
10 years agoProtege
OpenCV & DK2 IR Camera Problem
I'm working on a C++ program that takes in two USB camera inputs and streams them on separate threads using OpenCV, then displays them on the DK2 using OpenGL. The issue I'm having is that whenever I run my code with streaming on, the positional tracking camera doesn't turn blue (the two cameras stream fine). Unfortunately, I really need the IR camera to be functioning at the same time.
I've tested the system without camera streaming and the IR camera light turns blue and works perfectly. I've also tested my system with 2 industrial uEye cameras that have their own C++ SDK, and the positional tracking camera worked with them as well. Any ideas on why this issue might be specifically happening with OpenCV? Could it have to do with the number of USB controllers on my computer? I've tried plugging the sync cable directly into the Oculus and the IR camera just didn't turn on at all when I tested my code. Any help would be appreciated, thanks!
I've tested the system without camera streaming and the IR camera light turns blue and works perfectly. I've also tested my system with 2 industrial uEye cameras that have their own C++ SDK, and the positional tracking camera worked with them as well. Any ideas on why this issue might be specifically happening with OpenCV? Could it have to do with the number of USB controllers on my computer? I've tried plugging the sync cable directly into the Oculus and the IR camera just didn't turn on at all when I tested my code. Any help would be appreciated, thanks!
2 Replies
- VrallyProtegeHi,
Since I have built a working solution with pretty much the same components as you I will try to help (even if I never came across the same issues).
OpenCV enumerates cameras in order of connection. So the first camera you will connect will be camera 0, the second camera 1 etc. What is probably happening is that your application tries to use the Oculus Camera instead of one of your uEye cameras. This will lock access of the Oculus camera for the Oculus SDK.
Try to initialize your Oculus camera before you initialize your uEye cameras and see if that helps. Or try connecting the cameras to the computer in a different order. - emre_tanirganProtegeThanks for the reply. We ended up switching to a different, more powerful computer to run everything and that seemed to solve the problem, but it's possible that it worked because of what you were suggesting - the order of the camera initialization changed.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 1 year ago
- 10 months ago
- 10 months ago