PS3EyeCapture tool for measuring input latency

This is for discussion and development of non-commercial open source VR/AR projects (e.g. Kickstarter applicable, etc). Contact MTBS admins at customerservice@mtbs3d.com if you are unsure if your efforts qualify.
Post Reply
BillRoeske
Cross Eyed!
Posts: 102
Joined: Fri May 18, 2012 5:31 pm
Location: Houston, TX
Contact:

PS3EyeCapture tool for measuring input latency

Post by BillRoeske »

I recently started in on a new hobby project game engine in my spare time and wanted a way to keep an eye on the input latency. Counting video frames between input and on-screen reaction time is a common way to do that at this point, but I didn't have a traditional high-speed camera. Thankfully, Code Laboratories wrote a nice Windows driver for grabbing high-speed progressive input from a PS3 Eye camera (as many of us have used).

PS3EyeCapture is a simple program that uses the CL driver to capture up to ten seconds of 187fps QVGA greyscale video. Video frames are buffered in memory during capture and then written out to disk as a series of .bmp files labeled by time stamp. Each new capture session ends up in its own folder labeled by the date and time that capturing started.

Since I run the full-screen rendering tests and capturing the results on the same computer, PS3EyeCapture was designed to sit in the background of Windows and be controlled by global hot keys (Alt-Backspace to start/stop capturing and Alt-Escape to quit the program). It might be a little freaky for end-users at this point because the program literally disappears while it is running and the only visual indication of it working is the camera's red LED (which is lit when capturing video and blinks when writing the frames to disk after a capture).

It's nothing ground-breaking, but I thought it might be useful to someone else. :)

The source code and current release are available under the MIT license from the PS3EyeCapture Google Code page.

Feature Roadmap:
* Console window for text output (and to let people know that the program is running)
* Configure camera parameters (frame rate, gain, exposure) and capture limit via command line
* Camera preview window, if people really want it

Version History:
Version 1.2 (02/15/2013):
* Use the first available camera that initializes properly (rather than quitting if any number other than one camera is connected).
* Updated the error message that shows when no cameras initialize to indicate that one could be attached but not available because it's already in use.

Version 1.1 (02/15/2013):
* The file name for a captured image is its time stamp in (fractional) milliseconds since the Win32 epoch.
* Removed the milliseconds value from the captured sequence directory name.

Version 1.0 (02/15/2013):
* Initial release

Attached is a selection of images dumped from PS3EyeCapture while I was testing the first version of the rendering code, which draws black until mouse input is detected (it then switches to drawing white). I included every fourth image from the captured sequence between when I started seeing the mouse move up to when the screen started to change, where I switched up to including every image. The captions were added manually for illustrative purposes.

(Yes, the latency in the rendering example is terrible, no I'm not using GPU fences or true full-screen mode yet, yes I'm using a wireless mouse, and yes I'm using an LCD rather than a CRT for these measurements. That's a separate project that will be improved in time, and I'll be able to tell you by how much. ;))
You do not have the required permissions to view the files attached to this post.
Last edited by BillRoeske on Fri Feb 15, 2013 10:25 pm, edited 1 time in total.
User avatar
PatimPatam
Binocular Vision CONFIRMED!
Posts: 214
Joined: Thu Jun 28, 2012 1:31 pm
Location: Barcelona

Re: PS3EyeCapture tool for measuring input latency

Post by PatimPatam »

Thanks for sharing BillRoeske, this could be very useful!

Now I only need to buy a 2nd PS eye camera in order to measure the input latency of my 1st PS eye camera :-P
BillRoeske
Cross Eyed!
Posts: 102
Joined: Fri May 18, 2012 5:31 pm
Location: Houston, TX
Contact:

Re: PS3EyeCapture tool for measuring input latency

Post by BillRoeske »

My pleasure! Let me know if you get any use out of it or run into any issues. :)

I actually have a new version uploaded now that will support multiple cameras connected to a PC (it'll just use the first one that's available). If you go that route, I'd recommend making sure both cameras are connected to separate USB root hubs on your computer.
Post Reply

Return to “VR/AR Research & Development”