python 2.7 - Adding visual time markers to the player bar of a video -


i'm trying program experiment in want find out how humans cognitively segment movement streams. example, if movement stream person climbing flight of stairs, each step might single segment. study bascially replication of 1 here, set of stimuli: http://dl.acm.org/citation.cfm?doid=2010325.2010326

each trial should structured following:

  1. present video of motion stream. display bar beneath video has marker moves in sync current time of video (very similar gui of video player).

  2. present video again, let participant add stationary markers bar beneath video pressing key. marker supposed placed @ time point in video bar corresponds time buttom pressed (e.g. when video 100 seconds long , buttom pressed 10 seconds video, should placed @ 10% mark of bar).

my instructor suggested programming whole thing using psychopy. psychopy supports python 2.7. i've looked program , looks promising. 1 can display video , rating scale class similar bar want implement. however, several features missing, namely:

  • one can set single marker, subjects should able set multiples
  • as mentioned in point (1) want have marker moves in synch video.
  • when key press occurs marker should placed @ point in bar corresponds current time point in video.

hence questions: have tips implementing features described above using psychopy module?

i don't know how gets recommendation question territory, in case know of module writing experiment guis has widgets features want experiment curious hear them.

psychopy choice this. rating scale (as note) not right tool creating markers. can make simple polygon shapes though, serve multiple markers continuous time indicator.

e.g. make polygon stimulus 3 vertices (to make triangle indicator) , set location (assuming using normalised coordinates):

$[((t/movie_duration) * 2 - 1) , -0.9]

t builder variable represents time elapsed in current trial in seconds. centre of screen @ coordinates [0, 0]. code above make pointer move smoothly left hand edge of screen right, close bottom edge of screen, reaching right hand edge once move ends. set polygon's position field update every frame animation continuous.

movie_duration placeholder variable duration of movie in seconds. specify in conditions file, or can query movie component duration think, like:

$[((t/movie_stim_name.duration()) * 2 - 1) , -0.9]

you leave markers on screen in response keypresses in similar way, require little python code in code component.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -