MathGroup Archive 2009

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

Search the Archive

Re: Re: 2dFFT & image processing

  • To: mathgroup at smc.vnet.net
  • Subject: [mg101648] Re: [mg101596] Re: [mg101500] 2dFFT & image processing
  • From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
  • Date: Sun, 12 Jul 2009 05:51:36 -0400 (EDT)
  • References: <200907090553.BAA16870@smc.vnet.net>

And one should of course use a link of an image which works for more the
one day. Sorry.

img = Import["http://sipi.usc.edu/database/misc/5.1.12.tiff";]; 
{nx, ny} = ImageDimensions[img]; 
filter = Table[1 - Exp[-(x^2 + y^2)/70.], 
       {y, -ny/2., ny/2. - 1}, {x, -nx/2., nx/2. - 1}]; 
fimg = RotateLeft[(RotateLeft[#1, nx/2] & ) /@ 
         Fourier[ImageData[img]], ny/2]; 
result = InverseFourier[RotateRight[
         (RotateRight[#1, nx/2] & ) /@ (fimg*filter), ny/2]]; 
Column[{img, ArrayPlot[Re[fimg], ColorFunction -> Hue, 
       ColorFunctionScaling -> False], ArrayPlot[filter, 
       ColorFunction -> GrayLevel], Image[Re[result]]}]

Cheers
Patrick

On Fri, 2009-07-10 at 23:22 -0400, Patrick Scheibe wrote:
> img = ColorConvert[Import["https://ipanema.tictec.de/badische-z\
>     eitung/ipanema_images/21/4/!!PerformanceID_32-InfoTypeID_0-Para\
>     graphID_0!Yvonne%20Catterfeld%20003.clip0.png"], "Grayscale"]; 
> {nx, ny} = ImageDimensions[img]; 
> filter = Table[1 - Exp[-(x^2 + y^2)/70.], 
>        {y, -ny/2., ny/2. - 1}, {x, -nx/2., nx/2. - 1}]; 
> fimg = RotateLeft[(RotateLeft[#1, nx/2] & ) /@ 
>          Fourier[ImageData[img]], ny/2]; 
> result = InverseFourier[RotateRight[
>          (RotateRight[#1, nx/2] & ) /@ (fimg*filter), ny/2]]; 
> Column[{img, ArrayPlot[Re[fimg], ColorFunction -> Hue, 
>        ColorFunctionScaling -> False], ArrayPlot[filter, 
>        ColorFunction -> GrayLevel], Image[Re[result]]}]
> 



  • Prev by Date: Re: Data conversion
  • Next by Date: Re: sparsearray bug?
  • Previous by thread: Re: 2dFFT & image processing
  • Next by thread: Re: 2dFFT & image processing