Sony PS3 Eye

Hi all!

AlexP from the nuigroup forums has got the Sony PS3 Eye working under windows. If you are looking for a cheaper alternative to 1394 Cams like FireflyMVs or Unibrain, you can try this one out. However, it still does not work with any OF apps but it does work in Windows Apps like MSN and Skype and even Amcap.

For more info, checkout his post at:
http://nuigroup.com/forums/viewthread/2921/
and
http://nuigroup.com/forums/viewthread/3137/
You can download the drivers from his blog at:
http://alexpopovich.wordpress.com/
or a direct download link for his latest driver at the time of this post at:
http://www.codelaboratories.com/files/PS3EyeSetup.1.0b81008.exe

Cheers! :lol: [/url]

Nice! The specs look good!

Hmm strange it doesn’t work with videoInput.
Usually if it works in Amcap it should work in VideoInput.

He might need to specify the connection type to be firewire - I think openFrameworks by default sets it to VI_COMPOSITE which might be the problem.

If you can test it:
try changing this line in ofVideoGrabber

  
bool bOk = VI.setupDevice(device, width, height);  
  

to

  
bool bOk = VI.setupDevice(device, width, height, 4);  
  

Maybe I should order one and give it a go!

Theo

I tried changing the code as you suggested but still no luck.
Btw, I am running VS2005.
Here is the error in Debug mode:
A protection error dialog pops up with the following:

  
Debugger detected - please close it down and restart!  
  
Windows NT users: Please note that having the WinIce/SoftIce service installed means that you are running a debugger!  
  

Here is the error in Release mode:

  
***** VIDEOINPUT LIBRARY - 0.1991 - TFW07 *****  
  
SETUP: Setting up device 0  
SETUP: PS3Eye Camera  
SETUP: Checking crossbar  
SETUP: You are a webcam or snazzy firewire cam! No Crossbar needed  
SETUP: Setting capture size to 320 by 240  
SETUP: Media Type is RGB24 no conversion needed  
SETUP: Capture callback set  
ERROR: Could not connect pins - RenderStream()  
  
SETUP: Disconnecting device 0  
SETUP: freeing Grabber Callback  
SETUP: freeing Renderer  
SETUP: freeing Capture Source  
SETUP: freeing Grabber Filter  
SETUP: freeing Grabber  
SETUP: freeing Control  
SETUP: freeing Media Type  
SETUP: removing filter NullRenderer...  
SETUP: filter removed NullRenderer  
SETUP: removing filter PS3Eye Camera...  
SETUP: filter removed PS3Eye Camera  
SETUP: freeing Capture Graph  
SETUP: freeing Main Graph  
SETUP: Device 0 disconnected and freed  
  
error allocating a video device  
please check your camera with AMCAP or other software  

Is the VI console output any different with the normal ofVideoGrabber code?

Also could you try putting in VI_COMPOSITE where you had put the 4 before.

Also what happens if you set the size to 640 480?

Thanks!
Theo

Great work Theo!

Adding VI_COMPOSITE works!
Setting the size to 640x480 also works.
This works in Relase mode.

However I am still getting the protection error when i run it in debug mode.

ok…this is wierd.

When i deleted VI_COMPOSITE and recompiled, it still works. Now all my other apps work without me having to recompile.

Oh great!
Yeah I think we need to make VI_COMPOSITE be set by default in ofVideoGrabber.

in regards to the debug message - it could be something in the directshow driver for the PS3 Eye as I have never seen that message before.

http://social.msdn.microsoft.com/Forums-…-9c49ac3df/

http://social.msdn.microsoft.com/Forums-…-51ad52987/

From these posts it looks like the Directshow filters for the PS3 Eye could have debug detection on.

Maybe you could check with the person who wrote the driver and see if it means anything to him?

Pretty amazing that he got it working!
I think I will grab one next time I am in the US.

Theo

[quote author=“Progen”]ok…this is wierd.

When i deleted VI_COMPOSITE and recompiled, it still works. Now all my other apps work without me having to recompile.[/quote]

Ahh yeah I think the driver remembers what the last setting was so once you set it to Composite once it will remember the next time you use it.

Would be curious to see what the settings panel of the PS3 EYE looks like.
If you call the ofVideoGrabber videoSettings(); command it should pop up a box of options to control the camera params.

theo

There is currently no property pages for the PS3 eye yet so the videosettings() command doesn’t work.

As for the driver remembering the last setting, is it possible to set it back to “non-composite”?

Progen is this working now? Let me know what I would need to do so I can recompile tbeta so it works with the ps3 eye. Also, did you get it working at the high fps?

Alex recently released a updated driver http://alexpopovich.wordpress.com/ with:

