← Back

ofxPS3EyeGrabber

github.com/bakercp/ofxPS3EyeGrabber · @bakercp
OF 0.10 Video/Camera

A Sony PS3 Eye Camera grabber for openFrameworks.

92 17 Last commit 8y ago Created 12y ago

Forks

Forks pushed to more recently than bakercp/ofxPS3EyeGrabber itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

Elc3r/ofxPS3EyeGrabber by @Elc3r · ★ 0 · pushed 3mo ago
avilleret/ofxPS3EyeGrabber by @avilleret · ★ 0 · pushed 7y ago

README

ofxPS3EyeGrabber



Description



A Sony PS3 Camera grabber for openFrameworks.

Features



This class extends ofBaseVideoGrabber making it easy to drop in to existing projects.

This addon is largely based upon the great work of @inspirit found here.

This addon is largely intended for OSX and Windows, as Linux has a built-in driver available by default through ofVideoGrabber.

This addon requires libusb for direct camera access. Rather than including that library in this addon, it is easier to simply include ofxKinect, which is a core addon and already contains the libusb libraries needed for this addon to work across platforms.

Resolution and Framerate



The current drivers support the following resolutions and framerates:

ResolutionFrame RateNotes
640x48083 Hz_Partially corrupted frames._
640x48075 Hz
640x48060 Hz
640x48050 Hz
640x48040 Hz
640x48030 Hz
640x48025 Hz
640x48020 Hz
640x48015 Hz
640x48010 Hz
640x4808 Hz
640x4805 Hz
640x4803 Hz
640x4802 Hz
320x240290 Hz_Partially corrupted frames._
320x240205 Hz_Partially corrupted frames._
320x240187 Hz
320x240150 Hz
320x240137 Hz
320x240125 Hz
320x240100 Hz
320x24075 Hz
320x24060 Hz
320x24050 Hz
320x24040 Hz
320x24037 Hz
320x24030 Hz
320x24017 Hz
320x24015 Hz
320x24012 Hz
320x24010 Hz
320x2407 Hz
320x2405 Hz
320x2403 Hz
320x2402 Hz
Frame rates greater than noted above will default to the next slowest valid frame rate.

The number of cameras that can be used simultaneously at each framerate and resolution is limited by the 480Mbit/s data transfer rate of USB 2.0. This vaue is per USB bus, so if you have multiple USB busses (e.g. through additional PCI cards, etc), you can increase the number of cameras accordingly. In practice, it's been observed that the data rate usually maxes out around 384Mbit/s (about 80% of the theoretical maximum) which may be due to other items using the USB bus (pointing devices, keyboards, disks, etc), processing power or other factors.

Linux



While Linux has a built-in driver for the PS3 Eye Camera, this addon offers more configuration flexibility. If you don't need that flexibility, the default ofVideoPlayer should give you access on Linux. If you need additional framerates, lower bandwidth, raw bayer data, etc, then this addon is for you.

This addon uses libusb to directly communicate with the camera. It disables the built-in kernel driver and re-enables it upon exit. To access the USB hardware directly you need to run your application with sufficient permissions. You can do that by running your application with sudo (e.g. sudo ./myApplication) or set up a Udev rule as described below.

The PS3 Eye camera has a USB vendor id of 1415 and a USB product id of 2000. To allow direct libusb access without root permissions on a Debian linux variant (e.g. Ubuntu, Raspbian, etc) add a new udev rule for your cameras by creating a new file

/etc/udev/rules.d/ps3_eye_camera.rules


and add the following line:

ATTR{idVendor}=="1415", ATTR{idProduct}=="2000", MODE+="777"


Getting Started



To get started, generate the example project files using the openFrameworks Project Generator.

Documentation



API documentation can be found here.

Build Status



Linux, macOS Build Status

Visual Studio, MSYS Build status

Compatibility



Branches



The stable branch of this repository is meant to be compatible with the openFrameworks stable branch, which corresponds to the latest official openFrameworks release.

The master branch of this repository is meant to be compatible with the openFrameworks master branch.

Some past openFrameworks releases are supported via tagged versions, but only stable and master branches are actively supported.

Requirements



Versioning



This project uses Semantic Versioning, although strict adherence will only come into effect at version 1.0.0.

Licensing



See LICENSE.md.

Contributing



Pull Requests are always welcome, so if you make any improvements please feel free to float them back upstream :)

1. Fork this repository. 2. Create your feature branch (git checkout -b my-new-feature). 3. Commit your changes (git commit -am 'Add some feature'). 4. Push to the branch (git push origin my-new-feature). 5. Create new Pull Request.

Get this addon

HTTPS
SSH