Code covered by the BSD License  

Highlights from
Tools for generating and playing video realtime

image thumbnail

Tools for generating and playing video realtime



22 Mar 2012 (Updated )

Generation of video in matlab, with the means of playing it realtime in a separte thread via VLC

function runMe

% self explanatory demo
% copyright 2012, Stefan M. Karlsson. 

% see licence.txt for licence details. Copyright 2012 Stefan Karlsson

%check that VLC player is available

h = msgbox('First we will generate stimulus that is time demanding to render. Hit a key, or close the figure to stop generating the sequence(but let it do at least a few seconds first). Will start after you click away this dialog');

generateMotionStimulus('stefanArt', 0, 'stefanArt.avi');

h = msgbox('Now that stimulus has been saved to "stefanArt.avi" we play it realtime, NOT with matlab built in stuff that just lags up everything, but starting a separate thread, with highest possible priority (done by function playVid)');


h = msgbox('Next we will generate stimulus of a inaccurately drawn disk. You can wait until VLC is finished with its old task, or you can just start this while VLC is running in the background');

generateMotionStimulus('aliasedDisk', 1,'aliasedDisk.avi');

h = msgbox('The aliased disk has problems, as we perceive the effects on the boundaries quite clearly. This can mess up experiments in various ways. The solution comes next');

generateMotionStimulus('fuzzyDisk', 1,'fuzzyDisk.avi')

h = msgbox('Finally, some standard Gabor like patches to visualize the usefullness of this application');

generateMotionStimulus('threePatterns', 1,'threePatterns.avi')

Contact us