Game Development Reference
InDepth Information
Recall that a symmetric matrix has orthogonal eigenvectors. Therefore, it is
sucient to compute only one of the eigenvectors, since the other can be found
by rotating the vector 90 degrees. Let us first assume that the eigenvalues are
distinct, which can be easily verified by checking that the square root
R
is nonzero.
Under this assumption, we have a welldefined major eigenvector, which can be
found by solving the following linear system:
λ
1
I
)
v
=
E
v
v
2
=0
.
−
λ
1
F
FG
(
A
−
−
λ
1
By construction,
A
λI
is singular, and therefore the two equations are linearly
dependent. Hence, a solution of one equation will also be a solution of the other,
providing us with two alternatives to choose from:
η
1
=
F
λ
1
−
−
=
,
η
2
=
λ
1
−
=
E
−
G
.
F
G
+
R
2
E
−
G
E
−
+
R
F
F
2
By choosing
η
1
if
E
G<
0and
η
2
if
E
G
0, we can kill two birds with
one stone. Firstly, subtractive cancelation is avoided, since the first term in the
sum is positive. Secondly, if
F
= 0 and, correspondingly,
R
=
−
−
≥
/
2, then
the computed vector is guaranteed to be nonzero. Finally, if the square root
R
is zero, we have a single eigenvalue with multiplicity two, and the eigenspace is
twodimensional.
A limitation of the discussed implementation is that computations of the
E
G

−

form
√
a
2
+
b
2
may underflow or overflow if not computed at higher precision. A
common approach to avoid such issues is to exchange
a
and
b
if necessary, such
that

1+(
b/a
)
2
.

a

>

b

, and compute

a
5.2.3 Structure Tensor Relaxation
In lowcontrast regions, the signaltonoise ratio is low, making the gradient in
formation unreliable. Accordingly, the estimated orientation is almost random
and of little value. However, appropriate orientation information is critical for
the presented algorithm. Therefore, in this section an approach for replacing
unreliable structure tensors will be discussed. As explained earlier, the square
root of the major eigenvalue is a generalization of the gradient magnitude and
can thus be used to identify points with reliable structure tensors
∂
Ω=
x
Ω
λ
1
>τ
r
,
∈
(5.4)
where
τ
r
is a control parameter. The idea is now to look for a smooth function
s
that interpolates the structure tensors
S
defined on
∂
Ω. Such a function is given
by the membrane that minimizes
2
d
x
arg min
s
Ω
∇
s

with
s

∂
Ω
=
S

∂
Ω
.
Search Nedrilad ::
Custom Search