* 320×240 @ 15fps
* 320×240 @ 30fps
* 320×240 @ 60fps
* 320×240 @ 75fps
* 320×240 @ 100fps
* 320×240 @ 125fps
* 320×240 @ 150fps (experimental)
* 640×480 @ 30fps
* 640×480 @ 40fps
* 640×480 @ 50fps
* 640×480 @ 60fps
* 640×480 @ 75fps (experimental)

I think he added a property sheet dialog box, although the videoInput library doesn’t seem to integrate these property sheets for setting res, fps, colorspace like dsvideolib does. I’m hoping in the next version of OF we have ability to set camera resolution AND fps or have access to something like a property sheet so we can access all camera settings. With Alex’s driver, the ps3 eye on windows is really the best camera for the money.

I’m also wondering, since OF doesn’t let you set fps of the camera directly, if the PS3 eye will default to the last used FPS (n amcap or other) or if it’ll go to highest fps (320 x 240 = 150fps or 640 x 480 = 75fps).

Hi Seth,

Yes, the PS3 now works with all my OF apps. You just need to recompile the ofVideoGrabber with the necessary changes. However, you need to note that it does not work in debug mode. Theo mentioned that it could be something with the Directshow filters for the PS3 Eye. So might have to ask AlexP about this.

Setting FPS - well it has been requested a lot now for videoInput!!

I think it is time to bite the bullet - next videoInput release will let you specify framerate. Not sure about adjusting it on the fly but you will be able to specify a desired framerate in the setup command. Not sure how that will integrate with ofVideoGrabber though as that would be windows only functionality for now - though a quicktime and possibly a v4l/unicap solution might exist also.

:slight_smile:

There is currently a secret release of VI 01992 that lets you set shutter speed and other settings in code - it also has a couple of bug fixes http://muonics.net/school/spring05/vide-…-0.1992.zip

So hopefully 01993 will support framerate selection.
theo

unicap can set things like brightness, fps, gamma, automode… by code (indeed any property you can set from ucview). So if you decide to integrate that with the videoGrabber, the linux version can be done too.

Update:

The latest release: PS3EyeSetup (v2.0b81021) does not work with OF even with the changes to the ofVideoGrabber.cpp

I have only tested it with PS3EyeSetup (v1.0b81008).

Will test to see if it works with: PS3EyeSetup (v2.0b81019)

Seth:
I am only able to achieve 15FPS at 320x240 and 7FPS at 640x480.

@ Theo and arturo, that is great news!

Theo, I don’t think there’s a need to adjust FPS on the fly, only to be able to set it on init. Many cameras don’t allow you to set their fps once they initialize. So although we have access to videoSetting, most of these just adjust image quality (brightness, contrast, etc) but don’t let you set resolution, frame rate, colorspace. The philips SPC900nc is an exception to this, it lets you change fps after it starts in the videoSettings. But, generally we have to set that before the camera starts which is why it’s so important. I could say more why we need this feature, but I don’t want to hijack this thread heh. Hopefully eventually we can get a FPS setting for all platforms.

@ Progen, that’s not good news :frowning: I’ll PM Alex and point him to this thread. I wonder what he changed between the version you had working and the current one.

Should we look into using his PS3lib and SDK instead or should the directshow one work the same you think?

I just picked up one today in amsterdam - so needless to say it will soon be working with VI/OF

:smiley:

Theo

ohh and it works with mac too! just tested it :smiley:
http://forums.macrumors.com/showthread.php?t=522097

Yay! lol :slight_smile:

Sweet! Any knowledge if it’s possible to control cam settings (aperture,gain,…) programmatically?

[quote author=“cerupcat”]@ Theo and arturo, that is great news!

Theo, I don’t think there’s a need to adjust FPS on the fly, only to be able to set it on init. Many cameras don’t allow you to set their fps once they initialize. So although we have access to videoSetting, most of these just adjust image quality (brightness, contrast, etc) but don’t let you set resolution, frame rate, colorspace. The philips SPC900nc is an exception to this, it lets you change fps after it starts in the videoSettings. But, generally we have to set that before the camera starts which is why it’s so important. I could say more why we need this feature, but I don’t want to hijack this thread heh. Hopefully eventually we can get a FPS setting for all platforms.

@ Progen, that’s not good news :frowning: I’ll PM Alex and point him to this thread. I wonder what he changed between the version you had working and the current one.

Should we look into using his PS3lib and SDK instead or should the directshow one work the same you think?[/quote]

cerupcat, it is the best if you can use the PS3Eye SDK since it provides minimal latency and the best performance. You will see much improvements in both performance and stability if you run it under Vista as opposed to XP. This especially applies when running at high frame rates.
I will look into DirectShow filter issue. It is a major pain to write DS video source filter since there is not much info about this process out there…

~Alex