Bilateral Filter、Cross/Joint Bilateral Filter

来源:互联网 发布:big boss知乎 编辑:程序博客网 时间:2024/06/13 17:15

今天被问到cross bilateral Filter,虽然自己知道这肯定是一种滤波算法,但是究竟它和bilateral Filter有什么关系?觉得,作为一个图像处理研究者,一定要基础扎实,所以赶紧去看看!

NerdLand在Tech Stuff中描述提到“Joint Bilateral Filter is also referred to as Cross bilateral filter”。也就是说Both mean the same。 原来神乎其神的Cross Bilateral Filter(CBF)就是常见的Joint Bilateral Filter(JBF),JBF可是很常见的。

Low Pass Filtering
下面看下低通滤波(low pass filtering)。作者说,外行人称为smoothing(In layman’s language smoothing),哎,以后再也不敢叫smoothing了。
An image is fundamentally composed of two types of frequency component, low and high. Low frequency components signify smooth and constant regions where as high frequency components signify edges and corners. So a low pass filter passes low frequency components untouched but smooths the high frequency components. It is used to reduce noise. The typical kernel is a uniform or a Gaussian kernel. These kernels work very well in general but have issues near edges/boundaries. They include artifacts because the resulting value after smoothing at the boundary pixel comes from two different regions. The edges are not preserved.
描述的真心好,看英文吧,比翻译的要清楚地多。

Bilateral Filter is a technique that can be used to perform edge preserving smoothing. There are variants to this namely anisotropic diffusion. In short, bilateral modifies the kernel based on the local content so that edges are preserved.
举例说明:
A typical example is if you have color image and depth image and you want to smooth the color image such that color does not bleed across depth boundaries. That is when you use the joint/cross bilateral filter. Here the kernel is a combination of weights based on the color similarity and depth similarity. Thus the filter will use only smooth values with similar color and depth depth and keep the rest untouched. This is a simple but elegant solution that has tremendous(极大地极好的) application
Nernland将其用于在预处理阶段平滑彩色图像以防止过分割。(smooth the color image as a preprocessing step to perform over-segmentation)

Without an additional source of information you can only apply bilateral filter, not cross bilateral filter.
那么我们就要好好区分一下,bilateral filter 和cross bilateral filter了。

bilateral filter
Wiki给的解释是:A bilateral filter is a non-linear,edge-preserving and noise-reducing smoothing filter for images。也就是双边滤波有三个特征:非线性、保留边缘、去除噪声。 The Intensity value at each pixel in an image is replaced by a weighted average of intensity values from nearby pixels。每个像素点的值被周围像素的加权值所替换。
This weight can be based a Gaussian distribution. Crucially, the weights depend not only on Euclidean distance of pixels,but also on the radiometric difference(e.g. range differences, such as color intensity, depth distance, etc.). This preserves sharp edges by systematically looping through each pixel and adjusting weights to the adjacent pixels accordingly.

Bilateral Filter定义为:

bilateral filter

归一化项:
这里写图片描述
参数定义:
这里写图片描述

对于像素点(i,j),其邻域(k,l)对其的权重W(i,j,k,l)的值的计算:
这里写图片描述

Rachel Zhang 在这里也做了比较详尽的解释和实现。

cross/joint bilateral filter
bilateral用的是一幅图像中的欧式距离和强度值的相似性来定义权重。joint bilateral则需要参考图像。
Wiki上竟然没有解释。那我们就参考论文来解释吧。

联合双边滤波和双边滤波最大的区别在于:联合双边滤波用了一个导向图来计算权重。

论文《Image fusion based on pixel significance using cross bilateral filter》 中对此有一些解释:
BF的定义是这样的:
这里写图片描述
相应的,CBF的定义是这样的:
这里写图片描述

这样做有什么好处呢?为什么要这么做呢?
我的理解是,当B中有缺失的时候,用相应的A中的强度值的相似性做参考更准确一些。例如,使用彩色图作为导向图,使用JBF进行处理时,将使用深度图中像素点间的欧式距离和彩色图中强度值的相似性加权处理,得到最后的深度图。此时由于深度图中深度值的缺失,深度值的相似性并不十分可信。

Anisotropic diffusion
Wiki解释 In image processing and computer vision, anisotropic diffusion, also called Perona-Malik diffusion, is a technique aiming at reducing image noise without removing significant parts of the image content, typically edges, lines or other details that are important for the interpretation of the image.
具体内容后续再补充吧!

1 0
原创粉丝点击