MathGroup Archive 2006

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

Search the Archive

Re: Image Processing


Charlie Springer wrote:
> Hi all.
> 
> Old physicist, new Mathematica user.
> 
> I want to perform 2D FFT's on images. I have used Import to get a JPEG into 
> apparently, a graphic object. I can not see how to get it into a "list of 
> lists" or any form acceptable to Fourier[].
> 
> Anybody have a snippet or some experience? I'm still learning the 
> terminology. If this works out I'll get the grid version for a Mac Quad.
> 
> -- Charlie Springer

Import of JPEG's yields graphics objects of the structure:

Graphics[ Raster[data], opts ]

If you import your jpeg using Import:

jpeg = Import["picture", "JPEG"];

Then you can extract the raster data structure using

raster = jpeg[[1]]

Look up Raster in the help browser to see how a Raster object is 
structured. Basically, the first element of the raster is your 2D array 
of cells.

Carl Woll
Wolfram Research


  • Prev by Date: 2D/3D plots scaled to unit of dimension
  • Next by Date: Re: A Conditional File Import
  • Previous by thread: Image Processing
  • Next by thread: Re: Image Processing