Skip to content
Prev 13755 / 398502 Next

2D fft DC shift

On Mon, 24 Sep 2001, M. Edward Borasky wrote:

            
I looked in Gonzalez & Wintz (1977) Digital Image Processing and found:
p.53 "the origin of the Fourier transform of f(x,y) can be moved to the
centre of the corresponding N x N frequency square simply by multiplying
f(x,y) by -1^(x+y)"

So from the sound of it you do something like (in proper R syntax)
g(x,y)<- f(x,y)* -1^(x+y) 
fft(g(x,y))

If you get this to work I would appreciate some simple R code that 
- generates a 2D image (e.g. a square)
- creates 2D centred amplitude or power spectrum

Bill

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._