Hello,
I have the following issue: In my openCV program under Mac OS X 10.5.8 when I try to open my USB camera for video it always opens the iSight built-in camera, although I explicitly set the camera number to 1 (iSight is supposed to be 0). Furthermore, choosing camera numbers of 2, 3 etc. also opens the iSight camera, although I only have 2 cameras connected.
I tried the following
CvCapture * camera = cvCaptureFromCAM( 1 );
and
CvCapture * camera = cvCreateCameraCapture ( 1 );
They both give the same result. The interesting thing is that when I open video capture from the iSight camera from Skype or PhotoBooth it occupies the channel and the openCV program is forced to open the webcam channel, which works without any problems.
My question is, how can I explicitly choose the webcam in my openCV program without having to occupy the iSight channel first in another program?
Thank you.
P.S. The program works under Windows - I only tried it on a machine with 1 camera (the same webcam) but if I specify anything different than 0 or CV_CAP_ANY it crashes, so I assume it correctly searches for the camera.