Domain transform 阅读笔记
核心思想
图像上的滤波器可以看做是一个5维空间的变换,[x,y,r,g,b]。直接估计一个5维的滤波器,有难度。
然后找到一种降维方法,构建低维的线性滤波器,然后保边就好了。
Transform for Edge-Preserving Filtering
让
p
^
=
(
x
p
,
y
p
,
r
p
,
g
p
,
b
p
)
∈
M
I
\hat{p}=(x_p,y_p,r_p,g_p,b_p)\in M_I
p^=(xp,yp,rp,gp,bp)∈MI,那么点
p
^
\hat{p}
p^对应到图像中就是,一个空间的坐标
p
=
(
x
p
,
y
p
)
p=(x_p,y_p)
p=(xp,yp),一个强度值坐标
I
(
p
)
=
(
r
p
,
g
p
,
b
p
)
I(p)=(r_p,g_p,b_p)
I(p)=(rp,gp,bp),滤波器可表示为:
J
(
p
)
=
∫
Ω
I
(
q
)
F
(
p
^
,
q
^
)
d
q
J(p)=\int_{\Omega}I(q)F(\hat{p},\hat{q})dq
J(p)=∫ΩI(q)F(p^,q^)dq
重点:找到一个transformation进行降维,然后在低维空间应用滤波器:
J ( p ) = ∫ Ω I ( q ) H ( t ( p ^ , q ^ ) ) d q J(p)=\int_{\Omega}I(q)H(t(\hat{p},\hat{q}))dq J(p)=∫ΩI(q)H(t(p^,q^))dq
If the transformation t preserves the original distances from R 5 R5 R5 in R l Rl Rl, it will also maintain the edge-preserving property of a filter defined in the lower dimensional space
如何保边 ——> distance preserve
distance-preserving transforms
own thoughts: 理论来说,应该是一个5d滤波器,然后transform的原则是变换前后的距离最小(一个很朴素的想法)。但是5d太难做了,于是降维。比如双边滤波器,求解l2距离,可看做是在2d空间求解。5d->2d。
文章考虑x轴,计算L1距离,5d->1d.在1d上保证L1距离不变:
∣ t ( x i , I ( x i ) ) − t ( x j , I ( x j ) ) ∣ = ∥ ( x i , I ( x i ) ) − ( x j , I ( x j ) ) ∥ |t(x_i,I(x_i))-t(x_j,I(x_j))|= \|(x_i,I(x_i))-(x_j,I(x_j))\| ∣t(xi,I(xi))−t(xj,I(xj))∣=∥(xi,I(xi))−(xj,I(xj))∥
令
c
t
(
x
)
=
t
(
x
^
)
=
t
(
x
,
I
(
x
)
)
ct(x)=t(\hat{x})=t(x,I(x))
ct(x)=t(x^)=t(x,I(x))构造
c
t
(
x
)
ct(x)
ct(x):
c
t
(
x
+
h
)
−
c
t
(
x
)
=
h
+
∣
I
(
x
+
h
)
−
I
(
x
)
∣
ct(x+h)-ct(x)=h+|I(x+h)-I(x)|
ct(x+h)−ct(x)=h+∣I(x+h)−I(x)∣
c
t
(
u
)
=
∫
0
u
1
+
∑
k
=
1
c
∣
I
k
′
(
x
)
∣
d
x
ct(u)=\int_0^u1+ \sum_{k=1}^c|I'_k(x)|dx
ct(u)=∫0u1+k=1∑c∣Ik′(x)∣dx
Application to Edge-Presercing Filtering
引入尺度因子
( I ∗ H 1 / a ) ( τ ) = ∫ − ∞ + ∞ I ( u ) H 1 / a ( u − τ ) d u = ( I a ∗ H ) ( τ ) (I\ast H_{1/a})(\tau)=\int_{-\infty}^{+\infty}I(u)H_{1/a}(u-\tau)du=(I_a\ast H)(\tau) (I∗H1/a)(τ)=∫−∞+∞I(u)H1/a(u−τ)du=(Ia∗H)(τ)
通过卷积,信号的尺度变化可通过滤波器的尺度变化来实现;
c t ( u ) = ∫ o u 1 + σ s σ r ∑ k = 1 c ∣ I k ′ ( x ) ∣ d x ct(u)=\int_o^u1+\frac{\sigma_s}{\sigma_r}\sum_{k=1}^{c}|I'_k(x)|dx ct(u)=∫ou1+σrσsk=1∑c∣Ik′(x)∣dx
分析
- 为什么可以保边
c t ′ ( x ) = 1 + σ s σ r ∣ I ′ ( x ) ∣ ct'(x)=1+\frac{\sigma_s}{\sigma_r}|I'(x)| ct′(x)=1+σrσs∣I′(x)∣
对输入信号进行尺度变化 c t ′ ( x ) ct'(x) ct′(x)相当于在滤波器上进行尺度变化 1 / c t ′ ( x ) 1/ct'(x) 1/ct′(x), 因此,
s m o o t h i n g H ( x ) ∝ ( σ H / c t ′ ( x ) ) = σ x / ( 1 + σ s σ r ∣ I ′ ( x ) ∣ ) smoothing_H(x) \propto(\sigma_H/ct'(x))=\sigma_x/(1+\frac{\sigma_s}{\sigma_r}|I'(x)|) smoothingH(x)∝(σH/ct′(x))=σx/(1+σrσs∣I′(x)∣)
2D signals
首先计算horizontal pass,再计算vertical pass.
- 将2D信号转为两个1d信号,本质还是1d信号处理;
filtering in the transformed domain
-
normalized convolution (NC)
- 归一化的卷积,利用moving-average的思想构造系统函数H;
- 在半径为r的矩形框内,计算冲激响应,然后归一化;
- 只考虑了离散的冲击响应,可能失去了一部分的信息;
- 基于积分图的思想计算卷积;
-
interploated convolution (IC)
- 插值,折线,计算梯形面积
-
Recursive Filtering(RF)
一点感想
domain transform filter 由于只考虑了一个维度,非常适合优化视差图。但如果想边缘更加细腻,guided filter更好。