What is the optimal way to accelerate the Screen('Flip',win) command? For some reason, this command is taking 16ms instead of being almost instantaneous for an color image that is 1028x760. Thoughts or suggestions? Would a better graphics card be a good alteranative?
I want the Flip command to be executed as fast as possible for real-time frame by frame post-processing needs.
I am using MATLAB's PsychToolbox on Windows with a NVIDIA GeForce 620.
Every screen has a framerate, the rate at which it can be refreshed. 60Hz, every 16.6 ms, is a common framerate. Screen('Flip',win)
only returns once the image has been displayed, explaining the delay. You will see this with any graphics card. Instantaneous return would be a sign of trouble.
If, however, you call Screen('Flip',win)
3 ms before the next vertical blank, the moment at which the screen is refreshed, you will see the call will only take about 3 ms. If you just call flip in a look, you will find the 16 ms value.
Please read the file PsychDocumentation/PTBTutorial-ECVP2013.pdf in the psychtoolbox distribution to understand the basics of stimulus presentation.