204 CHINESE OPTICS LETTERS / Vol. 5, No. 4 / April 10, 2007
Fast algebra algorithm of shape-from-shading with
specular reflectance
Lei Yang (
) and Jiuqiang Han (
)
School of Electronics and Information Engineering, Xi’an Jiaotong University, Xi’an 710049
Received September 12, 2006
Shape-from-shading (SFS) is to reconstruct three-dimensional (3D) shape from a single gray image, which
is an important problem in computer vision. We propose a novel SFS method based on hybrid reflection
model which contains both diffuse reflectance and specular reflectance. The intensity gradient of image is in
the direction that the shap e of surface changes most, so we use directional derivative of the reflectance map
as parts of objective function. When discrete characteristic of digital images is considered, finite difference
approximates differential operator. So the reflectance map equation described by a partial differential
equation (PDE) turns into an algebra equation about the unknown surface height correspondingly. Using
iterative numeric computation, a new SFS metho d is gained. Experiments on synthesis and real images
show that the proposed SFS method is accurate and fast.
OCIS co des: 110.6150, 100.5010.
Shape-from-shading (SFS) is a classical problem in com-
puter vision, which reconstructs the three-dimensional
(3D) shap e from one two-dimensional (2D) image
[1−3]
.
The brightness of image points mainly depends on four
respects: the orientation of light source, the location
of camera, the orientation (shape) of object and the
reflectance property of its surface
[4]
. SFSisbasedonthe
reflectance map equation at each imaged pixel. The de-
velopment of SFS mainly depends on two asp ects, namely
the research of a better reflectance model and the in-
vestigation of an effective SFS algorithm. The classical
formulation of SFS is based on Lambertian reflectance
model together with the minimization of the total error
function using the calculus of variations
[2,3]
.Compre-
hensive survey of SFS can be found in Refs. [2,5]. Recent
reconstruction methods use advanced computation tools
such as neura l networks
[4,6,7]
, viscosity solution of partial
differential equation (PDE)
[8]
, level set approach
[9]
,and
so on. SFS has been widely applied in terrain analysis for
moon and ocean, medical imaging, industry automatic
inspection, etc.
[1,10,11]
.
A fast SFS method based on hybrid reflection model
is proposed in this paper. We used the hybrid reflection
model because it is more prone to real reflectance than
Lambertian mo del or Torrance-Sparrow model
[4]
.We
mainly make progress in the objective function con-
taining gradient of image and effective reconstruction
method. The intensity gradient is in the direction that
the shape of surface changes most, so we decide to use di-
rectional derivative of image as parts of objective function
in our SFS. When discrete characteristic of digital images
is considered, finite difference approximates differential
operator. So the reflectance map equation described by
PDE turns into an algebra equation about the unknown
surface height. Using iterative numeric computation, a
new SFS method can be gained.
In SFS, we generally assume a point light source lo-
cated in infinite location. E denotes the light strength,
anditsdirectionisn
i
=(−p
0
, −q
0
, 1)
T
in image center
coordinate. The observing ca mera is located in direction
of n
o
=(0, 0, 1)
T
.Thesurfaceisz = z(x, y), and its
direction is n (n =(−
∂z
∂x
, −
∂z
∂y
, 1)
T
). Orthogonal projec-
tion is used in the procedure of imaging. Two classes of
reflection models, namely, diffuse reflection and sp ecu-
lar reflection, are usually considered. For most SFS algo-
rithms, the reflectance model is assumed to be a Lamber-
tian one
[2]
. The reflectance map function of the surface
illuminated by single point light source is given by
R
d
(n, n
i
,n
o
)=
E
π|n||n
i
|
× n
T
· n
i
. (1)
On the other hand, Torrance-Sparrow model using
a Gaussian distribution to model the facet orienta-
tion function is used to deal with specular reflectance
phenomena
[4]
. Another simple specular model is Phong’s
model
[7]
which indicates that the light perceived by the
camera is represented as
R
s
(n, n
i
,n
o
)=E × (n
T
· n
spec
)
K
, (2)
where the vector n
spec
=(n
i
+ n
o
)/ |n
i
+ n
o
| is called the
halfway-vector (or specular reflectance direction), and
K denotes a constant. Different values of K denote
different kinds of surfaces which are more or less mirror-
like.
But real surface reflectance is neither pure Lambertian
nor pure specular. Instead, they are a combination of
diffuse and specular components. Tagare et al. proposed
a hybrid model consisting of thre e components
[12]
.A
linear combination mo del of diffuse and specular compo-
nents described by Gaussian function was used by Cho
[4]
.
We use the hybrid reflectance as
[7]
R(p, q)=(1− w)R
d
(p, q)+wR
s
(p, q), (3)
where p(x, y)=−
∂z(x,y)
∂x
and q(x, y)=−
∂z(x,y)
∂y
de-
note the x-andy-partial derivatives of reconstructed
3D surface height z = z(x, y) with respect to the im-
age coordinates x and y, respectively, n
spec
denoted
as (−p
h
, −q
h
, 1)
T
is specular reflectance direction, and
w ∈ [0, 1] is the factor of sp ecular component. When
gray values of image and reflectance function are b oth
normalized, we get the well-known reflectance map equa-
1671-7694/2007/040204-04
c
2007 Chinese Optics Letters