[Numpy-discussion] create a numpy array of images

totonixsame@gmai... totonixsame@gmai...
Tue Feb 1 04:20:52 CST 2011


Hi,

On Tue, Feb 1, 2011 at 6:39 AM, Asmi Shah <asmi.capri@gmail.com> wrote:
> Thanks a lot Friedrich and Chris.. It came in handy to use PIL and numpy..
> :)
> @Zach, m aware of the poor handling of 16bit images in PIL, for that I am
> using imagemagick to convert it into 8 bit first and then PIL for rest of
> the processing..

You could try VTK to open those files and use vtk functions to
transform to numpy arrays.

> I have one more question: how to avoid the limitation of memoryerror in
> numpy. as I have like 200 images to stack in the numpy array of say
> 1024x1344 resolution.. have any idea apart from downsampling?

Take a look at numpy.memmap or h5py [1].
 _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion

[1] - http://code.google.com/p/h5py/


More information about the NumPy-Discussion mailing list