Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Importing a large image...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98614] Re: [mg98523] Importing a large image...
  • From: peter <plindsay.0 at gmail.com>
  • Date: Tue, 14 Apr 2009 06:17:32 -0400 (EDT)
  • References: <200904110758.DAA22371@smc.vnet.net>

hi David
I have a solution I think.
I used a sample TIFF of ~700MB. I note you use a Mac, so that makes it easy -
I opened it in GraphicConverter, a free app [
http://www.lemkesoft.com/ ] and saved it as a [ lossless ] PNG but
also used the save option to Split the file into 4 X 3 smaller
constituent files. Each of these files [ ~20MB ] is then easily
imported into Mathematica by something like:
a=Import["Desktop/tiff-2a-03-03.png"]

I'm sure the http://www.imagemagick.org/ utility [ which is available
free on the mac and I think via mactex installation ] can do a similar
trick.

Conversion to PNG is probably not necessary but it seemed like a good
idea at the time ;)

I hope this helps

Peter

2009/4/11 David Reiss <dbreiss at gmail.com>:
> So, my fellow denizens of the group.
>
> I have a very large TIFF image--roughly 700MB in size.
>
> Its dimension are 43201 by 15601.  It is single color with a bit depth
> of 8.
>
> Mathematica is unable to Import this file on my 6 GM RAM powerbook
> without maxing out the memory.
>
> I actually do not need to read in the whole file: I'd be happen with
> being able to break the file into a number of smaller TIFFs which tile
> it completely and then process each on independently (I am needing to
> act on the data in various ways to yield a processed result for
> further analysis down the line).   This is all for a larger project
> for a consulting client of mine.
>
> Any suggestions for how to programmatically carve up the image without
> having to completely read it in first?   I am looking for quick
> solutions rather than ones that require a lot of programming.  Either
> it can be done pretty simply, or (more likely) Mathematica chokes on
> these very large files.
>
> (Photoshop, on the other hand, does not choke on it at all, nor do
> some other programs that are optimized for image analysis such as ENVI
> (http://www.ittvis.com/ProductServices/ENVI.aspx): but I don't want to
> work with these...  nor do I have them....)
>
> Of course this leads to a suggestion for the Import function: to allow
> reading in only a part of an image at a time.
>
> Feel free to respond to the list, but also CC me on the replies so
> that I get them sooner than the usual turnaround.
>
> Thanks!
>
> --David
>
>



--
Peter Lindsay


  • Prev by Date: Re: StringJoin with ToString
  • Next by Date: Re: How to evaluate a notebook programmatically?
  • Previous by thread: Re: Importing a large image...
  • Next by thread: Re: Importing a large image...