Ask Your Question
2

Multiple cameras

asked 2012-07-04 04:56:34 -0600

AlexanderShishkov gravatar image

How to use 2 cameras (multiple cameras) with OpenCV library?

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
2

answered 2012-07-04 06:52:36 -0600

Daniil Osokin gravatar image

updated 2012-07-04 08:47:59 -0600

Kirill Kornyakov gravatar image

Hi!

VideoCapture(int device)
parameter allows to specify the camera index. Here is documentation.

edit flag offensive delete link more

Comments

1

But how can you enumerate the devices? How can you know the existing device number and which camera is which?

Adi gravatar imageAdi ( 2012-07-05 01:11:18 -0600 )edit

@Adi usually the first camera that you plug in gets assigned as 0 and every camera you add is ennumerated+1 from there in ;inux

benzun gravatar imagebenzun ( 2012-11-20 11:38:43 -0600 )edit
1

answered 2014-01-19 09:39:57 -0600

SpiderGears gravatar image

Additionally you might encounter problems when using two cameras simultaneously specially on a USB 2.0 interface. The first camera connected to USB host tries to reserve all the available bandwidth leaving nothing for the second cam. Error Message: VIDIOC_STREAMON: No space left on device

Solution:

  1. Calculate bandwidth required manually and make appropriate configurations.
  2. Put cameras on different USB hosts.

Ref thread http://answers.opencv.org/question/4909/using-2-webcams-simultaneously/

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-07-04 04:56:34 -0600

Seen: 4,213 times

Last updated: Jan 19 '14