Skip to content
This repository has been archived by the owner on Nov 1, 2019. It is now read-only.

Tools for video streaming and displaying on Oculus Rift via PsychoPy

License

Notifications You must be signed in to change notification settings

davidmwatson/videostreaming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

videostreaming

Python tools for streaming video from a camera and displaying feed on an Oculus Rift, accomplished via PsychoPy [1,2] and Matthew Cutone's psychxr module [3] + accompanying PsychoPy tools.

Scripts

  • videostreaming.py - Provides tools for acquiring images from camera, and for formatting these images for display in PsychoPy.
  • runDemo.py - A demonstration of using the above tools to run a video feed and display the images on an Oculus Rift. Also shows option of applying further post-processing to manipulate images (in this case, photo negating them).

Camera backends

Two backends are provided for acquiring images from the camera:

  • OpenCV - Fairly general purpose, should work with most cameras and manufacturers. Might not be able to access some manufacturer-specific camera features (e.g. free-run modes).
  • uEye SDK - Will only work for IDS uEye cameras, but does allow access to more specialised functions of those cameras.

It should be relatively easy to write other backends by sub-classing the base video streaming class.

Dependencies

  • Windows OS
  • Python3, 64-bit (code has been tested for Python 3.6)
  • PsychoPy (version >= 3.0). Note that the PsychoPy standalone cannot currently be used as this isn't available for 64-bit python.
  • psychxr module
  • Python bindings to OpenCV3
  • pyueye module along with uEyE drivers and SDK if wanting to use the uEye camera backend.
  • Oculus Rift Software - note that this will need to be open at all times to use the Oculus Python tools.

References

[1] Peirce, JW (2007) PsychoPy - Psychophysics software in Python. J Neurosci Methods, 162(1-2):8-13

[2] Peirce JW (2009) Generating stimuli for neuroscience using PsychoPy. Front. Neuroinform. 2:10. doi:10.3389/neuro.11.010.2008

[3] Cutone, M. D. & Wilcox, L. M. (2018). PsychXR (Version 0.1.4) [Software]. Available from https://github.com/mdcutone/psychxr

Acknowledgements

This work was funded by a Leverhulme Trust grant (RPG-2016-077) as part of a wider project researching the timescales of multi-sensory recalibration.

About

Tools for video streaming and displaying on Oculus Rift via PsychoPy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages