The Psychophysics Toolbox

Similar documents
The Eyelink Toolbox: Eye Tracking with MATLAB and the Psychophysics Toolbox.

Using MATLAB to Measure the Diameter of an Object within an Image

Strategic Plan Proposal: Learning science by experiencing science: A proposal for new active learning courses in Psychology

CE 504 Computational Hydrology Computational Environments and Tools Fritz R. Fiedler

PERSPECTIVE. How Top-Down is Visual Perception?

The Effects of Reading Speed on Visual Search Task

A Survey of Video Processing with Field Programmable Gate Arrays (FGPA)

Visibility of Noise in Natural Images

Bernice E. Rogowitz and Holly E. Rushmeier IBM TJ Watson Research Center, P.O. Box 704, Yorktown Heights, NY USA

Embedded Vision on FPGAs The MathWorks, Inc. 1

Introduction to MATLAB for Data Analysis and Visualization

Data Analysis with MATLAB The MathWorks, Inc. 1

Potential of face area data for predicting sharpness of natural images

B2.53-R3: COMPUTER GRAPHICS. NOTE: 1. There are TWO PARTS in this Module/Paper. PART ONE contains FOUR questions and PART TWO contains FIVE questions.

Visualizing the Doppler Effect

Reduction of the flash-lag effect in terms of active observation

Introduction to MATLAB Gergely Somlay Application Engineer

H 261. Video Compression 1: H 261 Multimedia Systems (Module 4 Lesson 2) H 261 Coding Basics. Sources: Summary:

ML2VR Providing MATLAB Users an Easy Transition to Virtual Reality and Immersive Interactivity

ÖZGÜR YILMAZ, Assistant Professor

Analecta Vol. 8, No. 2 ISSN

Solving Big Data Problems in Computer Vision with MATLAB Loren Shure

Bringing Big Data Modelling into the Hands of Domain Experts

The Number of Cortical Neurons Used to See

WE ARE in a time of explosive growth

RESEARCH ON SPOKEN LANGUAGE PROCESSING Progress Report No. 29 (2008) Indiana University

Wrist Audio Player Link Soft for Macintosh. User s Guide

Demo: Real-time Tracking of Round Object

3D Scanner using Line Laser. 1. Introduction. 2. Theory

Temporal Sampling and Interpolation

THE MS KINECT USE FOR 3D MODELLING AND GAIT ANALYSIS IN THE MATLAB ENVIRONMENT

Implementation of Canny Edge Detector of color images on CELL/B.E. Architecture.

A Guided User Experience Using Subtle Gaze Direction

Colorado School of Mines Computer Vision Professor William Hoff

Curriculum Vitae. Adriane E. Seiffert. January 5, 2010

Image Acquisition Toolbox Adaptor Kit User's Guide

Tobii AB. Accuracy and precision Test report. Tobii Pro X3-120 fw Date: Methodology/Software version: 2.1.7*

VALAR: A BENCHMARK SUITE TO STUDY THE DYNAMIC BEHAVIOR OF HETEROGENEOUS SYSTEMS

Image Spam Filtering Using Visual Information

Visualization Tools for Comprehensive Test Ban Treaty Research r n h F q

Motion processing: the most sensitive detectors differ in temporally localized and extended noise

Video-Based Eye Tracking

GStreamer for Engineering Video. Night Vision. Joshua M. Doe, Stephen D. Burks

Problem-Based Group Activities for a Sensation & Perception Course. David S. Kreiner. University of Central Missouri

Installation, Licensing, and Activation License Administration Guide

Dolby Vision for the Home

The Psychonomic Society, Inc. Vanderbilt University, Nashville, Tennessee

Appendix 4 Simulation software for neuronal network models

Controlling a Dot Matrix LED Display with a Microcontroller

A Master-Slave DSP Board for Digital Control

Roles of Smart TV in Internet of Things

CIELAB, GMA 1. INTRODUCTION

Low-resolution Image Processing based on FPGA

California Team Decision Making Application (TDM CA v.2.3) Technical Guide

Bandwidth Adaptation for MPEG-4 Video Streaming over the Internet

Feature Tracking and Optical Flow

dspace DSP DS-1104 based State Observer Design for Position Control of DC Servo Motor

Comparison of different image compression formats. ECE 533 Project Report Paula Aguilera

Cognitive Robotics: High-Level Robot Programming Inspired by Cognitive Science

Introduction to Computer Graphics

For Articulation Purpose Only

BANDWIDTH AFFECTS VISUAL LATERAL INTERACTIONS

Alarms of Stream MultiScreen monitoring system

2 Neurons. 4 The Brain: Cortex

Figure 2 Left: original video frame; center: low-delay image plane; right: high-delay image plane.

High-speed Photography with a Still Digital Camera

the Cornu spiral method applied to a single slit, and two

Chapter 3: Computer Hardware Components: CPU, Memory, and I/O

Tutorial for Tracker and Supporting Software By David Chandler

Chromatic Improvement of Backgrounds Images Captured with Environmental Pollution Using Retinex Model


