Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Accessing a USB connected camera

I have an OptixCam Summit Series camera mounted on a microscope and USB connected to my Windows 10 system. The correct driver is installed and the device shows up in the Device Manager under the "Imaging devices" tree as "TCA-9 USB2.0 Camera". When I click on Properties its location is listed as "Port_#0001.Hub_0001". The canned software that came with the camera works so the camera itself is functioning fine.

Now I want to capture the images using Python rather than relying on the canned software.

I successfully installed opencv-python-3.4.0.12 on my Windows 10 system and I am programming in Python 3.6.2.

I am having trouble figuring out how to get cv2 to "open" this USB camera. I tried the following, all without success: camera = cv2.VideoCapture(i) # Where i ranged from 0 to 99) camera = cv2.VideoCapture("TCA-9 USB2.0 Camera") camera = cv2.VideoCapture("Port_#0001.Hub_0001")

When I tried to capture an image using: camera.read() All returned [False, None]

Can anyone point me in the right direction to capture an image from this camera?

click to hide/show revision 2
None

updated 2018-03-07 12:00:56 -0600

berak gravatar image

Accessing a USB connected camera

I have an OptixCam Summit Series camera mounted on a microscope and USB connected to my Windows 10 system. The correct driver is installed and the device shows up in the Device Manager under the "Imaging devices" tree as "TCA-9 USB2.0 Camera". When I click on Properties its location is listed as "Port_#0001.Hub_0001". The canned software that came with the camera works so the camera itself is functioning fine.

Now I want to capture the images using Python rather than relying on the canned software.

I successfully installed opencv-python-3.4.0.12 on my Windows 10 system and I am programming in Python 3.6.2.

I am having trouble figuring out how to get cv2 to "open" this USB camera. I tried the following, all without success: success:

camera = cv2.VideoCapture(i) # Where i ranged from 0 to 99)
camera = cv2.VideoCapture("TCA-9 USB2.0 Camera")
camera = cv2.VideoCapture("Port_#0001.Hub_0001")

cv2.VideoCapture("Port_#0001.Hub_0001")

When I tried to capture an image using: camera.read() All returned [False, None]

Can anyone point me in the right direction to capture an image from this camera?