参考此处原文。
注意,里面的 \(\xi, x\) 都是二维向量。
只考虑空间距离:
\[h(x) = k_d^{-1}
\int_{-\infty}^\infty \int_{-\infty}^\infty
f(\xi)c(\xi - x) d\xi
\]
\[k_d =
\int_{-\infty}^\infty \int_{-\infty}^\infty
c(\xi) d\xi
\]
只考虑颜色差异:
\[h(x) = k_r^{-1}
\int_{-\infty}^\infty \int_{-\infty}^\infty
f(\xi)s(f(\xi) - f(x)) d\xi
\]
\[k_r =
\int_{-\infty}^\infty \int_{-\infty}^\infty
s(f(\xi) - f(x)) d\xi
\]
组合空间距离与颜色差异:
\[h(x) = k^{-1}
\int_{-\infty}^\infty \int_{-\infty}^\infty
f(\xi)c(\xi-x)s(f(\xi) - f(x)) d\xi
\]
\[k =
\int_{-\infty}^\infty \int_{-\infty}^\infty
c(\xi-x)s(f(\xi) - f(x)) d\xi
\]
距离公式通常用高斯函数:
\[c(\xi - x) = e^{-\frac{\lVert \xi-x \rVert^2}{2\sigma_d^2}}
\]
\[s(\xi - x) = e^{-\frac{\lVert f(\xi)-f(x) \rVert^2}{2\sigma_r^2}}
\]
4.6 数字图像处理——双边滤波
原文:https://www.cnblogs.com/forcekeng/p/14352576.html