Reprinted from: http://cns-alumni.bu.edu/~slehar/fourier/fourier.html

An Intuitive Explanation of Fourier Theory<a href="http://www.statcounter.com/" target="_blank"><img src="76366945-1c60-49f1-ac31-ff97990c217e_files/counter.png" alt="blog counter" border="0"></a> An Intuitive Explanation of Fourier TheorySteven Leharslehar@cns.bu.edu

Fourier theory is pretty complicated mathematically. But there are some beautifully simple holistic concepts behind Fourier theory which are relatively easy to explain intuitively. There are other sites on the web that can give you the mathematical formulation of the Fourier transform. I will present only the basic intuitive insights here, as applied to spatial imagery.

Basic Principles: How space is represented by frequency

Higher Harmonics: "Ringing" effects

An Analog Analogy: The Optical Fourier Transform

Fourier Filtering: Image Processing using Fourier Transforms


Basic Principles

Fourier theory states that any signal, in our case visual images, can be expressed as a sum of a series of sinusoids. In the case of imagery, these are sinusoidal variations in brightness across the image. For example the sinusoidal pattern shown below can be captured in a single Fouier term that encodes 1: the spatial frequency, 2: the magnitude (positive or negative), and 3: the phase.

These three values capture all of the information in the sinusoidal image. The spatial frequency is the frequency across space (the x-axis in this case) with which the brightness modulates. For example the image below shows another sinusoid with a higher spatial frequency.

The magnitude of the sinusoid corresponds to its contrast, or the difference between the darkest and brightest peaks of the image. A negative magnitude represents a contrast-reversal, i.e. the brights become dark, and vice-versa. The phase represents how the wave isshifted relative to the origin, in this case it represents how much the sinusoid is shifted left or right.

A Fourier transform encodes not just a single sinusoid, but a whole series of sinusoids through a range of spatial frequencies from zero (i.e. no modulation, i.e. the average brightness of the whole image) all the way up to the "nyquist frequency", i.e. the highest spatial frequency that can be encoded in the digital image, which is related to the resolution, or size of the pixels. The Fourier transform encodes all of the spatial frequencies present in an image simultaneously as follows. A signal containing only a single spatial frequency of frequency f is plotted as a single peak at point f along the spatial frequency axis, the height of that peak corresponding to the amplitude, or contrast of that sinusoidal signal.

There is also a "DC term" corresponding to zero frequency, that represents the average brightness across the whole image. A zero DC term would mean an image with average brightness of zero, which would mean the sinusoid alternated between positive and negative values in the brightness image. But since there is no such thing as a negative brightness, all real images have a positive DC term, as shown here too.

Actually, for mathematical reasons beyond the scope of this tutorial, the Fourier transform also plots a mirror-image of the spatial frequency plot reflected across the origin, with spatial frequency increasing in both directions from the origin. For mathematical reasons beyond the scope of this explanation, these two plots are always mirror-image reflections of each other, with identical peaks at f and -f as shown below.

What I have shown is actually the Fourier transform of a single
scan line of the sinusoidal image, which is a one-dimensional
signal. A full two-dimensional Fourier transform performs a 1-D
transform on every scan-line or row of the image, and another 1-D
transform on every column of the image, producing a 2-D Fourier
transform of the same size as the original image.

The image below shows a sinusoidal brightness image, and its
two-dimensional Fourier transform, presented here also as a brightness
image. Every pixel of the Fourier image is a spatial frequency value,
the magnitude of that value is encoded by the brightness of the
pixel. In this case there is a bright pixel at the very center - this
is the DC term, flanked by two bright pixels either side of the
center, that encode the sinusoidal pattern. The brighter the peaks in
the Fourier image, the higher the contrast in the brightness
image. Since there is only one Fourier component in this simple image,
all other values in the Fourier image are zero, depicted as black.

Brightness Image Fourier transform

