0
$\begingroup$

edit: clarifying question. ...

$\endgroup$

closed as unclear what you're asking by jojek, MBaz, Peter K. Oct 13 '15 at 13:40

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

1
$\begingroup$

The function $$ \frac{\sin(x)}{x} $$ has a well-known Fourier transform: $$ \int_{-\infty}^{\infty} \: \frac{\sin{x}}{x} e^{-j 2 \pi f x} dx = \begin{cases} \pi & |f| < \frac{1}{2 \pi} \\ 0 & |f| > \frac{1}{2 \pi} \\ \end{cases} $$ which is derived here.

Your function:

$$ \frac{\sin(x)\sin(y)}{xy} $$

is a simple separable two dimensional version of it. The 2D Fourier transform will just be:

$$ \int_{-\infty}^{\infty}\int_{-\infty}^{\infty} \: \frac{\sin{x}}{x} \frac{\sin{y}}{y} e^{-j 2 \pi f_1 x} e^{-j 2 \pi f_2 y} dx dy = \int_{-\infty}^{\infty} \: \frac{\sin{x}}{x} e^{-j 2 \pi f_1 x} dx \int_{-\infty}^{\infty} \:\frac{\sin{y}}{y} e^{-j 2 \pi f_2 y} dy =\begin{cases} \pi & |f_1| \mbox{ and } |f_2| < \frac{1}{2 \pi} \\ 0 & |f_1| \mbox{ or } |f_2| > \frac{1}{2 \pi} \\ \end{cases} $$


Below is a plot that takes a random image with a white square in the middle (top left), FFTs it, multiplies the FFT by a brick filter (top right), inverse FFTs it and plots the result (bottom right).

enter image description here


R Code Below

# 26383

img <- runif(128*128, 0, 1)
dim(img) <- c(128, 128)

img[32:96,32:96] <- 1

N <- 50

imgFFT <- fft(img)
imgFFT[N:(128-N+2),] <- 0.0000000000000
imgFFT[,N:(128-N+2)] <- 0.0000000000000
img2 <- fft(imgFFT, inverse = TRUE) / 128 / 128

img2[Mod(img2) > 1] <- 1

mx <- max(log(Mod(imgFFT + 0.00001)))
mn <- min(log(Mod(imgFFT + 0.00001)))

scaled_log_imgFFT <- (log(Mod(imgFFT + 0.00001)) - mn)/(mx - mn)

par(pty="s") # make the plit square
plot(0:256, type='n')
rasterImage(as.raster(img),0,128,128,256)
rasterImage(as.raster(scaled_log_imgFFT),128,128,256,256)
rasterImage(as.raster(Mod(img2)),128,0,256,128)
$\endgroup$
  • $\begingroup$ Well "impossible" is too strong a word. You certainly can take the 2D FFT of an image and multiply it by a sampled box function, and take the inverse FFT to get a "low pass" filtered version of it. However, because the $\sin(x)/x$ function is infinite in extent, the result will have time aliasing. $\endgroup$ – Peter K. Oct 12 '15 at 21:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.