Opencv 2.4.9 Videcapture 2 Two Multi PS3 Eye: cam selection error

asked 2014-06-25 05:55:27 -0600

AR0x7E7 gravatar image

updated 2014-06-25 05:56:48 -0600

Hello everybody,

using Opencv 2.4.9 on Windows 7 64 bit in combination with two Sony PS3 Eye Multi Webcams it seems like Opencv has problems to access both cams.

Clearly I installed Code Laboratories latest CL Eye Platform Driver and CL Eye Platform SDK.


USING CL Eye Platform

Running the provided CLEyeMulticamTest.exe both cams work flawlessly (see screenshot attached).

image description


USING OPENCV

However, using following simple OpenCV example it turns out only one PS3 Eye can be selected (see screenshot attached).

int main(int nargs, char** argv)
{
int id = std::stoi(argv[1]);

cv::VideoCapture cap(id); // open passed cam id
if(!cap.isOpened())  // check if we succeeded
    return -1;

cv::Mat edges;
cv::namedWindow("edges",1);
for(;;)
{
    cv::Mat frame;
    cap >> frame; // get a new frame from camera
    cvtColor(frame, edges, CV_BGR2GRAY);
    GaussianBlur(edges, edges, cv::Size(7,7), 1.5, 1.5);
    Canny(edges, edges, 0, 30, 3);
    imshow("edges", edges);
    if(cv::waitKey(30) >= 0) break;
}
// the camera will be deinitialized automatically in VideoCapture destructor
return 0;

image description


USING OPENCV with two diffrent cams

When I plug in another Webcam (Logitech) Opencv can access both of them: image description


USB Hub Config

To make things clear I also made sure to identify USB Ports connected to different controllers (I read something about 100% bandwidth usage of a single cam leading to problems using more cams on same usb hub)

image description


the final question is

So can somebody qualified tell me whether this behavior is the current state of things when it comes to use OpenCV with two PS3 Eye Cams or is there some neath trick left?

I understand that using CL SDK I will be able to utilize both cameras. However, it would be nice to use OpenCV as a wrapper instead ;).

Kind regards AR

edit retag flag offensive close merge delete