|
|
|
MatVis will soon include many new features not
described in this users manual: Contents:
Introduction Members of the Neurometrics Institute have been working on an elaborate software platform for psychophysical testing called WinVis. While much remains to be done on the project, it has come to our attention that many users of MATLAB on the PC platform would like tools like those available to MATLAB users on the Macintosh. MatVis is our initial solution to this problem. MatVis provides MATLAB programmers a method of accurate screen control that is needed for psychophysical testing. Under the users control, MatVis, using a DirectX back end, adjusts the video screen resolution and framerate. Other processes are prevented from writing to the monitor and the user's processes achieve the highest operating system priority to prevent disruption of a timed video presentation. Before describing the basic design of MatVis, PC hardware considerations and limitations are reviewed. PC Platform under Windows95/98/2000/NT4.0 For many years the primary method of doing psychophysics on the PC platform has been to use specialized video hardware designed for Vision Science. Advances in off-the-shelf PC hardware are such that the majority of visual psychophysical testing can now be performed without exotic video hardware. Two Major PC Advances: (1) The main reason users of PC's have had to resort to expensive hardware specifically designed for vision science has been the limited graphics throughput of the ISA video bus and the limited bit depths and resolution of early graphics cards (6 bits/gun). Things have changed considerably with the coming of the dedicated AGP graphics bus plus modern high speed video cards (8 bits/gun) which support multiple screen resolutions and framerates. Full screen graphics images can now be updated at normal video frame rates using generic video graphics cards. Along with this increase in bus speed has been a parallel improvement in CPU performance. (2) The second advance which has occurred is Microsoft's release of a high speed graphics library designed for video game developers, which runs under for Windows95(98,2000) and NT. DirectDraw offers fast graphics screen updates with direct access to bitmap memory with a common API across PC video hardware platforms. Moreover, all the advantages of a modern operating system such as a GUI, flat memory space, virtual memory, multi-tasking, multi-threads offer additional advantages over specialized add-in graphics coprocessor boards with limited onboard memory. Resolution: As an example of the resolutions available, this document is being written on a PC with a generic graphics card that supports 27 display resolutions under NT 4.0 with DirectDraw, from 320 by 200 to 1600 by 1200 pixels. Most modes support 8, 16, 24 and 32 bits/pixel depths. The range of frame rates supported ranges from 43 to 200 Hz., though not all modes support all frame rates. This range of video modes is adequate for the majority of psychophysical studies (MatVis only supports 8 bits/pixel but will soon be upgraded). Video Bus Performance: For several years we have been touting the performance specifications of the AGP bus which has finally arrived. The common PCI video bus runs at 33 MHz for a maximum throughput of 133MBps (Million Bytes/second). The AGP2 bus, which is a dedicated graphics bus can operate at 528MBps. AGP2 mode 4, which is just starting to become available, supports over 1000MBps. The common 640 x 480 pixel 8 bit display refreshed at 528MBps would have an effective frame rate of 1719 Hz, far beyond present monitor capabilities. So much for theory. Using optimized assembly code we have measured data throughput from system memory to video memory (without synchronizing to the video frame) on our AGP bus machine and found rates as high as 203Mbps. At 640 x 480 pixels that's still an effective 661 Hz frame rate. The 203MBps rate is actually close to the maximum of 264 MBps for the standard 66 MHz memory bus using EDO DRAM chips. We expect the new PCs with a 100-133 Mhz memory bus to have a much higher throughput. Intel Corp. has announced that chipsets supporting DirectDRAM with a throughput of 1600MBps. The theoretical video throughput (~1600MBps) could reach an effective 277 Hz frame rate for 1600 x 1200 pixel displays with a 24 bit pixel depth. If the hardware is not fast enough today, it soon will be. MatVis uses a double buffer technique to completely change the active display buffer during the vertical retrace period to avoid screen tearing artifacts. On our Pentium II (300 MHz) system, MatVis can move a sequence of 640 x 480 pixel images from system memory to video memory, while respecting video synchronization, at the highest frame rate supported, 200 Hz. In 1024 x 768 video mode, synchronization was still achieved without dropping frames at the 90 Hz frame rate. These rates correspond to about 70MBps. Given that video synchronization should add little overhead, once we convert to optimized assembly code (which attained a throughput of 203Mbps) MatVis throughput should significantly increase. Not everyone will upgrade to the AGP bus system immediately. Fortunately, PCI bus systems offer respectable performance and will be suitable for the majority of psychophysical studies. Even our 120MHz Pentium computers with PCI bus achieved synchronized 640 x 480 pixel x 8 bit full screen update at normal video rates. This system is what we consider to be the minimum hardware requirement for MatVis. Does the modern PC constitute an adequate video hardware platform for performing the majority of psychophysical studies? The answer is yes. The Pixel Depth Problem: One area where specialized hardware for vision science excels is available pixel depths of 10-15 bits/gun. Most generic PC graphics cards offer 8 bits/gun (currently MatVis supports only 8 bits total/pixel using a 24 bit LUT). This limited bit depth is a problem, especially when performing tasks such as contrast sensitivity where fine gray scale control is critical. Fortunately, methods exist that effectively extend the bit depth beyond 8 bit using external resister circuits (Pelli & Zhang, 1991). Other methods include splitting the luminance information for one pixel across 2 pixels, one for the coarse color level of each gun and one for fine steps in color space by taking advantage of the strong gamma function nonlinearity of video card output voltage to display luminance. This method has the limitation of doubling the viewer distance to achieve a desired pixel size and possibly lowering the maximum luminance. These methods of compensating for limited bit depth are annoying but quite adequate for most applications. In summary: The hardware capabilities of today's PC meets the requirements of most psychophysical studies. The arrival of the AGP bus and increased memory bus speeds has eliminated the need for specialized graphics cards for most psychophysical experimentation. The advantage of using generic components is low cost and rapid upgrades as the technology improves. MatVis automatically scales to take advantage of the system's graphics capabilities. The special purpose proprietary hardware boards found in many of today's vision testing systems are very costly due to limited demand. They don't offer the rapidly increasing capabilities that is exhibited by main stream video cards. The use of generic video hardware offers many advantages over the proprietary approach. The main area that proprietary systems have the advantage is in lookup table (LUT) depth for luminance/color control. The 10 to 15 bit lookup tables of the specialized graphics cards offer an advantage in terms of gray scale linearization for contrast sensitivity measurements and fine color control. Alternative methods of linearization exist which can be utilized (Tyler et. al, 1992; Pelli & Zhang, 1991; Klein & Carney, 1990; 1991; Carney & Klein, 1998) to effectively extend the bit depth of generic graphics cards. Off-the-shelf PC video hardware of is capable of providing the necessary display resolutions and frame rates needed for the vast majority of visual psychophysics experiments. The hardware is only going to get better as faster CPU and memory systems are released and the new AGP graphics bus standard is in general use. MatVis automatically scales to take advantage of new hardware. The need for an expensive graphics system specially designed for vision science will become increasingly rare as the technology advances.
Structure of MatVis MatVis is particularly well suited to performing psychophysical experiments using the method of constant stimuli.
The basic setup of an experiment involves initialization of MatVis, declaring the number of stimulus conditions
(trials), building the stimuli and loading them into MatVis, setting up LUTs if needed and finally presenting the
stimuli using the "run" command. We have written a wrapper program in MATLAB which makes it
particularly
easy to setup an experiment (provided with the purchase of MatVis). The user just writes a simple module for generating
the desired patterns and the wrapper code takes care of stimulus presentation, data collection, subject feedback
and final data and parameter storage for later examination. The MatVis system is not limited to method of constant
stimuli, it is just the procedure that we most commonly use. clear all;
Minimum Requirements: MatVis scales to the available system hardware. The better the hardware the more flexible and capable MatVis becomes. Even the minimum system (below) is able to provide full frame updates (640 x 480 x 8) at over 60 Hz. but considerably more memory is required for more than a few frames at this rate. Minimum System
Ideal System for displaying video sequences
Installation of MatVis Insert the disk into your computer drive A. From the task bar select "start", then "run".
In the box enter: " A:setup.bat c:\matlab\bin" (or the proper path to your
MATLAB bin directory). The
setup program will install two files into the bin directory. Assuming you have already installed DirectX (free
from www.microsoft.com), you should now be able to start using MatVis. In the
MATLAB command window type, MatVis('help').
The command window should then contain a list of the available MatVis commands, if not, something has gone wrong
with the setup. Future Plans When we have time to contemplate plans we will pass them on to you. We expect users will suggest many modifications to the system which will certainly keep us busy. |