Hi Dave,
> I have a version of Cogent2000 v1.22 and I would like to use it to
> display movies at a display rate of 30Hz.
>
> I initially assumed that the best way to do this was to load each frame
> seperately display it and use the waituntil command (incrementing 33
> each time) to time the display of the images. However, Cogent does not
> appear to be able to display the images at the required rate (I assume
> this is due to command line overheads).
I don't have the expertise of the cogent developers, but I have been
trying to get some accurate display timing with cogent as well.
Perhaps this helps:
What is your refresh rate? You will only be able to show integer multiples
of the single refresh duration. If you are running at 60Hz you should have
no problem, you can get 1/60s, 2/60s, 3/60s. If you are running say 85Hz
you won't be able to get 30Hz, the closest you would get is 28.3286 Hz
or 0.0353s (3/85 s). If you are running on an LCD projector, check what
its native refresh frequency is, otherwise it might be interpolating in
time. I believe that the refresh frequency of a wholescreen display is
determined by the directx settings whereas the frequency of a window is
determined by the desktop settings (cogent tells you what refresh it uses
in its output).
The easiest would be if you had sent the script. Do you load the images
ahead, i.e. before starting your presentation? If not, your problem is
likely to be the time it takes to access the file on the disk. If you do
preload your images, where do you preload them to? To the matlab workspace
or to sprites or screens in video memory? The video memory is more limited
than system memory, but frames can be alternated at a higher rate. When
images are in system memory they have to be transferred to video
memory in order to be displayed, which can take some time on old grafics
cards (the AGP-speed is a major issue here).
If you do have a refresh rate of 60Hz, a fast grafics card with lots of
ram, preload your images, etc. you might want to use the command waitframe
instead of waituntil because that will sync you to the vertical refresh,
which will avoid flicker and should also give a basic rhythm of multiples
of 1/60 s. If you change your display and then do waitframe(2) (if I
rememeber right), that should sync the change of your display to the next
but one refresh, i.e. giving you 2/60 s or 30Hz, as long as the command
that changes your display does not take more time than 1/60 s minus a
smidgen.
I have tested cogent for my own purposes and found that it responds very
sensitively to different hardware, despite identical settings of directx.
I don't know why that would be the case because in most cases I have used
fast, high-end grafics cards. With some playing around I have often
managed to get it to update displays at fixed frequencies. The major
problem is that the cgflip and waitframe commands don't always seem to
behave in the same fashion, and also don't always behave in the way the
documentation says. On some setups a cycle of writing to the screen
and doing a cgflip will update the display correctly and sometimes it will
only do it if you add a cgflip('V'). A wild guess would be that the
display drivers might be causing the differences, but that is for the
experts to answer.
Hope this helps,
John-Dylan Haynes
----------------------------------------------------------------------------
Dept. of Neurology II, Magdeburg / Inst. of Neuroscience, Plymouth
----------------------------------------------------------------------------
Current address: Institute for Cognitive Neuroscience
University College London
Alexandra House
17 Queen Square
London WC1N 3BG
++44-(0)20-7679-5430 (phone)
++44-(0)20-7813-2835 (fax)
----------------------------------------------------------------------------
|