The Morphonome® Image Psychophysics Software

and Calibrator for Macintosh Systems


Christopher W. Tyler and Brennan McBride


Smith-Kettlewell Eye Research Institute

2232 Webster Street, San Francisco Ca 94115 USA


Phone: (415) 561-1640 Fax: (415) 561-1610





Software for measurement of psychophysical thresholds with 2D moving and coloured images is described. It is menu-driven and has contrast resolution to 0.2% without hardware modifications. A calibrator to provide the full calibration of the Macintosh monitor required by the software is also described.



A core function of psychophysical testing is the measurement of contrast sensitivity for spatial patterns specified with some mathematical luminance profile and a controlled time-course. Desk-top computers would appear to be ideally suited for such a task and yet most of the software for such computers requires special-purpose hardware modifications and software that requires programming to achieve the desired experimental configuration. In particular, there seems to be no self-contained software for threshold psychophysics that take advantage of the graphics sophistication of the Macintosh computer.

We have therefore developed a software package for psychophysical testing of image detectability for Macintosh computers that is menu-driven for ease of use. The challenge in this enterprise was to develop stimuli with sufficient resolution of fine contrast variations to allow measurement of human contrast sensitivity, which can be as low as a 0.2% difference between light and dark regions of the stimulus. This resolution is not possible with conventional stimulus profiles on a standard 3 x 8-bit Macintosh display, whose smallest luminance step at mid-luminance is about 1.5%, due to the accelerating nonlinearity of phosphor luminance output.

A technique that allows increased luminance resolution on any digital computer with a colour monitor is the "bit-stealing" procedure introduced by Tyler et al. (1990), in which the colour values are jittered within each pixel to provide a wider range of luminance combinations from which to choose. This approach amounts to relaxing the accuracy of the chromatic signal to provide greater accuracy on the luminance signal at an individual pixel. Under a wide range of conditions, sensitivity to chromatic contrast is lower than that for luminance contrast. A trade of bit-resolution between these two modalities can therefore allow increased luminance precision without detectable loss of colour fidelity under many conditions.

The bit-stealing algorithm requires calibration of the output luminance levels to high accuracy for each of the 256 steps of the look-up table for each colour gun. We have therefore developed an automated calibration system with "plug-and-play" operation through the ADB bus (the Macintosh keyboard and mouse connectors) that provides a full calibration in about 30 minutes. This calibrator provides an exact specification of every look-up table value without curve-fitting or approximation formulas.


Fig. 1. Examples of stimuli based on sinusoidal and ramp modulation profiles that may be generated by the software.


Features of the Basic Software Package for Image Psychophysics.

The Morphonome® software package for image psychophysics allows generation and presentation of a wide spectrum of 2-D grey-scale images for psychophysical testing of the limits of human perception with the Macintosh II genus of computers. The software is designed in a modular series of menus for maximum flexibility. Repetitive stimulus patterns are based on sinusoidal, square and ramp luminance profiles. These profiles are expressed in the 2D image in the form of linear gratings, concentric gratings, radial spoke figures, two-grating checkerboards, three-grating hexagonal patterns and so on. Spatial frequency, orientation and contrast are freely selectable. Profiles consisting of 2D Gaussian and 2D difference of Gaussian functions are also available as are one and two-dimensional noise patterns. The sizes of all stimuli may be selected in increments up to the height of the monitor screen.

Any pattern may be windowed with one of a variety of 2D windowing functions including square, circular, disk/annulus hard-edged windows and 2D Gaussian fade, derivative of Gaussian, and Gaussian ring envelopes. The circularly symmetric envelopes have variable ellipticity and orientation. Multiple patch combinations of these patterns are also possible. Center/surround and split-field configurations between any of the pattern varieties are available.

The images are generated under parametric control to permit a wide variety of published and novel experiments including detection threshold, static masking, dynamic masking, noise masking, contrast discrimination and contrast matching.

The luminance scale is fully linearizable to 99% Michelson contrast (with monitor calibration). A parametrically variable sample of "gamma" functions is provided to allow perceptual equalization of the luminance scale for specific applications that require such departures from physical linearity. Output contrast can be varied in increments of as little as 0.2% by the means of the software "bit-stealing" algorithm. An invariant base contrast of the selected pattern can be set to any level. Patterns may be contrast-balanced or unidirectionally biased from the mean luminance.

Contrast and its modulation are controlled by the technique of look-up table animation, in which the contrast properties of the screen image are modulated by recomputing the video look-up table on a frame-by-frame basis. Separate control of up to four different image on the screen may be obtained by splitting look-up table into two or four separate functions (with a corresponding loss in the number of available luminance levels for each independent image). Only one such function may be independently varied in the psychophysical task, however.