Transparency and Occlusion

CELLULAR AUTOMATA AND APPLICATIONS. 1. Introduction. This paper is a study of cellular automata as computational programs

A Brief on Visual Acuity and the Impact on Bandwidth Requirements

Image Spam Filtering by Content Obscuring Detection

58 A Survey of Image Processing Software and Image Databases

A Computer Vision System for Monitoring Production of Fast Food

Active Vibration Isolation of an Unbalanced Machine Spindle

Integrating MATLAB into your C/C++ Product Development Workflow Andy Thé Product Marketing Image Processing Applications

Post-Doctoral Research Fellow, Volen Center for Complex Systems, Brandeis University. Sponsor: Robert Sekuler. July August 2013.

The STC for Event Analysis: Scalability Issues

Computer Based Training Proposal for Design Solutions, Inc. Created by: Karen Looney EME 6930 Flash PLE

Comp 410/510. Computer Graphics Spring Introduction to Graphics Systems

The Capacity of Visual Short- Term Memory Is Set Both by Visual Information Load and by Number of Objects G.A. Alvarez and P.

Quantitative vs. Categorical Data: A Difference Worth Knowing Stephen Few April 2005

Artificial Neural Network for Speech Recognition

Assessment. Presenter: Yupu Zhang, Guoliang Jin, Tuo Wang Computer Vision 2008 Fall

MATLAB Instrument Driver

Annotated bibliographies for presentations in MUMT 611, Winter 2006

Modeling Public Pensions with Mathematica and Python II

Speeding up MATLAB and Simulink Applications

Human behavior analysis from videos using optical flow

About Parallels Desktop 7 for Mac

Outline. Quantizing Intensities. Achromatic Light. Optical Illusion. Quantizing Intensities. CS 430/585 Computer Graphics I

Digital Camera Imaging Evaluation

Using visible SNR (vsnr) to compare image quality of pixel binning and digital resizing

EDIT202 PowerPoint Lab Assignment Guidelines

CA Nimsoft Monitor. Probe Guide for E2E Application Response Monitoring. e2e_appmon v2.2 series

Transcription:

The Psychophysics Toolbox David H. Brainard Department of Psychology UC Santa Barbara Santa Barbara, CA 93106 Short Title: The Psychophysics Toolbox Corresponding Author David H. Brainard Department of Psychology UC Santa Barbara Santa Barbara, CA 93106 brainard@psych.ucsb.edu This paper appeared in Spatial Vision, 10, 433-436. This version has been slightly modified from the published version to reflect changes in the toolbox software and website.

http://color.psych.ucsb.edu/psychtoolbox Abstract The Psychophysics Toolbox is a software package that supports visual psychophysics. Its routines provide an interface between a high-level interpreted language (MATLAB on the Macintosh) and the video display hardware. A set of example programs is included with the toolbox distribution. Introduction The attraction of using computer displays for visual psychophysics is that they allow software specification of the stimulus. To provide the required precision, experimental programs are usually written in a low-level language (e.g. C or Pascal). Although these languages provide power and flexibility, they are not conducive to rapid program development. Interpreted languages (e.g. LISP, Mathematica, or MATLAB) are abstracted from hardware details and provide friendlier development environments. Most interpreted languages are not designed to support psychophysics, however, and do not allow precise stimulus specification. The Psychophysics Toolbox is a software package that adds this capability to the MATLAB application on Apple Macintosh computers. MATLAB is a high level interpreted language with extensive support for numerical calculations (The MathWorks, 1993). The Psychophysics Toolbox interfaces between MATLAB and the Macintosh hardware. The toolbox's core routines provide access to the display frame buffer and color lookup table, allow synchronization with the vertical retrace, support millisecond timing, and facilitate the collection of observer responses. Ancilliary routines support commonly used procedures such as color space transformations (Brainard, 1995) and the QUEST (Watson and Pelli, 1983; Pelli and Farell, 1995) threshold seeking algorithm. Examples and Uses Table 1 lists a simple MATLAB program that uses the Psychophysics Toolbox to display a flickering counterphase grating. Steps 1 and 2 of the example use standard MATLAB functions to compute a the grating and a series of color lookup tables. Steps 3-5 use Psychophysics Toolbox

routines to flicker the grating at the center of the screen. The program is intended only as an illustrative example. An extended version of this example that incorporates gamma correction is provided in the distribution. Other example programs provided in the distribution implement visual search, detection of dot symmetry and motion, lightness matching, magnitude estimation of line length, and measurement of contrast thresholds in static noise. Many of these were designed as experimental modules for an undergraduate laboratory course on perception and may be useful for teaching. [Table 1 about here.] An email poll of users revealed that the toolbox has been used to measure a variety of psychophysical thresholds (e.g. detection of gratings and letters in noise), to display stimuli for functional MRI and electrophysiogical experiments, to measure asymmetric color matches, to evaluate image compression algorithms, and to study categorization, perceptual learning, visual search, and visual object recognition. Implementation The core routines of the Psychophysics Toolbox are MATLAB Extension (MEX) files. They are written in C and compiled into an object format recognized by MATLAB. As such, they may be called directly from MATLAB programs. The MEX files run on both 680x0 and PowerPC Macintoshes. The core routines rely on the subroutines in Pelli's VideoToolbox (Pelli and Zhang, 1991; Pelli, 1996) which provide low-level control of the Macintosh display hardware. The toolbox distribution includes the C source for the MEX files. Documentation and Availability The Psychophysics Toolbox is available at the web site. Installation consists of adding a single folder (approximately 2.5 megabytes) to MATLAB's collection of toolboxes. The distribution includes example programs and source code. The software may be used freely for teaching or research. It may not used for commercial gain without permission of the author.

Acknowledgments Many people have contributed to the development of the Psychophysics Toolbox. Full acknowledgments are provided at the web site. Denis Pelli wrote the VideoToolbox routines (Pelli, 1996) on which the Psychophysics Toolbox relies and modified these routines for use in MEX files. More recently he has contributed substantially to the Psychophysics Toolbox itself. Macintosh is a trademark of Apple Computer Inc. Mathematica is a trademark of Wolfram Research Inc. MATLAB is a trademark of The MathWorks Inc. PowerPC is a trademark of International Business Machines Corporation. Development of the Psychophysics Toolbox was supported in part by NSF DUE9350868 and by NEI EY 10016. References Brainard, D. H. (1995). Colorimetry. InHandbook of Optics: Volume 1. Fundamentals, Techniques, and Design. M. Bass (ed.). McGraw-Hill., New York, 26.1-26.54. The MathWorks. (1993). MATLAB User's Guide. The MathWorks, Inc., Natick, MA. Pelli, D. G. (1997). The VideoToolbox software for visual psychophysics. Spatial Vision, 10, 437-442. Pelli, D. G.& Farrell, B. (1995). Psychophysical methods. InHandbook of Optics: Volume 1. Fundamentals, Techniques, and Design. M. Bass (ed.). McGraw-Hill., New York, 29.1-29.13. Pelli, D. G.& Zhang, L. (1991). Accurate control of contrast on microcomputer displays. Vision Research 31, 1337-1350. Watson, A. B.& Pelli, D. G. (1983). Quest: a Bayesian adaptive psychometric method. Perception and Psycophysics 33, 113-120. Table Caption Table 1. Listing of a simple MATLAB program that uses the Psychophysics Toolbox to display a flickering counterphase grating. Steps 1 and 2 use standard MATLAB functions to compute a

sinusoidal grating and a series of color lookup tables. Steps 3-5 use Psychophysics Toolbox routines to display the flickering grating.

[Note: This demo program is now out of date, although its flavor is still representative. Up-to-date demos may be found in the toolbox itself or on the web site.] % STEP 1: Create a sinusoidal image in a MATLAB matrix. The % grating is scaled between 1 and 255. The creation % happens in two steps. First create a sinusoidal vector, % then replicate this vector to produce a sinusoidal image. % The replication is done by an outer product. This is not % the fastest way to do it in MATLAB, but it is a little % clearer. npixels = 256; cyclesperimage = 4; sinvector = 1+ 254*(1 + sin(2*pi*cyclesperimage*(1:npixels)/npixels))/2; sinimage = ones(npixels,1)*sinvector; % STEP 2: Create a set of color lookup tables (cluts) for animating the % grating. Each clut is a 256 by three matrix. We compute a set of % cluts that will produce one cycle of counterphase flicker. These % are all stored in a single large matrix (thecluts). We also create % a uniform clut (offclut) to initialize the display. The variable % ncluts determines the number of temporal quantization intervals. ncluts = 80; thecluts = zeros(256,3*ncluts); thecontrasts = sin(2*pi*(0:ncluts-1)/ncluts); for i = 1:nCluts contrast = thecontrasts(i); lowval = 127.5 - contrast*127.5; highval = 127.5 + contrast*127.5; clutentries = [round(linspace(lowval,highval,256)')]; thecluts(:,(i-1)*3+1:i*3) = clutentries*ones(1,3); end offclut = 128*ones(256,3); % STEP 3: Open up the a window on the main screen, initialize the clut, % and draw a grating onto the screen. This is done by calling the % SCREEN function of the Psychophysics Toolbox. The SCREEN function % performs a variety of display tasks according to its text argument. SCREEN('OpenScreen',128,0); SCREEN('SetClut',offClut); SCREEN('PutImage',sinImage); % STEP 4: Animate the clut. The clut animation is handled by a % SCREEN function which synchronizes clut writes to the vertical % blank of the display. firstclutentry = 0; framesperclut = 3; ncycles = 2; HideCursor; SCREEN('ClutMovie',theCluts,firstClutEntry,framesPerClut,nCluts*nCycles); SCREEN('SetClut',offClut); ShowCursor; % STEP 5: Close up the screen and exit. SCREEN('CloseScreen');

Table 1