Morphology in Frequency Domain

To put it simply,

$GrayScale(Image) \rightarrow DFT(Image) \rightarrow f(Image) \rightarrow IDFT(Image)$

Replace $f(Image) = f(x)$ by any of the functions from the following table, it also shows the effect of the function on the “Lenna” image. The images show effect of morphology or filter applied in the frequency domain.

Source Code: C++

 f(x) Processed Image Dilate(x) : Morphological Dilate Erode(x) : Morphological Erode Open(x) : Morphological Open Close(x) : Morphological Close Gradient(x) : Morphological Gradient Gaussian(x) : Simple Gaussian Blur

Images processed with FFTW and OpenCV libraries.