Ask Your Question

Revision history [back]

On Linux, cv::VideoCapture can use the PS3 Eye via the standard Video4Linux drivers.

On Windows and Mac, cv::VideoCapture cannot use the PS3 Eye. You will need to capture frames from the Eye using some other camera SDK, such as:

  • PS3EYEDriver - This works with Windows and Mac. It is free but probably subject to GPL because it contains some code copied from the Linux kernel.
  • CL-Eye Platform SDK (not just CL-Eye Driver) - This just works with Windows. It is commercial.

Once you capture a frame using whichever camera SDK, you can create a cv::Mat from the captured data, as illustrated in the following partial code sample:

int width = 320, height = 240;
int matType = CV_8UC3; // 8 bpp per channel, 3 channels
void *pData;

// Use the camera SDK to capture image data.
someCaptureFunction(&pData);

// Create the matrix. No data are copied; the pointer is copied.
cv::Mat mat(height, width, matType, pData);