Here is another sinusoidal brightness image, this time with a lower
spatial frequency, together with it's two-dimensional Fourier
transform showing three peaks as before, except this time the peaks
representing the sinusoid are closer to the central DC term,
indicating a lower spatial frequency.

Brightness Image Fourier transform

The significant point is that the Fourier image encodes exactly
the same information as the brightness image, except expressed in
terms of amplitude as a function of spatial frequency, rather than
brightness as a function of spatial displacement. An inverse Fourier
transform of the Fourier image produces an exact pixel-for-pixel
replica of the original brightness image.

The orientation of the sinusoid correlates with the orientation of the
peaks in the Fourier image relative to the central DC point. In this
case a tilted sinusoidal pattern creates a tilted pair of peaks in the
Fourier image.

Brightness Image Fourier transform

Different Fourier coefficients combine additively to produce
combination patterns. For example the sinusoidal image shown below is
computed as the sum of the tilted sinusoid shown above, and the
vertical sinusoid of lower spatial frequency shown above that.

Brightness Image Fourier transform

The brightness and the Fourier images are completely interchangable,
because they contain exactly the same information. The combined
brightness image shown above could have been produced by a
pixel-for-pixel adding of the two brightness images, or by a
pixel-for-pixel addition of the corresponding Fourier transforms,
followed by an inverse transform to go back to the brightness
domain. Either way the result would be exactly identical.

Back to top


Higher Harmonics and "Ringing" effects

The basis set for the Fourier transform is the smooth sinusoidal
function, which is optimized for expressing smooth rounded shapes. But
the Fourier transform can actually represent any shape, even harsh
rectilinear shapes with sharp boundaries, which are the most difficult
to express in the Fourier code, because they need so many higher order
terms, or higher harmonics. How these "square wave" functions are
expressed as smooth sinusoids will be demonstrated by example.

The figure below shows four sinusoidal brightness images of
spatial frequency 1, 3, 5, and 7. The first one, of frequency 1, is
the fundamental, and the others are higher harmonics on that
fundamental, because they are integer multiples of the fundamental
frequency. These are in fact the "odd harmonics" on the fundamental,
and each one exhibits a bright vertical band through the center of the
image. The Fourier transform for each of these patterns is shown
below.

1 3 5 7

The next table shows the result of progressively adding higher
harmonics to the fundamental. Note how the central vertical band getssharper and stronger with each additional higher harmonic, while the
background drops down towards a uniform dark field. Note also how the
higher harmonics produce peaks in the Fourier images that spread
outward from the fundamental, defining a periodic pattern in frequency
space.

1 1+3 1+3+5 1+3+5+7

The images below show what would happen if this process were continued
all the way out to the Nyquist frequency - it would produce a thin
vertical stripe in the brightness image, with sharp boundaries, i.e. a
"square wave" in brightness along the x dimension. The Fourier
transform of this image exhibits an "infinite" series of harmonics or
higher order terms, although these do not actually go out to infinity
due to the finite resolution of the original image. This is how the
Fourier transform encodes sharp square-wave type features as the sum
of a series of smooth sinusoids.

Brightness Image Fourier transform

Back to top


The Optical Fourier Transform

A great intuitive advance can be made in understanding the
principles of the Fourier transform once you learn that a simple lens
can perform a Fourier transform in real-time as follows. Place an
image, for example a slide transparency, at the focal length of the
lens, and illuminate that slide with coherent light, like a colimated
laser beam. At the other focus of the lens place a frosted glassscreen. Thats it! The lens will automatically perform a Fourier
transform on the input image, and project it onto the frosted glassscreen. For example if the input image is a sinusoidal grating, asshown below, the resultant Fourier image will have a bright spot at the
center, the DC term, with two flanking peaks on either side, whose
distance from the center will vary with the spatial frequency of the
sinusoid.

