Hello,
I use a windows platform and 3.0.13 version of PTB. I have an experiment where I present a different set of images (120 images for each set). Each image is about 92 Kb presented at 30 Hz. since I have a total amount of 52 image sets, I don't load them all at the beginning, rather, load each cell of 120 images before this set is to be shown. Unfortunately, this takes more than 8 seconds to load for each set. Moreover, loading time increase incrementally. Hence, I think this is related to the texture memory-that it somehow save all previous sets.
Is there a way to clear texture memory load after loading the cell of images, before loading the next cell?
-A new video (image set) should run every 12 seconds and each video's duration is 4 seconds.
The relevant part of the code:
%load new video
video_cell = cell(1, params.fpv);
A = order_mat(cur_video, 1);
B = order_mat(cur_video, 2);
stimulus_num = order_mat(cur_video, 3);
for frame_num = 1:params.fpv
video_cell{frame_num} = ...
Screen('MakeTexture', window, imread(fullfile...
('..', 'stimuli',['A', num2str(A), 'B', num2str(B)],...
num2str(stimulus_num),[num2str(frame_num),'.jpg'])));
end
Thank you very much!
Shahar