高維意味着函數中有多個變量,典型的高維傅里葉應用為圖像處理。
一個二維圖像的亮度(灰度)可以用$f(x_1,x_2)$來表示,以lena為例,圖像平面作為$x_1,x_2$平面,灰度作為$z$軸,形成一個三維曲面
original image front of curve surface side of curve surface
一維傅里葉變換的作用是把二維平面上的曲線轉換成頻域表示,二維的傅里葉變換的作用就是把三維曲面轉換成頻域表示。
mathematica script:
data = Import["ExampleData/lena.tif"]; imageData = ImageData[data, "Byte"]; width = ImageDimensions[data][[1]]; height = ImageDimensions[data][[2]]; scaleParam = 5; scaledWidth = IntegerPart[width/scaleParam]; scaleHeight = IntegerPart[height/scaleParam]; size = width*height; scaledSize = scaledWidth*scaleHeight; red = 1; green = 2; blue = 3; image3d = Table[If[j == 3, imageData[[If[IntegerPart[i/width] > 0, IntegerPart[i/width], 1], If[Mod[i, width] > 0, Mod[i, width], 1], green]], If[j == 1, If[IntegerPart[i/width] > 0, IntegerPart[i/width], 1], If[Mod[i, width] > 0, Mod[i, width], 1]]], {i, size}, {j, 3}]; ListPlot3D[image3d, Mesh -> None, InterpolationOrder -> 3, ColorFunction -> GrayLevel]
從一維傅里葉變換到二維傅里葉變換
一維傅里葉變換的公式如下
$\displaystyle{ \mathcal{F}f(s) = \int_{-\infty}^{\infty}e^{-2\pi ist}f(t)dt }$
其中有變量$s,t$,變換中與這些變量相關的部分有$f(t),\mathcal{F}f(s)$以及$e^{-2\pi ist}$
二維傅里葉變換里面,變量$s,t$都變成了如下二維變量
空間變量(spatial variable)
$\underline{x} = (x_1,x_2)$
頻率變量
$\underline{\xi} = (\xi_1,\xi_2)$
注:我們在討論一維傅里葉變換的時候采用的是以時間作為單位的時域,但是在二維(N維)傅里葉變換的時候采用的是空間為單位的空域。
那么二維空域函數就可以寫成
$f(\underline{x}) = f(x_1,x_2)$
二維頻域函數就寫成
$\mathcal{F}f(\underline{\xi} = \mathcal{F}f(\xi_1,\xi_2))$
復指數中的乘積$st$就變成$\underline{x}$與$\underline{\xi}$的內積(把$\underline{x},\underline{\xi}$看作向量)
$\underline{x}\cdot \underline{\xi} = x_1\xi_1+x_2\xi_2$
那么復指數$e^{-2\pi ist}$變成
$e^{-2\pi i(\underline{x}\cdot \underline{\xi})} = e^{-2\pi i(x_1\xi_1+x_2\xi_2)}$
有了以上的變量替換,二維傅里葉變換有如下形式
向量形式
$\displaystyle{ \mathcal{F}f(\underline{\xi}) = \int_{\mathbb{R}^2}e^{-2\pi i(\underline{x}\cdot \underline{\xi})}f(\underline{x})d\underline{x} }$
分量形式
$\displaystyle{ \mathcal{F}f(\xi_1,\xi_2) = \int_{-\infty}^{\infty}\int_{-\infty}^{\infty}e^{-2\pi i(x_1\xi_1+x_2\xi_2)}f(x_1,x_2)dx_1dx_2 }$
N維傅里葉變換
$\begin{matrix}
\underline{x} &= &(x_1,x_2,…,x_n)\\
\underline{\xi} &= &(\xi_1,\xi_2,…,\xi_n)\\
\underline{x}\cdot \underline{\xi} &= &x_1\xi_1+x_2\xi_2+…+x_n\xi_n
\end{matrix}$
向量形式
$\displaystyle{ \mathcal{F}f(\underline{\xi}) = \int_{\mathbb{R}^n}e^{-2\pi i(\underline{x}\cdot \underline{\xi})}f(\underline{x})d\underline{x} }$
分量形式
$\displaystyle{ \mathcal{F}f(\xi_1,\xi_2,…,\xi_n) = \underbrace{\int_{-\infty}^{\infty}…\int_{-\infty}^{\infty}}_{n}e^{-2\pi i(x_1\xi_1+x_2\xi_2+...+x_n\xi_n)}f(x_1,x_2,...,x_n)dx_1dx_2…dx_n }$
傅里葉逆變換
$\displaystyle{ \mathcal{F}^{-1}g(\underline{x}) = \int_{\mathbb{R}^n}e^{2\pi i(\underline{x}\cdot \underline{\xi})}g(\underline{\xi})d\underline{\xi} }$
深入理解
在前面一維傅里葉變換類比到二維傅里葉變換的時候,復指數有以下過渡
$e^{2\pi ist} \quad \rightarrow \quad e^{2\pi i(\underline{x}\cdot\underline{\xi})}$
其中的$st$為什么會變成了$\underline{x}\cdot\underline{\xi}$這種內積的形式呢?
下面將從一維復指數開始分析,后會過渡到二維復指數。
一維復指數
在一維傅里葉級數的分析時,我們講到任何周期為1的函數都能表達成復指數的形式如下
$f(t) = \displaystyle{ \sum_{k=-\infty}^{\infty}C_ke^{2\pi ikt} }$
其中分解成無限個復指數分量,傅里葉正逆變換是把周期取極限后再做調整的結果。
現在我們試着在坐標軸上描繪出某個復指數。
取$k=1$,即有$h(t) = e^{2\pi it}$,其中變量為t。不過由於它為復指數,我們無法在實坐標軸上把完整的圖像畫出來,但是我們注意到,該函數有如下性質
$h(t+1) = e^{2\pi i(t+1)} = e^{2\pi it}e^{2\pi i}=e^{2\pi it} = h(t)$
$e^{2\pi it} = 1 \qquad for\ t=0,\pm 1,\pm 2,…$
可以畫出下圖
可以看到盡管我們不能完整畫出該復指數的圖像,但是可以看到它每間隔1都會回到原來的位置,是一個周期為1的振盪函數(曲線)。
如此類推
-
$e^{2\pi ikt}$就是周期為$\frac{1}{k}$(頻率為$k$)的振盪函數,任意只含有一個變量t的函數$f(t)$都能由無數個這種不同頻率的振盪函數組合得到。
二維復指數
按照上面分析一維復指數的思路,我們來分析二維復指數$e^{2\pi i(\underline{x}\cdot\underline{\xi})}$
取固定的$\underline{\xi} = (1,1)$,即
$\underline{x}\cdot\underline{\xi} = x_1+x_2$
當$\underline{x}\cdot\underline{\xi} = 0,\pm1,\pm2…$時,有
$e^{2\pi i(\underline{x}\cdot\underline{\xi})} = 1$
此時該復指數的值為1,在圖像上表示就是振盪到1的位置
圖上的斜線分別為
$x_1+x_2 = 0,\pm1,\pm2…$
他們有着相同的法向量$(1,1)$,即
$\underline{\xi} = (\xi_1,\xi_2)$
他們之間的距離為
$distance=\frac{\frac{1}{\xi_1}\frac{1}{\xi_2}}{\sqrt{\frac{1}{\xi_1^2}+\frac{1}{\xi_2^2}}} = \frac{\frac{1}{\xi_1\xi_2}}{\sqrt{\frac{\xi_1^2+\xi_2^2}{\xi_1^2\xi_2^2}}} = \frac{1}{\sqrt{\xi_1^2+\xi_2^2}} = \frac{1}{\left \| \xi \right \|}$
因此,結合前面坐標圖像,有這樣的描述:
-
$e^{2\pi i(\underline{x}\cdot\underline{\xi})}$是一個法向量為$\underline{\xi} = (\xi_1,\xi_2)$周期為$\frac{1}{\left \| \xi \right \|} = \frac{1}{\sqrt{\xi_1^2+\xi_2^2}}$的振盪函數(曲面)。
通過修改$\underline{\xi}$,可以得到不同的法向量與不同周期的二維復指數$e^{2\pi i(\underline{x}\cdot\underline{\xi})}$,無限的這類復指數可以組合成包含兩個變量的任意函數$f(\underline{x}) = f(x_1,x_2)$,即三維曲面。





