Graphics Reference
In-Depth Information
In the continuous formulation, satisfying the integrability constraint ( 3.25 ) corre-
sponds to the variational problem of minimising the functional
∂z(x,y)
∂x
p(x,y) 2
∂z(x,y)
∂y
q(x,y) 2 dx dy
+
(3.27)
with respect to the surface gradients p(x,y) and q(x,y) . The Euler equation of this
problem is given by
∂p
∂x +
∂q
∂y ,
2 z
=
(3.28)
2 z denotes the Laplace operator applied to z , where ( 3.28 ) must hold at
each position in the image (Horn, 1986 ). For discrete pixels, the Laplace operator
can be approximated by the expression
where
2 z uv
κ
ε 2 (
¯
z uv
z uv ),
(3.29)
where ε is the lateral extent of the pixels, which is conveniently set to ε
=
1ifall
pixels are quadratic and of the same lateral extent, and κ
=
4 when the local average
z uv is computed based on the four nearest neighbours of the pixel (Horn, 1986 ).
According to Horn ( 1989 ), setting the derivative of the error term f with respect
to p uv and q uv to zero and combining ( 3.28 ) and ( 3.29 ) then yields the following
iteration scheme:
¯
∂z
∂x
(n)
uv +
1
γ (I
R I ) ∂R I
∂p
p (n + 1 )
uv
=
∂z
∂y
(n)
uv +
γ (I R I ) ∂R I
1
q (n + 1 )
uv
=
(3.30)
∂q
∂p
∂x
(n + 1 )
∂q
∂y
(n + 1 )
.
ε 2
κ
z (n + 1 )
uv
z (n)
uv
+
uv
uv
After each update of the surface gradients p uv and q uv , the corresponding height
map z uv is computed by means of a discrete approximation to the solution of
the Euler-Lagrange differential equations of the corresponding variational problem
(Horn, 1989 ). For a single light source and oblique illumination, this algorithm gives
a good estimate even of the surface gradients perpendicular to the direction of in-
cident light, as it adjusts them to the integrability constraint without affecting the
intensity error e i given by ( 3.19 ).
Horn ( 1989 ) remarks that even if the iterative update rule ( 3.24 ) is initialised
with a solution that perfectly fits with the observed pixel grey values, i.e. e i =
0, the
algorithm will nevertheless yield a different, smoother surface, since the constraint
of small partial derivatives of the surface is a strong restriction and not always phys-
ically reasonable. In contrast, the integrability constraint is a much weaker restric-
tion and always physically correct. If the corresponding iterative update rule ( 3.30 )
is initialised with a surface for which the associated intensity error e i is zero, the
algorithm will retain this 'perfect' solution. However, the algorithm based on the
Search WWH ::




Custom Search