Ask Your Question
0

Can't use ps3 eye with OpenCV

asked 2015-10-07 18:45:18 -0600

Datch gravatar image

updated 2015-10-08 15:24:03 -0600

Hi, I tried to use ps3 eye with OpenCV 3.0.0/2.4.11, Visual Studio 2013(C++/C#) and Windows 7 x64. I use CLEye driver 5.3 for connection and I can't connect my camera to program anyway. Firstly I thought that it's impossible, but some time later I found program that use OpenCV 2.4.1 and perfectly work with this cam and this driver.

edit retag flag offensive close merge delete

Comments

A co-author of the book I am launching is describing in his chapter how to connect a ps3 eye to OpenCV. It might be a good idea to contact him and ask him for help. Or be patient, end of october the book is coming out! @Joseph Howse, care to elaborate?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-10-08 06:25:38 -0600 )edit

Also you can contact him through his website: http://nummist.com/

StevenPuttemans gravatar imageStevenPuttemans ( 2015-10-08 06:26:04 -0600 )edit
1

Thank you, I'll try to contact him.

Datch gravatar imageDatch ( 2015-10-08 14:07:12 -0600 )edit

2 answers

Sort by » oldest newest most voted
2

answered 2015-10-08 14:35:46 -0600

Joseph Howse gravatar image

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);
edit flag offensive delete link more

Comments

Thanks, but I don't understand, why with program from this video I can use PS3 Eye with only CL-Eye Driver?

Datch gravatar imageDatch ( 2015-10-08 15:02:48 -0600 )edit
1

Hmm ... Are you using the pre-built versions of OpenCV 2.4.11 and 3.0.0, or are you building from source? If you are building from source, could you confirm that the WITH_DSHOW CMake option is enabled?

I see here that the CL-Eye Driver is supposed to provide "Microsoft DirectShow™ Support". This does offer some hope that it should work with the DirectShow back-end of cv::VideoCapture, if WITH_DSHOW was enabled during the build. If an old build of OpenCV was working with this driver, and your new build is not, maybe either (a) WITH_DSHOW was not enabled in the new build, or (b) the newer version of OpenCV has introduced some bug in cv::Capture's DirectShow support.

Joseph Howse gravatar imageJoseph Howse ( 2015-10-08 15:39:28 -0600 )edit

I built it(version 3.0.0) with instruction and as I can see WITH_DSHOW was enabled during the build. I tried pre-built version too(2.4.11 and 3.0.0), but the same result. And one thing, I connect ps3 eye to usb 3.0 because my laptop have no usb 2.0. P.S. Tried to use DirectShow manualy and it doesn't see ps3 eye, only laptop webcam. P.P.S. Laptop webcam as I can see connected trought usb2.0

Datch gravatar imageDatch ( 2015-10-08 17:55:19 -0600 )edit

Thank you Joe for the help!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-10-09 15:42:41 -0600 )edit

Joseph, I think that trouble is in Direct Show, as I saw 2.4.1 is working with VS2010 and I want to try to install it and compile project with it or to experiment with variations of Direct Show.

Datch gravatar imageDatch ( 2015-10-09 16:33:10 -0600 )edit
1

Ouuu shit! I found very interesting thing. My project built in VS2010 Show video from ps3 eye but this project built in VS2013 don't see ps3 eye with 2.4.11 pre-compiled library.

P.S. in VS2013 I built 64bit project, but in VS2010 it 32bit

P.P.S.Finaly don't use 64bit library if you want to use ps3 eye cam.. It compiled when I changed project platform to win32 and change libraries to 2.4.11. It's so simply but so much troubles..

Datch gravatar imageDatch ( 2015-10-09 18:00:34 -0600 )edit
0

answered 2015-10-18 05:05:54 -0600

Datch gravatar image

updated 2015-10-18 05:06:15 -0600

Answer from Code Laboratories about this trouble:

"Hi Alex,

Are you using x64 version of OpenCV? The CL Eye driver exposes camera as a standard DirectShow camera and it should work with x86 based version of OpenCV.

Regards, Support Code Laboratories, Inc."

edit flag offensive delete link more

Comments

That is quite rubbish of them, since a x86 bit driver should run perfectly fine on a x64 bit system. The other way around should not be possible...

StevenPuttemans gravatar imageStevenPuttemans ( 2015-10-20 02:42:03 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-10-07 18:45:18 -0600

Seen: 8,145 times

Last updated: Oct 18 '15