Accessing contents of a texture

Is it possible to access the contents of a texture pointer? Is it possible to convert a texture pointer to a bitmapped image?

I am trying to read the frames of an mp4 movie that was used in a PTB experiment and write them to an hdf5 file for further analysis.

I would like to do something like this:

[movie duration fps] = Screen('OpenMovie', win, moviename);
while 1:
[tex]= Screen('GetMovieImage', win, movie);

if tex <= 0 break; end;

% 0. filter and downsample current frame
% 1. get frame as bitmap from texture pointer
% 2. append contents to hdf5 file 3d array

Screen('Close', tex);
end;
You might want to have a look at matlab's mmreader, no need for PTB in that case.
Dee

On Thu, Mar 31, 2011 at 13:39, northugp <northugp@...> wrote:

Is it possible to access the contents of a texture pointer? Is it possible to convert a texture pointer to a bitmapped image?

I am trying to read the frames of an mp4 movie that was used in a PTB experiment and write them to an hdf5 file for further analysis.

I would like to do something like this:

[movie duration fps] = Screen('OpenMovie', win, moviename);
while 1:
[tex]= Screen('GetMovieImage', win, movie);

if tex <= 0 break; end;

% 0. filter and downsample current frame
% 1. get frame as bitmap from texture pointer
% 2. append contents to hdf5 file 3d array

Screen('Close', tex);
end;