A variety of temporal presentation profiles is available including pulses with durations down to 15 msec, raised cosine temporal envelopes of various durations and a full range of flicker rates. Adjustment, yes/no or two-alternative forced-choice psychophysical procedures are selectable for the measurement of threshold sensitivity levels.


Recent Enhancements: Motion, Colour, Noise

A prototype version of the software is now available with the ability to present stimuli with the attributes of motion, colour and visual noise. Either test or mask stimuli may be in these forms, which may be modulated by any of the window functions in a similar fashion to the luminance stimuli, including variation of motion drift rates. The program is designed to measure contrast thresholds for such stimuli and does not address the full range of psychophysical paradigms that might be envisaged in these dimensions.

Moving stimuli are generated with a two-phase motion algorithm suggested by Mulligan (personal communication). Two fields are interlaced on the screen in the two fields of a 1-pixel checkerboard. When the fields consist of a sinusoidal pair in spatial-temporal quadrature, a drifting modulation is generated within any of the available contrast modulation envelopes. For a Gaussian envelope, this procedure generates the "stationary moving Gabor patch" in widespread use for studies of motion perception.

Chromatic stimuli on either the red-green and yellow-blue axes are selectable, with adjustment to equiluminance for the human observer. Full control of stimulus chromaticity is, however, not yet available.

Stimulus modulations of one- and two-dimensional pixel noise, in the form of either static (changing from trial-to-trial) or modulatable dynamic noise, are available for use as either a masking stimulus for any of the other test stimuli or as a test stimulus to study the visibility of noise as such.


Technical Requirements.

The Morphonome® software was written in C and is compatible with versions 6.07 and 7 of the Macintosh Operating System. It runs on the Macintosh LC, II, Centris, Quadra, Performa and PowerPC families of computers. A floating-point coprocessor (FPC) is required in those Macs on which it is not a standard component. (A non-FPC version of the software is also available for those computers without one, although it may then run too slowly for many applications except on the PowerMac.)

The bit-stealing display software requires a colour monitor and 24-bit graphics card for its operation. Any size of Macintosh monitor is supported. The program will run with monochrome monitors, but the enhanced gray-scale resolution provided by the bit-stealing will not operate. It also will run on reduced bit-range colour monitors, such as those in the colour Powerbooks. (Since it relies on look-up table animation, the program will not work with the "thousands" or "millions" modes selected for the graphics card, in which the output values are directly specified for each individual pixel in a full-screen array instead of being coded into a look-up table of limited size).

With Macintosh System 7, operation of the software is subject to system interrupts. It is important to turn off any software that may generate interruption events, such as network access, during psychophysical testing.

The application is normally assigned 2 Mbyte of application memory, which can be reduced if there are memory constraints or increased for use with large stimulus sizes. Reducing memory will constrain the number and size of stimuli attainable, but should not be a problem on standard size monitors.


Features of the Smith-Kettlewell Macintosh LightMouse®

We have developed a calibrator with "plug-and-play" operation for monitors attached to a Macintosh computer. The calibrator is termed a "LightMouse®" because it plugs into the Macintosh mouse bus for maximum flexibility across platforms (although care should be taken not to plug in while the computer is switched on , as irreversible damage may result). It allows calibration of any region of a monitor screen in about 15 minutes. The LightMouse®package is independent of the Morphonome® software but must be run on a Macintosh system.

A photocell with a CIE photopic filter is attached to the monitor screen and sends a signal to the A/D converter of the LightMouse®. The digital signal is input through the ADB bus (keyboard and mouse bus) to allow use with any of Macintosh II and PowerMac family of computers. When calibrating, the system steps through all the look-up table levels for each colour gun are with sufficient time for the monitor output to settle before each reading is taken. The luminance of each gun is stepped first up and then down, to average over any warm-up or drift effects. The output, calibrated in candelas per meter2 to the accuracy of the photopic filter, is placed in an ASCII calibration table ready for use by the Morphonome® software or any other application designed to recognize it. The output file may be read and graphed by software such as an Excel® spreadsheet. It should be emphasized that all look-up table levels are calibrated without use of interpolation formulas, which tend to introduce transition artifacts visible as spurious edges in smooth gradients.


Conflict-of-Interest Statement. The Morphonome® and LightMouse® packages are distributed at cost on a non-profit basis through the Smith-Kettlewell Eye Research Institute for the benefit of the vision community.



The LightMouse®package was developed at Smith-Kettlewell in conjunction with Dr. Anthony M. Norcia, Steven Chung (hardware engineer) and Kirk Swenson (software engineer).



Tyler C.W., Chan H., Liu L., McBride B. & Kontsevich L.L. (1992) Bit-stealing: How to get 1786 or more grey levels from an 8-bit color monitor. Proc. SPIE 1666, 351-364.