PROPixx Demo 6 -- Drawing in 3D using RB3D mode ============================================================== Red-Blue 3D mode (RB3D) is a grayscale 3D mode in which we create a 3D stimili using blue color information for the left eye image and the red information for the right eye image. .. Note:: PROPixx Revision 20 or more is required for using this mode at a lower frame rate than 120 Hz. This mode can be ran at any refresh rate under or equal to 120 Hz. Each frame will show the left image at half-intensity for 1.2 ms, full intensity right image for 2.4 ms, then the left image for another 1.2 ms at half-intensity. The rest of the frame is blank. This results to the same exposure time for both eyes, and prevents bias of which image is projected first or last. This demo shows how to generate a basic 3D dot stimuli, identical to other stereo demos included in Psychtoolbox, in RB3D mode. Simply generate the information for your left image in the blue channel and the information of the right image in the red channel. To set the PROPixx in a different mode, we use a sequencer, ``Datapixx('SetPropixxDlpSequenceProgram', 1);``, the 1 is for RB3D mode, 3 is for setting up 480 Hz stimuli and 5 for 1440 Hz. Select 0 for normal display. In this mode you also have access to crosstalk correction. This allows you to modify the image to remove part of the other's eye image to correct the crosstalk effect. The default value of the crosstalk correction (CrosstalkRL and CrosstalkLR) is zero, it follows this formula : .. Math:: L_{final} = L_{initial} - CrosstalkRL \times R_{initial} These crosstalk factor can be set using: ``Datapixx('SetPropixx3DCrosstalkLR', 0);`` , ``Datapixx('SetPropixx3DCrosstalkRL', 0);`` and for setting both to the same value, ``Datapixx('SetPropixx3DCrosstalk', 0);`` At the end of the script, we put back the normal sequencer, ``Datapixx('SetPropixxDlpSequenceProgram', 0);``. .. literalinclude:: ../DatapixxToolbox/DatapixxDemos/DatapixxImagingStereoDemoRB3D.m :language: matlab :emphasize-lines: 33-35, 38-40, 137-138 :linenos: