• No results found

Software Code Generation

In document Complex motion processing (Page 65-67)

R esponse profile of motion detector 0)

2.1.7 Software & Hardware

2.1.7.1 Software Code Generation

T he gen eratio n o f an im atio n s rep re sen tin g op tic flow is cen tral to the experim ents in this thesis. To do so, software developm ent has been carried out using the ‘C ’ program m ing language on an Apple © 0 4 personal com puter. This language offers close control over the hardw are, and is the language in w hich a num ber o f so ftw are ro u tin es have been w ritten by o th er p sy c h o p h y sic s researchers. These routines execute tasks that are com m on to m any experim ents, and they can be readily incorporated into original code when a new experim ent is designed. The Video Toolbox (Pelli, 1997) is a suite o f such routines that have been m ade available to psychophysicists, and w hich has been used extensively here.

2.1.7.2 Hardware

The personal com puter com prises three basic elem ents that determ ine the type o f tasks that can be undertaken on them : the central processing unit (CPU ), the graphics card and the visual display unit (VDU).

The CPU is the device that perform s any calculations that are required, a process that takes a finite am ount o f time, depending on the num ber and com plexity of those calculations. It m ay be required to generate new anim ations betw een experim ental trials, involving m any thousands o f individual operations, in a duration th at is acceptable to the ob serv er and the experim enter. A daptive m ethods o f stim ulus selection, such as the Q uest (W atson & Pelli, 1983) algorithm used here, also perform calculations betw een trials, as stim ulus value selection is partly dependent on the participant’s prior responses. The higher the processor speed, the m ore work can be undertaken in the tim e betw een trials. It is im p o rtan t to be aw are th a t the C P U is n o t only ru n n in g the u s e r’s experim ental software, but also services the O perating System (OS). The OS is a process that runs continually, occasionally m aking dem ands on CPU tim e to perform tasks unrelated to the experim enter’s program . In an experim ent where accurate rendering and tim ing o f anim ations is im portant, such interruptions are undesirable, and can lead to discrepancies betw een the intended display and the one presented. A w areness o f such issues, and softw are control over them during program m ing is needed to avoid unw anted interruptions during an experim ent.

The graphics card is positioned betw een the CPU and the visual display unit (V D U ). It stores im ages generated by the C PU in m em ory chips for rapid transm ission to the VDU. It is the quantity o f inform ation, and the speed with w hich it can be transm itted to the V D U that place one lim it on the types o f anim ation that can be displayed. To render an im age on a screen involves the individual control o f a m atrix o f picture elem ents, or pixels. The light em itted from each pixel on screen is determ ined by the quantity o f electrons applied to that pixel from an electron gun, which in turn is controlled by a num ber stored in the graphics card. It follow s that to display one im age requires at least as many num bers to be stored in the graphics card as there are pixels on screen. The higher the num ber o f pixels to be controlled, the m ore num bers have to be stored in the graphics c a rd ’s m em ory. H igh-resolution im ages are desirable, but carry

the twin penalties o f using large am ounts o f m em ory, and increasing the quantity o f inform ation that has to be transm itted. A third factor, refresh rate, com pounds the problem s o f presenting high fidelity im ages by reducing the am ount o f time available to m anipulate the inform ation to be displayed. The refresh rate is the frequency with which the display is updated w ith new inform ation. High display refresh rates are desirable to sim ulate sm ooth m otion since an anim ation is simply a series o f static im ages displayed in rapid succession. In order to present the illusion o f sm ooth m otion the sequence o f static im ages should be presented at a rate that exceeds the tem poral resolution o f the visual system . A dd to this the c h a llen g e of, for ex am p le, p rese n tin g ste re o sc o p ic im ag es and the subsequent dem ands on the hardw are can be great. One m ethod o f presenting stereoscopic im ages entails presenting tw o slightly d ifferen t versions o f an im age on alternate rasters o f the display. W hen view ed through shutter glasses that are synchronised to the display, one im age is seen by one eye through a transparent lens, while the other eye is obscured by an opaque lens. On the next fram e the situation is reversed. In this way two different im ages are seen during the sam e tem poral interval, m im icking the tw o slightly different views that the eyes have o f a scene by virtue o f their placem ent som e 6cm apart in the head. The requirem ent to interleave the im ages m eans that the effective flicker rate at each eye is h a lf that o f the display. R efresh rates o f 50H z to 60H z are w idely used in television transm issions to provide acceptable fidelity, being slightly above the critical flicker frequency o f m ost observers (R obson, 1966; Kelly, 1979). In the stereoscopic anim ation exam ple a 60H z refresh rate at each eye w ould dem and a graphics card capable o f running at 120Hz. Fortunately such cards are available, allow ing stereo ex p erim en ts to be perfo rm ed w ithout recourse to highly specialised and expensive equipm ent (e.g. Silicon Graphics).

In document Complex motion processing (Page 65-67)