1 / 13

Visual stimulus generation

Visual stimulus generation. ICN, UCL Session 5, 18 Jan 2007. MATLAB for Cognitive Neuroscience. Outline. Display parameters Stimulus parameters Cogent 2000 Photographs and pictures Text Cogent Graphics Photographs and pictures Text Costume graphics.

yoko
Download Presentation

Visual stimulus generation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visual stimulus generation ICN, UCL Session 5, 18 Jan 2007 MATLAB for Cognitive Neuroscience

  2. Outline • Display parameters • Stimulus parameters • Cogent 2000 • Photographs and pictures • Text • Cogent Graphics • Photographs and pictures • Text • Costume graphics

  3. screenMode = 0; % 0 for small window, 1 for full screen, 2 for second screen if attached screenRes = 2; % 800 x 600 resolution white = [1 1 1]; % foreground colour (optional) black = [0 0 0]; % background colour (optional) fontName = 'Helvetica'; % font parameters (optional) fontSize = 20; number_of_buffers = 5; % how many offscreen buffers to create Display parameters Reminder from previous session config_display(screenMode, screenRes, black ,white, fontName, fontSize, number_of_buffers); thanks to Christian Ruff

  4. COORDINATE SYSTEM in cogent

  5. Stimulus parameters • Location • Size • Visibility • Number • Duration The same parameters could be applied to TEXT stimuli as well Let’s see a couple of examples

  6. Limitations of Cogent 2000 • loadpict( filename, buff, x, y, w, h ) • preparestring( text, buff, x, y ) • t = drawpict(imageBufferNumber) • Gives control over location, timing, size and number • Not flexible for: drawing shapes, generating noise, changing contrast Solution: use Cogent Graphics

  7. Let’s see an example

  8. Drawing screens in cogent graphics Onscreen Offscreen

  9. config_display(screenMode, screenRes, black ,white, fontName, fontSize, number_of_buffers); start_cogent Onscreen Offscreen

  10. plunge plunge Onscreen Offscreen t1 = cgflip; cgflip(0,0,0); cgflip(0,0,0); cgtext(word,wordX,wordY);

  11. plunge plunge plunge plunge Direct drawing on the buffer versus using Sprites plunge sprite

  12. Complicated graphics (do once, use many times) Multiple items to be place in different locations Animations why Sprites?

More Related