DIP_review_2_2 - Image reconstruction & Restoration

1. Noise

  • 噪声一般可以用PDF表示,因此我们可以进行参数估计
    • μ\mu, σ2\sigma^2

1.1 Periodic Noise

  • sinusoidal noise(在频率域中以共轭冲激串的形式出现)
    • f(x,y)=Asin(u0x+v0y)f(x,y) = Asin(u_0x+v_0y)
    • F(u,v)=Aπj[δ(uu0,vv0)δ(u+u0,v+v0)]F(u,v) = \frac{A\pi}{j}[\delta(u-u_0,v-v_0) - \delta(u+u_0,v+v_0)]
  • cosine noise
  • \cdots
  • 适合用频率域滤波器解决,如Bandpass filter & Notch filter

1.2 Random Noise

    1. Gaussian noise
    • gaussian
    1. Rayleigh noise
    • Rayleigh
    1. Gamma noise
    • Gamma
    1. Exponent noise
    • Exponent
    1. Uniform noise
    • Uniform
    1. Salt and pepper noise
    • Salt
  • 适合用空间滤波器进行滤波
      1. 噪声与空间坐标无关
      1. 噪声之间相互独立
      1. 噪声与图片像素无关

2. Filter(这一部分与review 1部分有所重合)

2.1 Spatial filter

2.1.1 Mean Filters

  • Arithmetic mean filter
    • f^(x,y)=1mn(s,t)Sxyg(s,t)\hat{f}(x,y) = \frac{1}{mn}\sum_{(s,t)\in S_{xy}}g(s,t)
  • Geometric mean filter
    • f^(x,y)=((s,t)Sxyg(s,t))1mn\hat{f}(x,y) = (\prod_{(s,t)\in S_{xy}}g(s,t))^{\frac{1}{mn}}
    • 适用于解决高斯/均匀噪声
  • Harmonic mean filter(谐波均值滤波器)
    • f^(x,y)=mn(s,t)Sxy1g(s,t)\hat{f}(x,y) = \frac{mn}{\sum_{(s,t)\in S_{xy}}\frac{1}{g(s,t)}}
  • Contraharmonic mean filter(逆谐波均值滤波器)
    • f^(x,y)=(s,t)Sxyg(s,t)Q+1(s,t)Sxyg(s,t)Q\hat{f}(x,y) = \frac{\sum_{(s,t)\in S_{xy}}g(s,t)^{Q+1}}{\sum_{(s,t)\in S_{xy}}g(s,t)^{Q}}
    • Q=1Q = -1, 此时的逆谐波均值滤波器等于谐波均值滤波器
    • Q>0Q > 0, 适用于处理pepper noise即黑噪声
    • Q<0Q < 0, 适用于处理salt noise即白噪声

2.1.2 Order-statistic Filters

  • Median filter
    • f^(x,y)=median(s,t)Sxyg(s,t)\hat{f}(x,y) = median_{(s,t)\in S_{xy}}{g(s,t)}
    • 适用于处理比例不太大,<=0.2<= 0.2的salt and pepper noise
  • Max filter
    • f^(x,y)=max(s,t)Sxyg(s,t)\hat{f}(x,y) = max_{(s,t)\in S_{xy}}{g(s,t)}
    • 适用于处理pepper noise
  • Min filter
    • f^(x,y)=min(s,t)Sxyg(s,t)\hat{f}(x,y) = min_{(s,t)\in S_{xy}}{g(s,t)}
    • 适用于处理salt noise
  • Midpoint filter
    • f^(x,y)=12[min(s,t)Sxyg(s,t)+max(s,t)Sxyg(s,t)]\hat{f}(x,y) = \frac{1}{2}[min_{(s,t)\in S_{xy}}{g(s,t)}+max_{(s,t)\in S_{xy}}{g(s,t)}]
  • Alpha-trimmed mean filter
    • f^(x,y)=1mnd(s,t)Sxygr(s,t)\hat{f}(x,y) = \frac{1}{mn-d}\sum_{(s,t)\in S_{xy}}{g_r(s,t)}
    • 本质是舍弃patch中前后各d2\frac{d}{2},因此适用于处理椒盐噪声

2.1.3 Adaptive Filters(具有更强的细节保留能力,如edge)

  • Adaptive Median filter(自适应中值滤波器)
    • adaptive_median
    • 第一部分为寻找合适的patch以及对应的zmedz_{med}。当找到合适的zmedz_{med}在该patch中,那么进入第二部分。否则扩大patch的size直至阈值去寻找。若大于阈值时仍未找到,说明该部分无法improve,输出等于最大值或是最小值的zmedz_{med}
    • 第二部分为寻找某一点的最好输出。若该点的original pixel value就处于正常范围内则直接输出,否则输出zmedz_{med}
  • Adaptive, Local Noise-reduction filter 局部噪声抑制滤波器
    • Suppose we already know
      • I^(x,y):\hat{I}(x,y): 退化图像
      • σy2:\sigma_y^2: 整个图像的噪声方差
      • μ^L(x,y):\hat{\mu}_L(x,y): 局部均值
      • σ^L(x,y):\hat{\sigma}_L(x,y): 局部方差
    • Principle:
      • <^!swig0>^(x,y)=I^(x,y)σy2σ^L2(I^(x,y)μ^L)\hat{\hat}(x,y) = \hat{I}(x,y) - \frac{\sigma_y^2}{\hat{\sigma}_L^2}(\hat{I}(x,y) - \hat{\mu}_L)
      • If σy2=0\sigma_y^2 = 0, then <^!swig1>^(x,y)=I^(x,y)\hat{\hat}(x,y) = \hat{I}(x,y). 说明噪声方差在全图为0,直接等于原图即可
      • If $ \frac{\sigma_y^2}{\hat{\sigma}_L^2} \approx 1$, then <^!swig2>^(x,y)=μ^L(x,y)\hat{\hat}(x,y) = \hat{\mu}_L(x,y). 说明局部的方差与噪声相似,用均值替换来消除噪声
      • If σy2<<σ^L2\sigma_y^2 <<\hat{\sigma}_L^2, then <^!swig3>^(x,y)=I^(x,y)\hat{\hat}(x,y) = \hat{I}(x,y). 说明局部的方差大,特征更重要,比如edge,因此需要保留局部特征

