Re: [Matplotlib-users] Memory issues with imshow

2009-12-16 Thread Wellenreuther, Gerd
Perry Greenfield wrote: > To give an idea, when you ask matplotlib to render an image, it > processes it (resamples, rescales, maps to colors, etc) in order to > actually display it. Since it may redo all that if you resize or > otherwise re-render the figure, it needs to keep a reference to t

Re: [Matplotlib-users] Memory issues with imshow

2009-12-15 Thread Christoph Gohlke
Hello, switching to 64-bit Python and OS might help. I can display 8bit images up to 8459x8459 with imshow on Windows 7 64-bit with 8GB RAM. Python then uses about 5.5 GB RAM according to task manager. A 8460x8460 or larger 8bit images crash Python (definitely a bug). The 32-bit interpreter st

Re: [Matplotlib-users] Memory issues with imshow

2009-12-15 Thread Perry Greenfield
On Dec 15, 2009, at 12:30 PM, Wellenreuther, Gerd wrote: > Hi Perry, > > to clarify what I am doing - maybe the error lies in here: > > * First I am building up a list of the corrected+rotated images > > * After that is done I am creating the figure > > * Then looping over every image, creating p

Re: [Matplotlib-users] Memory issues with imshow

2009-12-15 Thread Perry Greenfield
On Dec 15, 2009, at 1:09 PM, Gerd Wellenreuther wrote: > > > Perry Greenfield schrieb: >> if the above code is in a loop, and there is no figure clearing in >> the loop, then >> >> rotated_images[i] = [] >> gc.collect(2) >> >> will have no effect since matplotlib will still have references to

Re: [Matplotlib-users] Memory issues with imshow

2009-12-15 Thread Gerd Wellenreuther
Perry Greenfield schrieb: > if the above code is in a loop, and there is no figure clearing in the > loop, then > > rotated_images[i] = [] > gc.collect(2) > > will have no effect since matplotlib will still have references to the > array (and generally, you never need to call gc.collect by the

Re: [Matplotlib-users] Memory issues with imshow

2009-12-15 Thread Wellenreuther, Gerd
Hi Perry, to clarify what I am doing - maybe the error lies in here: * First I am building up a list of the corrected+rotated images * After that is done I am creating the figure * Then looping over every image, creating proper axes for each individual image and finally: > pylab.imsho

[Matplotlib-users] Memory issues with imshow

2009-12-15 Thread Wellenreuther, Gerd
Dear all, I am trying to write a script to be used with our microscope, stitching images of various magnifications together to yield a big picture of a sample. The preprocessing involves operations like rotating the picture etc., and finally those pictures are being plotted using imshow. Unfor