ImagingStereoDemo([stereoMode=8][, usedatapixx = 0][, writeMovie = 0][, reduceCrossTalkGain = 0])

Demo on how to use OpenGL-Psychtoolbox to present stereoscopic stimuli
when the Psychtoolbox imaging pipeline is enabled. Use of the imaging
pipeline allows for more flexible and high quality stereo display modes,
but it requires graphics hardware with support for at least framebuffer
objects and Shadermodel 2.0. Any half-way recent graphics card provides
those features as part of OpenGL 2.0. See the Psychtoolbox Wiki about
gfx-hardware recommendations. The demo also shows how to configure the
pipeline to restrict image processing to some subregion of the display,
e.g., to save some computation time on low-end hardware.

Press escape key to abort demo, space key to toggle modes of specific

Optional parameters:

‘stereoMode’ specifies the type of stereo display algorithm to use:

0 == Mono display - No stereo at all.

1 == Flip frame stereo (temporally interleaved) - You’ll need shutter
glasses that are supported by the operating system, e.g., the
CrystalEyes-Shutterglasses. Psychtoolbox will automatically generate blue
sync lines at the bottom of the display.

2 == Top/bottom image stereo with lefteye=top also for use with special
CrystalEyes-hardware. Also used by the ViewPixx Inc. DataPixx device for
frame-sequential stereo with shutter glasses, and with various other products.

3 == Same, but with lefteye=bottom.

4 == Free fusion (lefteye=left, righteye=right): Left-eye view displayed
in left half of window, right-eye view displayed in right-half of window.
Use this for dual-display setups (binocular video goggles, haploscopes,
polarized stereo setups etc.)

5 == Cross fusion (lefteye=right …): Like mode 4, but with views

6-9 == Different modes of anaglyph stereo for color filter glasses:

6 == Red-Green
7 == Green-Red
8 == Red-Blue
9 == Blue-Red

If you have a different set of filter glasses, e.g., red-magenta, you can
simply select one of above modes, then use the
SetStereoAnglyphParameters() command to change color gain settings,
thereby implementing other anaglyph color combinations.

10 == Like mode 4, but for use on Mac OS/X with dualhead display setups.

11 == Like mode 1 (frame-sequential) but using Screen’s built-in method,
instead of the native method supported by your graphics card.

100 == Interleaved line stereo: Left eye image is displayed in even
scanlines, right eye image is displayed in odd scanlines.

101 == Interleaved column stereo: Left eye image is displayed in even
columns, right eye image is displayed in odd columns. Typically used for
auto-stereoscopic displays, e.g., lenticular sheet or parallax barrier

102 == PsychImaging(‘AddTask’, ‘General’, ‘SideBySideCompressedStereo’);
Side-by-side compressed stereo, popular with HDMI stereo display devices.

103 == Setup for stereo display on a VR HMD.

‘usedatapixx’ If provided and set to a non-zero value, will setup a
connected VPixx DataPixx device for stereo display.

‘writeMovie’ If provided and set to a non-zero value, will write a movie
file ‘’ into the current working directory which captures
the full performance of this demo. A setting of 1 will only write video,
a setting of 2 will also write an audio track with a sequence of ten
successive beep tones of 1 sec duration.

‘reduceCrossTalkGain’ If provided and set to a greater than zero value, will
make background 50% gray and demo the crosstalk reduction shader.

Finnegan Calabro -
Mario Kleiner - at

Path   Retrieve current version from GitHub | View changelog