Game Development Reference
In-Depth Information
(a)
(b)
(c)
(d)
Figure 5.10. Comparison of flow-guided smoothing using first-order Euler versus second-
order Runge-Kutta stream line integration with and without shock filtering: (a) Euler,
(b) Euler + shock filtering, (c) Runge-Kutta, and (d) Runge-Kutta + shock filtering.
5.3.2 Line Integral Convolution
Let γ :( a, b )
R 2 be a smooth curve, and let f :
R 2
R
be a scalar field. Then
the line integral of f along γ is defined by
f d s = b
a
γ ( t )
f ( γ ( t ))
d t.
γ
γ ( t )
The factor
adjusts for the velocity of the curve's parameter and assures
that the line integral is invariant under orientation-preserving reparameteriza-
tions. Based on this definition, the convolution of a scalar field with a one-
dimensional function g :
R R
along a curve can be defined:
γ f ( t 0 )= b
a
g
t ) f γ ( t )
γ ( t )
g ( t 0
d t.
(5.5)
If g is normalized, that is, b
a g ( t )d t = 1, then the convolution above defines a
weighted average of the values of f along the curve.
Now, let v :
R 2 R 2 be a vector field consisting of normalized vectors. Then,
for the vector field's stream lines, we have
γ ( t ) = v ( γ ( t )) =1,whichis
equivalent to an arc length parameterization. Overlaying the vector field with
an image, the convolution along the stream line passing through the pixel can
be computed for each pixel. This operation is known as line integral convolution
and increases the correlation of the image's pixel values along the stream lines.
When the convolution is performed over white noise, this yields an effective visu-
alization technique for vector fields [Cabral and Leedom 93]. If the vector field is
closely aligned with the image features, such as the minor eigenvector field of the
smoothed structure tensor, convolution along stream lines effectively enhances
the coherence of image features, while at the same time simplifying the image.
In order to implement line integral convolution, Equation (5.5) must be dis-
cretized. For the smoothing function, a one-dimensional Gaussian function G σ s