Closed jinha3411 closed 6 years ago
Hello,
Have you tried to open a basic camera window with OpenCV? If you cannot access it with OpenCV, something is may be wrong with your environment variables, settings, or OpenCV install.
If it works in OpenCV, then you may just need to install the latest DirectX (DirectShow) drivers. See: https://support.microsoft.com/en-us/help/179113/how-to-install-the-latest-version-of-directx
Hope this helps. J
Opening with OpenCV, do you mean that I need to check if Pupil Camera is accessible with basic OpenCV functions?
Correct, just to confirm it's accessible in c++.
I used,
cv::VideoCapture cap(0);
but seems like it does not detect the camera.
Can you tell me what device ID I should put ?
Another issue is that 2 pupil camera devices (Pupil Cam1 0 & 0) are listed under libusbK Usb Devices not Imaging devices.
That's not good. The ID depends on how many camera devices you currently have attached to the system, and the order in which they are assigned is based on the order in which the USB driver was installed. If you try IDs 0-5 to no avail, something is likely wrong with your setup.
Oh, hmm... I believe directshow and OpenCV both assume that the cameras are accessable as a USB Imaging Device. I think the libusbK driver allows the pupil labs software to access both cameras at once over a single USB bus (which was not originally the case with standard Windows drivers). The bad thing is that you will have trouble using the cameras for other purposes, especially if they are both connected to a single USB cable.
If you want to test our code, I would recommend uninstalling the libusbK driver, using two separate cables on two separate USB ports, and letting the devices install separately as standard imaging devices in windows.
I am not really sure how to uninstall libusbK driver properly. I have already tried to uninstall them after noticing runtime failures hoping uninstalling libusbK driver would fix the problem launching your program. At very first time that I did not even know that the official pupil lab application even exists (I received your code from another research group as one of the references before finding the official application), your program worked fine. The reason I tried to install the libusbK was to enable both camera work in same application, but now I can't even connect a single camera. Once I uninstall it, it seems like they are not correctly configured at all stating that the device is unknown.
Try installing them on a different machine. If that works, then it's just a matter of completely removing the driver. If that fails, then the new driver may have changed the camera's internal settings, and you will probably need to contact Pupil labs.
Oh, I just followed your stage, I am now able to stream images from one camera. And I just tried to run your program. I faced same problem at the very first time, and now it is not related to camera connection issue, but I will not bother creating another issue thread. When I start the program, the program aborts when returning pupilAreaFitter function due to assertion failure, where the expression was _BLOCK_TYPE_IS_VALID(pHead->nBlockUse). Do you know if this is also another hardware issue?
Hmm.. That is not an assertion that I put in there. Possibly hardware or driver. Sorry I couldn't be more help.
No problem. Thank you for your help. I think I fixed the connection problem, therefore closing the thread.
Hi. I am currently trying to run your code and already have verified that the camera itself is capable of streaming images through Pupil Labs' official application (pupil-capture). Whenever the program reaches the part that tries to create the class enumerator for DirectShow, it throws null pointer exception. ` void DirectShowFrameGrabber::initGraph() { // Create the System Device Enumerator. AutoComPtr< ICreateDevEnum > pDevEnum; AutoComPtr< IEnumMoniker > pEnum;
`
In debugging mode, it throws a read access violation exception after executing the very last line. The reason of the exception says pEnum.p was nullptr. The only change that I made after receiving the pupil lab device was to install their device drivers, which made two camera devices listed under libusbK Usb Devices in Device Manager window. I am not really sure if this is either a hardware or software issue, but I really want to get the image streaming under C++ development environment so that I can combine this feature with my other projects. Please let me know if you have any idea or need any further information.
Thank you in advance