bilateral filter learning

bilateral_filter

1. 1. 1. algrithm_introduction

1.1 1.1 1.1 gaussian_linear_filter

1.1.1 1.1.1 1.1.1 guassian_function

The Gaussian Linear Filter functin is the basic filter function at spacial denoising, though not function well at edge preserving. To apply, we need to do a set of steps.
First of all, I want to introduce the gaussian function, as follow.
G σ ( x ) = e x p − x 2 2 σ 2 (1.1.1.1) G_{\sigma}(x) = exp^{- \frac{x^2}{2\sigma^2}} \tag{1.1.1.1} Gσ(x)=exp2σ2x2(1.1.1.1)
maybe the unvisible expression is too difficult to understand, so we can plot gaussian function on MATLAB, code is given.
In the gragh, we can learn that guassian function empower a much larger value to the center part of the gragh, while empower a much smaller value to the surrouding areas.
gaussian_2d在这里插入图片描述
f i g . 1.1.1.1 fig. 1.1.1.1 fig.1.1.1.1 The right figure is guassian function plot on 2-dimension, the left fighre is guassian function plot on 3-dimension. The parameter σ \sigma σ of gaussian function in left pic is σ = 0.2 , 0.4 , 0.6 , 0.8 \sigma = 0.2, 0.4, 0.6, 0.8 σ=0.2,0.4,0.6,0.8. The parameter σ \sigma σ of guassian function in right pic is σ = 2 \sigma = 2 σ=2.

%% plot 2-dimension gaussian-function
x = [-5: 0.1: 5];
gaussian = @(x, sigma) exp((-x.^2) ./ (2*sigma^2));
y = zeros(size(x));
figure(1);
for i = 1: 4
    y = gaussian(x, 0.2 * i);
    subplot(2, 2, i);
    plot(x, y);
end

%% plot 3-dimension gaussian-function
x = [-5: 0.1: 5];
map = zeros(size(x, 2), size(x, 2));
figure(2);
for i = 1: size(x, 2)
    for j = 1: size(x, 2)
        map(i, j) = x(i)^2 + x(j)^2;
    end
end
mesh(x, x, gaussian(map, 2));
1.1.2 1.1.2 1.1.2 apply guassian function to filter

It is avaliable to get the empower map through guassian function, then we can apply it to a filter to carry some computational photogragh task like denoising. Here we gave the filter epxpression as follow.
G σ ( f ) ( x ) = 1 Z ∑ y G σ ( x − y ) f ( y ) (1.1.2.1) G_{\sigma}(f)(x) = \frac{1}{Z}\sum_{y}{G_{\sigma}(x - y)f(y)} \tag{1.1.2.1} Gσ(f)(x)=Z1yGσ(xy)f(y)(1.1.2.1)
In this function Z = ∑ y G σ ( y ) Z = \sum_{y}G_{\sigma}(y) Z=yGσ(y), always we standlize all value in f ( y ) f(y) f(y) to make Z = 1 Z = 1 Z=1.
To understand expression 1.1.2.1 1.1.2.1 1.1.2.1 , I want to have the aid of some concept in coputational photogragh. If we see x x x as target pixel, which have some noise in it. To denoise it, we can reference the surrounding pixels to repower the value to pixel x x x. Moreover, we often apply surrounding pixels in a squre.
Suspend v a l m , n val_{m, n} valm,n is value matrix of pixel x x x's surrounding pixels, G m , n G_{m, n} Gm,n is gaussian function matrix. Sum of G m , n G_{m, n} Gm,n equals 1 1 1.Apply G m , n G_{m, n} Gm,n to v a l m , n val_{m, n} valm,n, output the denoising temp martrix. After a series of steps, we can get the value of pixel x x x. Details as follow.
G u a s s i a n ( x ) m , n = v a l m , n . ∗ G m , n Guassian(x)_{m, n} = val_{m,n} .*G_{m, n} Guassian(x)m,n=v

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值