From: Matt J on 5 Jan 2010 12:22 "Tom Nimbus" <ravensalo(a)gmail.com> wrote in message <hhu380$3f4$1(a)fred.mathworks.com>... > Matt, thanks for your replying. Yes, this is a sparse array. It contains data from a large image, in which a lot of pixels are blank with scattered clusters. It's impossible to find good ways to divide the image without affecting the integrity of any cluster in the image. My problem is to load this image into Matlab. Due to the limitation of a 32-bit system, it's not possible to allocate memory above 4 GB. So I tried the 64-bit system, but Matlab still gave me the "out of memory" error. ================= Yet another option might be to load the image in chunks using fread() and conver it to a sparse array piece-by-piece.
From: Tom Nimbus on 5 Jan 2010 20:38 > ================= > > Yet another option might be to load the image in chunks using fread() and conver it to a sparse array piece-by-piece. Thanks a million, Matt. This is a brilliant idea and it works pretty well.
From: nanren888 on 6 Jan 2010 01:52 "Tom Nimbus" <ravensalo(a)gmail.com> wrote in message <hi0phs$q1v$1(a)fred.mathworks.com>... > > > ================= > > > > Yet another option might be to load the image in chunks using fread() and conver it to a sparse array piece-by-piece. > > Thanks a million, Matt. This is a brilliant idea and it works pretty well. I'm not sure whether this came out in the discussion, but for reference I just tried >> grunk = rand([21600,43200]); >>image(grunk) >> whos Name Size Bytes Class Attributes grunk 21600x43200 7464960000 double >> without problem. Win7, x64, 12GBytes RAM. (The rand() took a while & not sure how many real pixels I got in the image displayed.)
First
|
Prev
|
Pages: 1 2 Prev: Send initial command through serial Port in xPC Target Next: OQPSK and half sine pulse shaping |