[visionegg] Re: pre-loading a large number of stimuli

  • From: "Gabriel Nevarez" <nevarezg@xxxxxxxxxxxxx>
  • To: <visionegg@xxxxxxxxxxxxx>
  • Date: Mon, 05 Sep 2005 15:28:33 +0100

Hi, Andrew and all, 

I've recently come into a similar issue as a previous post, regarding
pre-loading upwards of 400 or so images.

Per andrew's post (below), would you suggest that preloading images as Numeric
arrays is likely the optimal way of doing RSVP-type studies (or any other such
studies, where rapid playback of complex images is required)?

My concern regarding this is as to whether images loaded as Numeric arrays are
stored in main memory (as opposed to video RAM) and thus are delayed in the
pipeline during playback.

Ideally, I'd like to load a bitmap into an arbitrary bitmap buffer, so that I
would flip to it.  DirectX 7 used to allow definition of DirectDraw surfaces
which could be flipped to arbitrarily, and given enough videom RAM could allow
seamless flipping between buffers.  QuickDraw used to allow a similar function
in the definition of GWorlds for drawing offscreen, from which you could blit
fairly quickly.  Are you familiar with a similar mechanism in OpenGL?  If not,
do you recommend any workaround that would allow a functional equivalent?

cheers, 
-=Gabriel Nevarez
Research Programmer
Cardiff University
http://www.cf.ac.uk/psych

    * From: Andrew Straw <astraw@xxxxxxxxxxx>
    * To: visionegg@xxxxxxxxxxxxx
    * Date: Tue, 16 Aug 2005 10:56:23 -0700

Another suggestion would be to extract the image data from the PIL file yourself
(making Numeric/numarray arrays of the data). This way, you would control the
file opening/closing, and only the image data would be in RAM.

As an aside, which is probably not important since I think you load the images
before the experiments begin: Right now, I think this process would involve a
copy of the RAM involved [using Numeric.fromstring(image.tostring())], but
eventaully the "array interface" being specified by Travis Oliphant and others
in the Numeric world should make its way to PIL, allowing the raw memory to be
shared between different views, such as PIL, numarray, and Numeric.

Cheers!
Andrew
======================================
The Vision Egg mailing list
Archives: //www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html

Other related posts: