Game Development Reference

In-Depth Information

(a)

(b)

(c)

(d)

Figure 5.11.
Illustration of shock filtering. (a) A smooth step edge. (b) First derivative

of the edge. (c) Second derivative of the edge. (d) A shock filter applies a dilation

where the second derivative is positive, and an erosion where it is negative, resulting in

asharpeningeffect.

For each iteration, first- and second-order derivatives, as well as the smoothed

structure tensor, have to be calculated. Another limitation is that Weickert's

shock filter introduces shocks in almost smooth regions, resulting in maze-like

artifacts. The next section discusses an alternative approach.

5.4.2

Gradient-Directed Shock Filter

The idea in obtaining a fast shock filter implementation is to approximate the

general working principle discussed earlier and illustrated in Figure 5.11. First,

whether a pixel is in the neighborhood of a minimum or maximum is detected.

Then, correspondingly, either an erosion or dilation is performed. Both operations

are guided by the structure tensor.

Derivative operators are highly sensitive to noise, and sensitivity increases

with order. Therefore, the second=derivative operator for the sign computation

must be regularized to avoid artifacts. In addition, the regularization allows for

artistic control over the resulting line thickness. Two strategies are at hand. First,

the image can be isotropically smoothed prior to derivative computation, using

a Gaussian filter with standard deviation
σ
i
. This helps to remove noise and

allows for aggressive image simplification. Secondly, the smoothing and deriva-

tive operators can be consolidated into a single operator,since convolution and

differentiation commute. Inspired by the flow-based difference of Gaussians filter,

and its separable implementation [Kyprianidis and Dollner 09], the second-order

derivative in direction of the major eigenvector is implemented by convolving the

image locally with a one-dimensional (scale-normalized) second-order Gaussian

derivative,

exp

,

x
2
−

σ
g

√
2
πσ
g

d
2
G
σ
g
(
t
)

d
t
2

t
2

2
σ
g

σ
g
G
σ
g
(
t
)=
σ
g

=

−

in the direction of the minor eigenvector. This operation will be referred to as

flow-guided Laplacian of Gaussian
(FLoG). More specifically, let
L
be the input

Search Nedrilad ::

Custom Search