We can now see the holistic principle behind the Fourier
transform. Every point on the input image radiates an expanding cone
of rays towards the lens, but since the image is at the focus of the
lens, those rays will be refracted into a parallel beam that
illuminates the entire image at the ground-glass screen. In other
words, every point of the input image is spread uniformly over the
Fourier image, where constructive and destructive interference will
automatically produce the proper Fourier representation.

Conversely, parallel rays from the entire input image are focused onto
the single central point of the Fourier image, where it defines the
central DC term by the average brightness of the input image.

Note that the optical Fourier transformer automatically operates in
the reverse direction also, where it performs an inverse Fourier transform,
converting the Fourier representation back into a spatial brightness
image. Mathematically the forward and inverse transforms are identical
except for a minus sign that reverses the direction of the
computation.

Back to top


Fourier Filtering

I will now show how the Fourier transform can be used to perform
filtering operations to adjust the spatial frequency content of an
image. We begin with an input image shown below, and perform a Fourier
transform on it, then we do an inverse transform to reconstruct the
original image. This reconstructed image is identical,
pixel-for-pixel, with the original brightness image.

Brightness Image Fourier Transform Inverse Transformed

I will now demonstrate how we can manipulate the transformed image to
adjust its spatial frequency content, and then perform an inverse
transform to produce the Fourier filtered image. We begin with a
low-pass filter, i.e. a filter that allows the low spatial-frequency
components to pass through, but cuts off the high spatial
frequencies. Since the low frequency components are found near the
central DC point, all we have to do is define a radius around the
DC point, and zero-out every point in the Fourier image that is beyond
that radius. In other words the low-pass filtered transform is
identical to the central portion of the Fourier transform, with the
rest of the Fourier image set to zero. An inverse Fourier transform
applied to this low-pass filtered image produces the inverse
transformed image shown below.

Low-Pass Filtered Inverse Transformed

We see that the low-pass filtered image is blurred, preserving the low
frequency broad smooth regions of dark and bright, but losing the
sharp contours and crisp edges. Mathematically, low-pass filtering is
equivalent to an optical blurring function.

Next we try the converse, high-pass filtering, where we use the same
spatial frequency threshold to define a radius in the Fourier
image. All spatial frequency components that fall within that radius
are eliminated, preserving only the higher spatial frequency
components. After performing the inverse transform on this image we
see the effect of high-pass filtering, which is to preserve all of the
sharp crisp edges from the original, but it loses the larger regions
of dark and bright.

High-Pass Filtered Inverse Transformed

If the low-pass filtered inverse-transformed image is added
pixel-for-pixel to the high-pass inverse-transformed image, this would
exactly restore the original unfiltered image. These images are
complementary therefore, each one encodes the information which is
missing from the other.

Next we will demonstrate a band-pass filtering that preserves only
those spatial frequencies that fall within a band, greater than a low
cut-off, but less than a higher cut-off.

Band-Pass Filtered Inverse Transformed

The next simulation is the same as above, except with a narrower band
of spatial frequencies.

Band-Pass Filtered Inverse Transformed

The next simulation shows band-pass filtering about a higher
spatial-frequency band,

Band-Pass Filtered Inverse Transformed

and finally the same as above except again using a narrower
spatial-frequency band.

Band-Pass Filtered Inverse Transformed

These computer simulations demonstrate that the Fourier representation
encodes image information in a holistic distributed manner that allows
manipulation of the global information content of the image by spatial
manipulations of the transformed image.

Back to top

 
 
 
 

An Intuitive Explanation of Fourier Theory的更多相关文章

  1. False Discovery Rate, a intuitive explanation

    [转载请注明出处]http://www.cnblogs.com/mashiqi Today let's talk about a intuitive explanation of Benjamini- ...

  2. [转]An Intuitive Explanation of Convolutional Neural Networks

    An Intuitive Explanation of Convolutional Neural Networks https://ujjwalkarn.me/2016/08/11/intuitive ...

  3. What is an intuitive explanation of the relation between PCA and SVD?

    What is an intuitive explanation of the relation between PCA and SVD? 36 FOLLOWERS Last asked: 30 Se ...

  4. An Intuitive Explanation of Convolutional Neural Networks

    https://ujjwalkarn.me/2016/08/11/intuitive-explanation-convnets/ An Intuitive Explanation of Convolu ...

  5. 一目了然卷积神经网络 - An Intuitive Explanation of Convolutional Neural Networks

    An Intuitive Explanation of Convolutional Neural Networks 原文地址:https://ujjwalkarn.me/2016/08/11/intu ...

  6. [OpenCV-Python] OpenCV 中的图像处理 部分 IV (六)

    部分 IVOpenCV 中的图像处理 OpenCV-Python 中文教程(搬运)目录 23 图像变换 23.1 傅里叶变换目标本小节我们将要学习: • 使用 OpenCV 对图像进行傅里叶变换 • ...

  7. Why one-norm is an agreeable alternative for zero-norm?

    [转载请注明出处]http://www.cnblogs.com/mashiqi Today I try to give a brief inspection on why we always choo ...

  8. (zhuan) Building Convolutional Neural Networks with Tensorflow

    Ahmet Taspinar Home About Contact Building Convolutional Neural Networks with Tensorflow Posted on a ...

  9. Discover Feature Engineering, How to Engineer Features and How to Get Good at It

    Feature engineering is an informal topic, but one that is absolutely known and agreed to be key to s ...

随机推荐

  1. canvas设置长宽

    Canvas元素默认宽 300px, 高 150px, 设置其宽高可以使用如下方法:方法一:1 <canvas width="500" height="500&qu ...

  2. List集合学习

    Java中常用的List子类主要有:ArrayList.LinkedList.Vector.有序(存储和取出的元素一致),可重复的. 三者比较 1:访问:ArrayList和Vector都实现了Ran ...

  3. LOJ2324. 「清华集训 2017」小 Y 和二叉树【贪心】【DP】【思维】【好】

    LINK 思路 首先贪新的思路是处理出以一个节点为根所有儿子的子树中中序遍历起始节点最小是多少 然后这个可以两次dfs来DP处理 然后就试图确定中序遍历的第一个节点 一定是siz<=2的编号最小 ...

  4. lapis 集成openresty最新版本cjson 问题的解决

    备注:    为了解决安装了lapis.同时又希望使用新版nginx 以及openresty 的特性(stream ...)   1. 解决方法 参考: https://github.com/leaf ...

  5. 性能指标术语&理发店模型

    2015-11-26 09:13:53 响应时间 响应时间=呈现时间+系统响应时间 呈现时间取决于数据在被客户端收后到呈现出页面所消耗的时间: 系统响应时间指应用系统从请求发出开始到客户端接收到数据所 ...

  6. spring深入内容

    https://www.ibm.com/developerworks/cn/java/j-lo-spring-principle/index.html

  7. 嵌入式无法使用QAudioDeviceInfo类

    修改: 1.修改pro文件 增加    QT += multimedia 2.修改Makefile文件,LIBS = $(SUBLIBS)  -L/opt/qt-4.8.5/lib -lQtMulti ...

  8. Linux 文件名中包含特殊字符

    文件和文件夹的名称中有特殊字符,操作有两种方式( - 在文件名称最前面除外). 例如:文件名为 a&b.c 1.通过转移符 "\" $ touch   a\&b.c ...

  9. win7环境下,golang thrift demo代码编译不通过

    用官方的教程代码:http://thrift.apache.org/tutorial/go 用网友提供的代码:Golang RPC 之 Thrift 都出现如下情况 状况1: 编辑器中就会提醒 Can ...

  10. FPGA常用设计思想与基本模块划分

    常用设计思想与技巧 (1)乒乓操作; (2)串并转换; (3)流水线操作; (4)异步时钟域数据同步.是指如何在两个时钟不同步的数据域之间可靠地进行数据交换的问题.数据时钟域不同步主要有两种情况: ① ...