cv2.VideoCapture(0).isOpened() returns False all the time
Hi all,
I am new to opencv, and having some problems setting up opencv on my computer. I am using Anaconda 2.7 and PsychoPy for my experiments on a Windows 10 platform. After I put cv2.pyd into both anaconda/lib/site-packages and psychopy/lib/site-packages, when I run cv2.VideoCapture(0), I could get a number indicating a camera connected (I guess), but cv2.VideoCapture(0).isOpened() returns me False all the time. I tried other software to check the camera, and the camera seemed fine.
Anyone could help with this problem? I would appreciate it!
Yu
Did you ever solve this? I'm having the exact same problem.
Try this:
Thanks supra56, I'll try this, but this code is opening a video file. Even if it works, it's not what I need. I need to open the actual camera (so, cv2.VideoCapture(0) ). This is also a headless system, so cv2.imshow won't work. If I comment out the bits that won't work on a headless system, your code above is basically the same as the code that I'm trying to currently run, and I'm getting "Error opening video stream or file".
Hi, it's been a long time, but I still did not solve the problem. The camera I'm using is Thorlabs DCC1545M, and I did not have any success in opening it with cv2.VideoCapture() on windows 10. I was wondering if it is because opencv do not have the right driver for it?
Did you get the solution, I am having similar problem