Guided filter

Guided filter is a kind of edge-preserving smoothing filter. Same as bilateral filter, this image filter can also filter out noise or texture while retaining sharp edges.[1]

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)

This article may be too technical for most readers to understand. (October 2020)
This article needs additional citations for verification. (October 2020)
This article appears to have insufficient references to demonstrate notability. However, an editor has performed a search and claims that there are sufficient sources to indicate that this is a notable topic. (October 2020)

Unlike the bilateral filter, the guided image filter has two advantages: first, Bilateral filters have very high computational complexity, but the guided image filter does not use too complicated mathematical calculations which has linear computational complexity. Furthermore, due to the mathematical model, bilateral filters sometimes have unwanted gradient reversal artifacts and cause image distortion. While the guided image filter, since the filter is mathematically based on linear combination, the output image must be consistent with the gradient direction of the guidance image, and the problem of gradient reversal does not occur.

. . . Guided filter . . .

One key assumption of the guided filter is that the relation between guidance

I{displaystyle I}

and the filtering output

q{displaystyle q}

is linear. Suppose that

q{displaystyle q}

is a linear transformation of

I{displaystyle I}

in a window

ωk{displaystyle omega _{k}}

centered at the pixel

k{displaystyle k}

.

In order to determine the linear coefficient

(ak,bk){displaystyle (a_{k},b_{k})}

, constraints from the filtering input

p{displaystyle p}

are required. Model the output

q{displaystyle q}

as the input

p{displaystyle p}

subtract some unwanted components

n{displaystyle n}

, such as noise/textures.

The following is the basic model of the guided image filter:

(1)  

qi=akIi+bk,iωk{displaystyle q_{i}=a_{k}I_{i}+b_{k},forall iin omega _{k}}

(2)  

qi=pini{displaystyle q_{i}=p_{i}-n_{i}}

In the above formula:

qi{displaystyle q_{i}}

is the

ith{displaystyle i_{th}}

output pixel;

pi{displaystyle p_{i}}

is the

ith{displaystyle i_{th}}

input pixel;

ni{displaystyle n_{i}}

is the

ith{displaystyle i_{th}}

pixel of noise components;

Ii{displaystyle I_{i}}

is the

ith{displaystyle i_{th}}

guidance image pixel;

(ak,bk){displaystyle (a_{k},b_{k})}

are some linear coefficients assumed to be constant in

ωk{displaystyle omega _{k}}

.

The reason to define as linear combination is that the boundary of an object is related to its gradient. The local linear model ensures that

q{displaystyle q}

has an edge only if

I{displaystyle I}

has an edge, since

q=aI{displaystyle nabla q=anabla I}

.

Subtract (1) and (2) to get formula (3);At the same time, define a cost function (4):

(3)  

ni=piakIibk{displaystyle n_{i}=p_{i}-a_{k}I_{i}-b_{k}}

(4)  

E(ak,bk)=iϵωk((akIi+bkpi)2+ϵak2){displaystyle E(a_{k},b_{k})=sum _{i{epsilon }{omega }_{k}}^{}((a_{k}I_{i}+b_{k}-p{i})^{2}+{epsilon }a_{k}^{2})}

In the above formula:

ϵ{displaystyle epsilon }

is a regularization parameter penalizing large

ak{displaystyle a_{k}}

;

ωk{displaystyle omega _{k}}

is a window centered at the pixel

k{displaystyle k}

.

And the cost function’s solution is given by:

(5)  

ak=1|ω|iϵωkIipiμkpk¯σk2+ϵ{displaystyle a_{k}={frac {{frac {1}{left|omega right|}}sum _{iepsilon omega _{k}}I_{i}p_{i}-mu _{k}{bar {p_{k}}}}{sigma _{k}^{2}+epsilon }}}

(6)  

bk=pk¯akμk{displaystyle b_{k}={bar {p_{k}}}-a_{k}mu _{k}}

In the above formula:

μk{displaystyle mu _{k}}

and

σk2{displaystyle sigma _{k}^{2}}

are the mean and variance of

I{displaystyle I}

in

ωk{displaystyle omega _{k}}

;

|ω|{displaystyle left|omega right|}

is the number of pixels in

ωk{displaystyle omega _{k}}

;

p¯k=1|ω|iϵωkpi{displaystyle {bar {p}}_{k}={frac {1}{left|omega right|}}sum _{iepsilon omega _{k}}p_{i}}

is the mean of

p{displaystyle p}

in

ωk{displaystyle omega _{k}}

.

After obtaining the linear coefficients

(ak,bk){displaystyle (a_{k},b_{k})}

, we can calculate the filtering output

qi{displaystyle q_{i}}

by (1)

. . . Guided filter . . .

This article is issued from web site Wikipedia. The original article may be a bit shortened or modified. Some links may have been modified. The text is licensed under “Creative Commons – Attribution – Sharealike” [1] and some of the text can also be licensed under the terms of the “GNU Free Documentation License” [2]. Additional terms may apply for the media files. By using this site, you agree to our Legal pages . Web links: [1] [2]

. . . Guided filter . . .

© 2022 The Grey Earl INFO - WordPress Theme by WPEnjoy