# How can I connect two cameras usb with SimpleCV?

i'm trying to connect two cameras in my pc, but I can't do it, I think I need to put the number id of each camera, How can I get it? I'm using windows seven

edit retag close merge delete

Sort by » oldest newest most voted

The SimpleCV Cookbook gives an example of using multiple cameras. In general, they're numbered from 0 onwards, so if you have two cameras they will be numbered 0 and 1.

When you call SimpleCV.Camera(), it defaults to picking the highest numbered camera. You can specify it yourself though. For example, if you have to cameras you can get images from both of them and display them side by side:

cam0 = SimpleCV.Camera(0)
cam1 = SimpleCV.Camera(1)
cam0.getImage().sideBySide(
cam1.getImage()
).show()


If you have more than two usb cameras, you'll need to make more instances of Camera still. If you're using another type of camera, say your phone's camera through jpeg streaming, the cookbook example shows how to do that.

more

I know I'm bringing up a zombie thread but I wanted to add some info that I just found out. On my Windows 7, I also needed to be sure both cameras were in different USB ports. It didn't work with one configuration but it did work when one was in a USB2.0 port and the other was in a USB3.0 port. Since they are identical cameras, I assume they needed to be on different USB buses or something.

more