2.2 Frequency filter(This part has also been discussed in previous review)

2.2.1 Optimum Notch Filters 最佳陷波滤波器

  • step 1: Notch pass filter 扣出噪声
    • η(x,y)=F1{HNP(u,v)G(u,v)}\eta(x,y) = F^{-1}\{H_{NP}(u,v)G(u,v)\}
  • step 2: 再减去噪声*最优系数
    • f^(x,y)=g(x,y)w(x,y)η(x,y)\hat{f}(x,y) = g(x,y) - w(x,y)\eta(x,y)
  • step 3: 估计local方差
    • σ2(x,y)=1(2a+1)(2b+1)[f^(x+s,y+t)f^(x,y)]\sigma^2(x,y) = \frac{1}{(2a+1)(2b+1)}\sum\sum[\hat{f}(x+s,y+t) - \overline{\hat{f}}(x,y)]
  • step 4: 最小化方差,找到最优系数w(x,y)w(x,y)
    • σ2(x,y)w(x,y)=0\frac{\partial \sigma^2(x,y)}{\partial w(x,y)} = 0
    • w(x,y)=g(x,y)η(x,y)g(x,y)η(x,y)η2(x,y)η2(x,y)w(x,y) = \frac{\overline{g(x,y)\eta(x,y)} - \overline{g}(x,y) \overline{\eta}(x,y)}{\overline{\eta^2}(x,y)-\overline{\eta}^2(x,y)}

3. Model of Image Degradation 图像退化模型

  • restore
  • Model Assumption
    • Linear, position-invariant degradation system
  • Estimate the degradation function (求 HH)
    • Estimation by Image observation
      • H(u,v)=G(u,v)F^(u,v)H(u,v) = \frac{G(u,v)}{\hat{F}(u,v)}, G known and F estimate
    • Estimation by experimentation
      • H(u,v)=G(u,v)AH(u,v) = \frac{G(u,v)}{A}, A strength of the impulse response
    • Estimation by modeling
  • Image restoration (求 F^\hat{F})
    • Inverse filtering
      • F^(u,v)=G(u,v)H(u,v)=F(u,v)+N(u,v)H(u,v)\hat{F}(u,v) = \frac{G(u,v)}{H(u,v)} = F(u,v) + \frac{N(u,v)}{H(u,v)}
      • Problem: 当H太小时,会导致噪声在该点的意外放大,影响该点restore的效果
      • Sol: limit the frequency around the origin
    • Wiener filtering 维纳滤波
      • Goal: e2=E[(I(x,y)I^(x,y))2]e^2 = E[(I(x,y) - \hat{I}(x,y))^2]
      • $\hat{F}(u,v)=[\frac{H^{*}(u,v)}{|H(u,v)|^2 + \frac{S_n(u,v)}{S_f(u,v)}}]G(u,v) = [\frac{1}{H(u,v)}\frac{|H(u,v)|^2}{|H(u,v)|^2 + \frac{S_n(u,v)}{S_f(u,v)}}]G(u,v) $
      • Sf(u,v)=I(u,v)2S_f(u,v) = \|I(u,v)\|^2, Sn(u,v)=N(u,v)2S_n(u,v) =\|N(u,v)\|^2, SnSf\frac{S_n}{S_f}信噪比的倒数,若无噪声则退化为Inverse Filtering
      • 由于SfS_f未知,退化为F^(u,v)=[H(u,v)H(u,v)2+K]G(u,v)\hat{F}(u,v)=[\frac{H^{*}(u,v)}{\|H(u,v)\|^2 + K}]G(u,v),来对K进行调参

4. Image recontruction

  • Recontruction problem
    • Recontruction_problem
  • Simple way: Back Projection
    • 将各个方向的一维投影反向投影,投影给路径上所有点相同的信息,最终能够重建模糊的image
    • simple_back_projection
  • CT
    • CT
    • \cdots
  • The radon transform
    • radon
    • 其中g(ρ,θ)g(\rho,\theta)是极坐标坐标系
    • Backprojection
      • fθk(x,y)=g(ρ,θk)=g(xcosθk+ysinθk)f_{\theta_k}(x,y) = g(\rho,\theta_k) = g(xcos\theta_k+ysin\theta_k)
      • f(x,y)=0πfθ(x,y)dθf(x,y) = \int_0^{\pi}f_\theta(x,y)d\theta
    • The Fourier-Slice Theorem
      • 对projection做1D FT就是原始图像做2D FT在该角度的切片
      • derive
      • 因此我们可以通过对每一个角度的投影进行采样,做完FT相加后,并做IDFT即可得到f(x,y)f(x,y)。但此时的均匀的采样将会导致频率域的高频成分过于稀疏,从而引入错误信息,降低重建质量
  • FBP (Filtered back projection)
    • 引入频率域的斜坡Ramp filter
    • FBP
    • FBP_derive
    • FBP_problem
      • 偏差1: w有限带宽
        • Sol: bandlimit
      • 偏差2: bandlimit带来的截瓣误差
        • Sol: 引入hamming window,进而减少不连续程度从而减少震荡
      • 最终使得光晕减少,图像更加清晰