I am trying to make a visual stimulus for EEG research. The video simply flickers between the black frame and the white frame, and the alternation should occur in the frequency range: 12 Hz, 24 Hz, 48 Hz, 72 Hz.
Our monitors have a refresh rate of 144 Hz, and computers are also fancy, and I measure the success of the video with an oscilloscope to ensure accuracy. Thus, hardware should not be a problem; in theory, up to half the monitor refresh rate should be possible. However, I failed in both Java and MatLab.
I tried using MatLab:
1) using imwrite () to make a gif
2) using VideoWriter
3) using getframe () and movie2avi ().
In all these methods, an ultra-high frame rate is declared, and I see in my command window that all frames were inserted during the run. However, the final output file never exceeds 48 Hz.
In addition, 48Hz, as well as 24Hz and even 12Hz files also have serious frame problems.
I also tried to make files using Processing MovieMaker: I set the frame rate to 72 Hz - enter a list of 72 .png files as frames - and it should output a 1-second file that flickers at 72 Hz.
However, the result is obtained only at a frequency of 48 Hz, and again the frame rate is not reliable.
, ; . MatLab Processing fps, . - ( ? ?) , 72 , !
, Processing/Java MatLab, , , .