Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How do I choose which camera I am accessing?

I have a 4-way USB splitter and am trying to develop the ability to access any one of four webcams. So far, I have not been able to do this. I am using C++ code samples to develop my java code. That might be some of the difficulty. The code I am using to do this follows . . .

Does anyone know how this should be done?

int camera = 0;   //   C++ VideoCapture cap(0); // open the default camera
//int camera = 1; //  Insten
//int camera = 2; //  logitech279 
//int camera = 3; //  logitech920 
//int camera = 4; //  logitechxxx
VideoCapture vid = new VideoCapture(camera);                             
vid.open(camera);