[Numpy-discussion] create a numpy array of images

Sturla Molden sturla@molden...
Tue Feb 1 10:16:55 CST 2011


Den 01.02.2011 15:07, skrev Asmi Shah:
> Hi Zach and Sturla,
>
> Well I am a "she" :))

I apologize, I did not deduce correct gender from your name :)


> Thanks for your inputs.. I am using 32 bit python as have so many 
> libraries integrated with it.. and moreover, i plan to put this volume 
> rendered on a web page or distribute the exe in the end, so want to be 
> minimal for the memory requirements on the clients' systems..
> the physical memory should not be a problem as I have 8GB RAM.. 
> specially when the images are RGB then it gets into trouble as it adds 
> the 4th dimension already in my case..
>

With 32 bit each process only has 2 or 3 GB (dependent on OS setting) of 
those 8 GB available in user space. If 32 bit is a requirement, you have 
to store some of the data on disk to prevent exhausting the 2 GB virtual 
memory limit.

Actually, if you have 200 16-bit images in 1024 x 1344 resolution, that 
is only 525 MB if stored compactly with dtype np.uint16. So check how 
those images are stored in your stack. Do you use floating point instead 
of the smallest possible integer? Do you use separate dimensions for 
RGBA channels? Is there anything else wasting memory besides this stack 
of images? Do you have a memory leak?

Sturla









-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110201/62b702cf/attachment-0001.html 


More information about the NumPy-Discussion mailing list