title: Week 4: Image restoration
date: 2016-02-02 20:26:14
tags: [mooc,image]
Chapter 5 Image Restoration and Reconstruction 圖像復(fù)原與重建
5.1 A Model of the Image Defradation/Restoration Process 圖像退化/復(fù)原過(guò)程的模型
As Fig.5.1 shows,the degradation process is modeled as a degradation function (退化函數(shù)) with an additive noise term (加性噪聲) ,operates on an input image $f(x,y)$ to produce a degraded image $g(x,y)$.Given $g(x,y)$ ,some knowledge about the degradation function and the additive noise term $\eta(x,y)$,the objective of restoration is to obtain an estimate $\hat{f}(x,y)$
通過(guò)退化后的圖像$g(x,y)$以及退化函數(shù)和噪聲獲得原始圖像的一個(gè)估計(jì)卢佣。
If H is a linear,position-invariant process,then the degrade image is given in the spatial domain by
$$ g(x,y) = h(x,y) * f(x,y) + \eta(x,y) $$
write the model in an equivalent frequency domain representation(use Fourier Transform):
$$ G(u,v) = H(u,v)F(u,v) + N(u,v) $$
乘性噪聲通過(guò)取對(duì)數(shù)的方式可以轉(zhuǎn)換為加性噪聲瓦戚,故主要分析加性噪聲的相關(guān)特性。
5.2 Noise Models 噪聲模型
5.2.1 Spatial and Frequency Properties of Noise 噪聲的空間和頻率特性
white noise(白噪聲),a random signal with a constant power spectral density 功率譜密度為常數(shù)的隨機(jī)信號(hào)。理想的白噪聲擁有無(wú)限大的帶寬,實(shí)際中舅桩,我們常常將有限帶寬的平整信號(hào)視為白噪聲。
5.2.2 Some Important Noise Probability Density Functions 噪聲概率密度函數(shù)
The spatial noise descriptor with which we shall be concerned is the statistical behavior of the intensity values in the noise component of the model in Fig.5.1.These may be considered random variables,characterized by a probability density function(PDF).
考慮噪聲分量的灰度值統(tǒng)計(jì)特性(由概率密度函數(shù)PDF表征的隨機(jī)變量)
Gaussian noise 高斯噪聲
also called normal noise (正態(tài)噪聲)雨膨,with mathematical tractability (數(shù)學(xué)上的易處理性)
The PDF of a Gaussian random variable,z,is given by
$$ p(z) = \frac{1}{\sqrt{2\pi}\sigma}e{-(z-\bar{z})2/{2\sigma^2}} $$
where $z$ represents intensity,$\bar{z}$ is the mean(average) value of $z$, and $\sigma$ is its standard deviation.The standard deviation squard,$\sigma^2$,is called the variance of z.
$z$ 表示灰度值, $\bar{z}$表示$z$的平均值, $\sigma$表示$z$的標(biāo)準(zhǔn)差, 標(biāo)準(zhǔn)差的平方$\sigma^2$稱(chēng)為$z$的方差擂涛。
Rayleigh noise 瑞利噪聲
The PDF of Rayleigh noise is given by
$$ p(z) =
\begin{cases}
\frac{2}(z-a)e{-(z-a)2/b} & \text{for $z\ge a$} \
\
,0 & \text{for $z\lt a$}
\end{cases} $$
The mean and variance of this density are given by
$$ \quad,,\bar{z} = a + \sqrt{\pi b/4} $$ $$ \sigma^2 = \frac{b(4-\pi)}{4} $$
Erlang(gamma) noise 愛(ài)爾蘭(伽馬)噪聲
The PDF of Gamma noise is given by
$$ p(z) =
\begin{cases}
\frac{abz{b-1}}{(b-1)!}e^{-az} & \text{for $z\ge 0$} \
\\
;0 &\text{for $z\lt 0$}
\end{cases}
$$
The mean and variance of this density are given by
$$ \bar{z} = \frac聊记{a} $$ $$ \sigma^2 = \frac撒妈{a^2} $$
Exponential noise 指數(shù)噪聲
The PDF of exponential noise is given by
$$ p(z) =
\begin{cases}
ae^{-az} & \text{ for $z \ge 0$} \\
0 &\text{ for $z<0$}
\end{cases}
$$
where $ a > 0 $. The mean and variance of this density function are
$$ \bar{z} = \frac{1}{a} $$ $$ \sigma^2 = \frac{1}{a^2} $$
Uniform noise 均勻噪聲
The PDF of uniform noise is given by
$$ p(z) =
\begin{cases}
\frac{1}{b-a} & \text{ if $a\le z \le b$} \\
,0 &\text{otherwise}
\end{cases}
$$
The mean and variance of this density function are
$$ \bar{z} = \frac{a+b}{2} $$ $$ \sigma^2 = \frac{(b-a)^2}{12} $$
Impulse (salt-and-pepper) noise 椒鹽噪聲
The PDF of exponential noise is given by
$$ p(z) =
\begin{cases}
P_a & \text{for $ z=a $} \\
P_b & \text{for $ z=b $} \\
1-P_a-P_b & \text{otherwise}
\end{cases}
$$
5.2.3 Periodic Noise 周期噪聲
Periodic noise in an image arises typically from electrical or electromechanical interference during image acquisition.As discussed in Section 5.4,periodic noise can be reduced significantly via frequency domain filtering.
一幅圖像中的周期噪聲是在圖像獲取期間由電力或機(jī)電干擾產(chǎn)生的。周期噪聲可以通過(guò)頻率域?yàn)V波來(lái)顯著減少排监。具體討論見(jiàn)5.4節(jié)狰右。
5.2.4 Estimation of Noise Parameters 噪聲參數(shù)的估計(jì)
estimate the parameters of the PDF from small patches of reasonably constant background intensity.根據(jù)有著合理恒定灰度值的一小部分來(lái)估計(jì)PDF的參數(shù)。
考慮由S表示的一個(gè)子圖像舆床,并令$p_s(z_i),i=0,1,2,...,L-1$表示S中像素灰度的概率估計(jì)(歸一化直方圖值)棋蚌,其中L是整個(gè)圖像中可能的灰度值(例如,對(duì)于8比特圖像峭弟,L為256)附鸽。S的均值和方差。計(jì)算如下:
$$ \bar{z} = \sum_{i=0}^{L-1}z_ip_s(z_i) $$ $$ \sigma^2 = \sum_{i=0}{L-1}(z_i-\bar{z})2p_s(z_i) $$
5.3 Restoration in the Presence of Noise Only-Spatial Filtering 只存在噪聲的復(fù)原-空間濾波
When the only degradation present in than image is noise,當(dāng)圖像中只有噪聲引起的退化(忽略退化函數(shù))時(shí),we have
$$ g(x,y) = f(x,y) + \eta(x,y) $$ $$ G(u,v) = F(u,v) + N(u,v) $$
假設(shè)$\hat{f}(x,u=y)$為對(duì)圖像的估計(jì)瞒瘸,則$|\hat{f}(x,y)-g(x,y)|^2$應(yīng)該盡可能與已知的噪聲分布一致坷备,由此得出合理的估計(jì)值。
5.6 Estimating the Degradation Function 估計(jì)退化函數(shù)
5.6.1 Estimation by Image Observation 圖像觀察估計(jì)
根據(jù)$ g(x,y) = f(x,y) * h(x,y) + \eta(x,y) $情臭,暫時(shí)忽略噪聲省撑,對(duì)該式作Fourier Transform,得到: $ G(u,v) = F(u,v) H(u,v) $ 故有 $$ H(u,v) = \frac{G(u,v)}{F(u,v)} $$
5.6.2 Estimation by Experimentation 試驗(yàn)估計(jì)
通過(guò)試驗(yàn)俯在,找到與獲取退化圖像設(shè)備相似的裝置竟秫,從而得到一個(gè)準(zhǔn)確的退化估計(jì)。
根據(jù)$ g(x,y) = f(x,y) * h(x,y) $跷乐,(忽略噪聲)肥败,當(dāng)$f(x,y)$為一個(gè)沖激函數(shù)$\delta(x,y)$時(shí),卷積得到的$g(x,y)$就是$h(x,y)$愕提。
使用相同的系統(tǒng)對(duì)一個(gè)沖激(小亮點(diǎn))成像馒稍,得到退化的沖激響應(yīng)。
5.6.3 Estimation by Modeling 建模估計(jì)
1浅侨、Turbulence (湍流模型)纽谒,該模型通用形式為:
$$ H(u,v) = e{-k(u2+v2){5/6}} $$ $k$ 是和湍流性質(zhì)有關(guān)的常數(shù)。
2如输、Motion blurring (運(yùn)動(dòng)模糊)鼓黔。假設(shè)圖象想 $f(x,y)$ 進(jìn)行平面運(yùn)動(dòng)央勒,$x_0(t)$ 和 $y_0(t)$ 分別是在 $x$ 和 $y$ 方向上隨時(shí)間變化的分量,$T$ 為曝光時(shí)間澳化,$g(x,y)$ 為模糊后的圖像崔步,則有
$$ g(x,y) = \int_0^Tf[x-x_0(t),y-y_0(t)]dt $$
上式經(jīng)Fourier Transform,得到
$$ G(u,v) = H(u,v),F(u,v) $$
5.7 Inverse Filtering 逆濾波
通過(guò)退化圖形的傅里葉變換 $G(u,v)$ 與退化函數(shù) $H(u,v)$ 之比來(lái)計(jì)算原始圖像的傅里葉變換的估計(jì) $\hat{F}(x,y)$ 缎谷,即
$$ \hat{F}(u,v) = \frac{G(u,v)}{H(u,v)} $$
又有 $G(u,v) = H(u,v)F(u,v) + N(u,v)$ 刷晋,代入上式,有
$$ \hat{F}(u,v) = F(u,v) + \frac{N(u,v)}{H(u,v)} $$
因?yàn)?$N(u,v)$ 未知慎陵,所以即使知道退化函數(shù),也并不能準(zhǔn)確的復(fù)原圖像喻奥。另外席纽,如果退化函數(shù)是零或者非常小的值,則分式項(xiàng)值會(huì)非常大撞蚕,很容易支配估計(jì)值 $\hat{F}(u,v)$润梯。因此,直接逆濾波的性能是很差的甥厦,下面提到的維納濾波器就是很好的改進(jìn)方法纺铭。
5.8 Minimum Mean Square Error (Wiener) Filtering 最小均方差(維納)濾波
該方法建立在圖像和噪聲都是隨機(jī)變量的基礎(chǔ)上,目標(biāo)是找到未污染圖像 $f$ 的一個(gè)估計(jì) $\hat{f}$ 刀疙,使它們之間的均方誤差最小舶赔。這種誤差度量由下式給出
$$ e^2 = E,{(f-\hat{f})^2} $$
其中,$E{\cdot}$是參數(shù)的期望值谦秧。該誤差函數(shù)的最小值在頻率域中由如下表達(dá)式給出(最常用的近似式)
$$ \hat{F}(u,v) = \left[\frac{1}{H(u,v)}\frac{|H(u,v)|2}{|H(u,v)|2+K}\right]G(u,v) $$
直接逆濾波和維納濾波效果對(duì)比