Biomedical Engineering Reference
In-Depth Information
this method discretizes the reflectance map in a different way. Like Pentland's
method, the surface orientation (
p
,
q
) is approximated by its linear approx-
imation using the forward difference formula (5.36), while unlike Pentland's
method, the reflectance map is then directly linearized in terms of the depth
Z
using Taylor series expansion. Finally, Newton's iteration method is applied to
the discretized equation to get a numerical approximation to the depth
Z
.
In
what follows, we will derive this scheme step by step.
To begin with, we rewrite the irradiance equation (5.2) in the following for-
mat:
0
=
f
=
I
−
R
.
(5.42)
Replacing
p
and
q
by their linear approximation using the forward difference
formulas (5.36), we obtain
0
=
f
(
I
(
x
,
y
)
,
Z
(
x
,
y
)
,
Z
(
x
−
1
,
y
)
,
Z
(
x
,
y
−
1))
=
I
(
x
,
y
)
−
R
(
Z
(
x
,
y
)
−
Z
(
x
−
1
,
y
)
,
Z
(
x
,
y
)
−
Z
(
x
,
y
−
1))
.
(5.43)
If we take the Taylor series expansion about a given depth map
Z
n
−
1
,weget
the following equation:
0
=
f
(
I
(
x
,
y
)
,
Z
(
x
,
y
)
,
Z
(
x
−
1
,
y
)
,
Z
(
x
,
y
−
1))
≈
f
(
I
(
x
,
y
)
,
Z
n
−
1
(
x
,
y
)
,
Z
n
−
1
(
x
−
1
,
y
)
,
Z
n
−
1
(
x
,
y
−
1))
(
Z
(
x
,
y
)
−
Z
n
−
1
(
x
,
y
))
+
×
∂
f
(
I
(
x
,
y
)
,
Z
n
−
1
(
x
,
y
)
,
Z
n
−
1
(
x
−
1
,
y
)
,
Z
n
−
1
(
x
,
y
−
1))
∂
Z
(
x
,
y
)
(
Z
(
x
−
1
,
y
)
−
Z
n
−
1
(
x
−
1
,
y
))
+
×
∂
f
(
I
(
x
,
y
)
,
Z
n
−
1
(
x
,
y
)
,
Z
n
−
1
(
x
−
1
,
y
)
,
Z
n
−
1
(
x
,
y
−
1))
∂
Z
(
x
−
1
,
y
)
(
Z
(
x
,
y
−
1)
−
Z
n
−
1
(
x
,
y
−
1))
+
×
∂
f
(
I
(
x
,
y
)
,
Z
n
−
1
(
x
,
y
)
,
Z
n
−
1
(
x
−
1
,
y
)
,
Z
n
−
1
(
x
,
y
−
1))
∂
Z
(
x
,
y
−
1)
(5.44)
.
Given an initial value
Z
0
(
x
,
y
), and using the iterative formula:
Z
n
(
x
,
y
−
1)
=
Z
n
−
1
(
x
,
y
−
1)
,
Z
n
(
x
−
1
,
y
)
=
Z
n
−
1
(
x
−
1
,
y
)
,