Professional Documents
Culture Documents
Pattern Recognition
journal homepage: w w w . e l s e v i e r . c o m / l o c a t e / p r
A R T I C L E I N F O A B S T R A C T
Article history: In this paper, we investigate the applicability of graph cuts to the SFS (shape-from-shading) problem.
Received 30 November 2005 We propose a new semi-global method for SFS using graph cuts. The new algorithm combines the local
Received in revised form 9 April 2008 method proposed by Lee and Rosenfeld [C.H. Lee, A. Rosenfeld, Improved methods of estimating shape
Accepted 19 May 2008
from shading using the light source coordinate system, Artif. Intell. 26 (1985) 125–143] and a global
method using an energy minimization technique. By employing a new global energy minimization formu-
Keywords: lation, the convex/concave ambiguity problem of Lee and Rosenfeld's method can be resolved efficiently.
Shape from shading A new combinatorial optimization technique, the graph cuts method, is used for the minimization of the
Graph cuts proposed energy functional. Experimental results on a variety of synthetic and real-world images show
that the proposed algorithm reconstructs the 3-D shape of objects very efficiently.
© 2008 Elsevier Ltd. All rights reserved.
0031-3203/$ - see front matter © 2008 Elsevier Ltd. All rights reserved.
doi:10.1016/j.patcog.2008.05.020
3750 J.Y. Chang et al. / Pattern Recognition 41 (2008) 3749 -- 3757
−
→2 4 −
→ −
→
∇ N ij ( N ij − N ij ) (4)
2
was used to change the Euler equation into the following discrete
form:
→ −
− →− → 4 −→ −
→ −
→
(Iij − N ij · S ) S + ( N ij − N ij ) − ij N ij = 0. (5)
2
−→
Here N ij is the average of the normals in the neighborhood around
the point (i, j).
−
→
Assuming a known light source direction, S , the iterative scheme
−
→
Fig. 1. S indicates the light source direction and −
→
n indicates the surface normal −
→
for N was developed by rearranging the above equation and taking
vector.
only the direction of the vector by dropping the constant term 1/(1+
ij (2 /4)). The final iterative equations are
local minimum closer to the global minimum than other min-
⎧
−
→(k) →(k) −
− → −
→
⎨−→ = N ij + (Iij − N ij · S (k) ) S (k) ,
imization techniques, and it has relatively small computational (k+1) 2
m ij
demand [12]. 4 (6)
⎩−→(k+1) −
N ij =→
(k+1) −
m ij /→
(k+1)
m ij ,
This new technique offers a number of advantages. First, the local
features are well reconstructed because the new technique has the
nature of local SFS approaches. Second, the global minimization and where is the distance between adjacent pixels in the image.
smoothing process make the new technique robust to noise. Third, The principal criticism to the Brooks and Horn's algorithm and
this new method also improves the data consistency of the recovered to similar global approaches [1,3] is the tendency to oversmooth
needle map, so it prevents oversmoothing of recovered surfaces. the recovered needle map. Specifically, in Eq. (6), the smoothness
Fourth, the computational demand in this method is less than those term dominates the data term. Because the smoothness constraint is
in other global SFS approaches. formulated in terms of the directional derivatives of the needle map,
it is trivially minimized by a flat surface. Thus, the conflict between
the data and the model leads to a strongly smoothed needle map
1.2. Organization of the paper and loss of detail.
The determination of the tilt value by Eq. (9) results from the as-
sumption that the surface is locally concave. Thus, the tilt in the
convex surface has an opposite direction to the tilt in the concave
case. Besides this convex/concave ambiguity, this method tends to
be more sensitive to noise as the distance between the viewer and
the light source increases.
where is the tilt of the surface normal. The allowable surface normal
vector −
→n p (p ) is shown in Fig. 2(b). If we enforce the tilt of the above
energy function to have the convex case value or the concave case
value in the local method, we can obtain the energy function in Eq. Fig. 2. (a) Two allowable normal vectors − →
n p (0) and −
→n p (1), (b) allowable tilt p
and normal vector − →
n p (p ), and (c) allowable slant p , tilt p , and normal vector
(10). Furthermore, the above equation can be regarded as a special −
→n p (p , p ).
case of the following more general energy function:
(, ) = Dp (p , p ) + Vpq (p , q , p , q )
p (p,q)∈N In addition, we can think that Eq. (12) is the discrete form of the
−
→ → energy function used in Brooks and Horn's method, that is Eq. (2).
= (I − S · −
n (p , p ))2
If we deal with an object for which the local spherical assumption
p
is not suitable, we can relax the constraint in Eq. (10) to permit
+ −
→
n p (p , p ) − −
→
n q (q , q ). (12) other tilt values besides the two kinds of tilt values determined by
(p,q)∈N the local method. To do so, we add the following term to the energy
function in Eq. (11):
The allowable surface normal vector − →n p (p , p ) is shown in Fig. 2(c).
If we assume that the image irradiance equation is always guaran- Rp (p ), (14)
−
→ →
teed, then (I − S · −
n (p , p )) = 0 is satisfied at each pixel p; there- p
fore, the above equation is transformed into Eq. (11). In this case, the
slant of the normal vector can be obtained from Eq. (8) such that and the resulting energy function is as follows:
= arccos
I(x, y)
. (13)
() = Rp (p ) + Vpq (p , q ). (15)
p (p,q)∈N
3752 J.Y. Chang et al. / Pattern Recognition 41 (2008) 3749 -- 3757
−
→ −
→
Fig. 4. New difference vector d , original difference vector −
→
a , bias vector b . 4. Energy minimization using graph cuts
Fig. 6. Synthetic and real-world images for experiments: (a) Mozart image, (b) Lenna image, (c) Pepper image, and (d) Vase image.
form: Thus, to use graph cuts, we need to modify the original energy
function properly. Among several graph cuts algorithms, we employ
E(x1 , . . . , xn ) = Ei (xi ) + Ei,j (xi , xj ). (16)
the expansion move algorithm, which was introduced in Ref. [12].
i i<j
Now, let us consider the simple energy function in Eq. (10). This
E is then called regular if it satisfies the following inequality: function can be expressed in the following form:
Ei,j (0, 0) + Ei,j (1, 1) Ei,j (0, 1) + Ei,j (1, 0). (17) () = Rp (p ) + Vpq (p , q ),
p (p,q)∈N
Regularity is thus an extremely important property as it allows en-
ergy functions to be minimized by graph cuts. Moreover, without the 0 if p is a tilt in convex or concave case,
regularity constraint, the problem becomes intractable. Their second Rp (p ) =
result shows that minimizing an arbitrary non-regular function is ∞ otherwise,
NP-hard. Vpq (p , q ) = −
→
n p (p ) − −
→
n q (q ). (18)
4.2. SFS using graph cuts As we have already seen, this function is a special case of Eq. (15).
According to Ref. [12], the expansion move algorithm can be used
In this section, we investigate the applicability of graph cuts to the when Vpq satisfies the metric condition as follows:
proposed energy function. As stated above, to apply the graph cuts
method to the energy minimization problem, the energy function Vpq (, ) = 0 ⇐⇒ = ,
has to satisfy the regularity condition. First, let us investigate the
Vpq (, ) = Vpq ( , ) 0,
simple energy function in Eq. (10). Note that, however, the proposed
energy function in Eq. (10) may not satisfy the regularity condition Vpq (, ) Vpq (,
) + Vpq (
, ). (19)
at some pixels. This is illustrated in Fig. 3. Thus, we can conclude
that we cannot find the global minimum of this energy function However, Vpq in Eq. (18) does not satisfy the metric condition since
via graph cuts. Moreover, because this simple energy function is a Vpq (k, k) = −
→
n p (k) − −
→
n q (k) = 0. This is because the slant values at
special case of more general energy functions like Eqs. (11), (12), and pixels p and q are different. Now, let us modify Vpq as
(15), we can conclude that the general energy function for the SFS
problem cannot be minimized globally via graph cuts. Furthermore, Vpq (p , q , p , q ) = −
→
n (, p ) − −
→
n (, q ),
according to the NP-hardness theorem, it is very likely that the global
minimization of these energy functions is NP-hard. = min(p , q ). (20)
3754 J.Y. Chang et al. / Pattern Recognition 41 (2008) 3749 -- 3757
Fig. 7. Surface reconstruction results for a synthetic image of Mozart: (a) surface reconstructed using Horn and Brooks method, (b) surface reconstructed using Tsai and
Shah method, (c) surface reconstructed using Lee and Rosenfeld method, and (d) surface reconstructed using the proposed method.
This new Vpq function is the magnitude of a new difference vec- 5. Experiments
tor that is obtained by subtracting the original difference vector to
the bias vector. This is illustrated in Fig. 4. Note that this new func- In the experiments, we have used one synthetic image and three
tion satisfies the metric condition. Now, we can apply the expansion real images. The ground truth depth map for the synthetic image,
move algorithm to this new energy function. Furthermore, the gen- Mozart, is shown in Fig. 5. The synthetic image generated from this
eral energy function (15) that has new Vpq can also be minimized surface with light source direction (1, 0, 1) is shown in Fig. 6(a). The
by the expansion move algorithm. light source directions of the three real images as shown in Figs. 6(b),
J.Y. Chang et al. / Pattern Recognition 41 (2008) 3749 -- 3757 3755
Fig. 8. Surface reconstruction results for a real image of Lenna: (a) surface reconstructed using Horn and Brooks method, (b) surface reconstructed using Tsai and Shah
method, (c) surface reconstructed using Lee and Rosenfeld method, and (d) surface reconstructed using the proposed method.
6(c) and 6(d) were estimated by Lee and Rosenfeld's method [9]. rithms including one global SFS algorithm of Brooks and Horn [13]
The estimated light source directions of the Lenna, Pepper, and Vase and two local SFS algorithms of Lee and Rosenfeld [9] and Tsai and
images were (1. 5, 0. 866, 1), (0. 766, 0. 642, 1), and (−0. 939, 1. 867, 1). Shah [10]. Brooks and Horn's approach is usually initialized by esti-
We have performed several experiments on the above images mating the occluding boundary normals with all other normals set
using our algorithm. The energy function (15) has been used for all to point in the light source direction. However, for fair comparison,
experiments. We have also compared this with existing SFS algo- we initialized Brooks and Horn's algorithm with all normals set to
3756 J.Y. Chang et al. / Pattern Recognition 41 (2008) 3749 -- 3757
Fig. 9. Close-up results for a synthetic image of Mozart: (a) original surface of Mozart with a red rectangle indicating the close-up region. (b) Surface reconstructed using
Lee and Rosenfeld method and (c) surface reconstructed using the proposed method.
Fig. 10. Surface reconstruction results for various real images: (a) surface reconstructed from Pepper image and (b) surface reconstructed from Vase image.
point in the light source direction. Moreover, in Lee and Rosenfeld's was necessary. To integrate the normal map, we used Frankot and
algorithm, we assumed that the surface of the object is convex. Chellappa's method [16] to obtain the modified integrable normal
For the case of Tsai and Shah's algorithm, the depth map was di- maps, while the resultant surfaces were obtained by applying simple
rectly computed. In contrast, in Brooks and Horn, Lee and Rosenfeld, path integration to the normal map.
and our SFS algorithms, output is the estimated normal map. There- The reconstruction results for the synthetic image, Mozart, and
fore, to generate the final surfaces, the normal map integration step the real image, Lenna, are shown in Figs. 7 and 8, respectively. First,
J.Y. Chang et al. / Pattern Recognition 41 (2008) 3749 -- 3757 3757
Figs. 7(a) and 8(a) show the reconstructed surface obtained by Brooks Acknowledgments
and Horn's algorithm. We can see that the surfaces reconstructed by
this algorithm lost details due to oversmoothing. Second, Figs. 7(b) This work was supported in part by the ITRC program by Ministry
and 8(b) show the result of Tsai and Shah's algorithm. We can see of Information and Communication and in part by Defense Acquisi-
that their method works well on some smooth regions. However, it tion Program Administration and Agency for Defense Development,
produces noisy results in regions where there are abrupt changes Korea, through the Image Information Research Center under the
of intensities. Moreover, in the result of the Mozart image, it seems contract UD070007AD.
that the global convex/concave ambiguity has not been resolved.
Third, Figs. 7(c) and 8(c) show the result of Lee and Rosenfeld's al- References
gorithm. In this case, we can see that this algorithm produced noisy
surfaces despite its relatively good recovery of local features. Usu- [1] K. Ikeuchi, B.K.P. Horn, Numerical shape from shading and occluding boundaries,
Artif. Intell. 17 (3) (1981) 141–184.
ally, this method becomes more sensitive to noise as the distance [2] B.K.P. Horn, Height and gradient from shading, Int. J. Comput. Vision (1989)
between the viewer and the light source increases. Finally, Figs. 7(d) 37–75.
and 8(d) show the result of the proposed algorithm. The proposed al- [3] R. Szeliski, Fast shape from shading, Comput. Vision Graphics Image Process.:
Image Understanding 53 (1991) 129–153.
gorithm captures sufficient surface details while performing proper [4] K.M. Lee, C.C.J. Kuo, Shape from shading with a linear triangular element surface
smoothing process, thus recovering more suitable surfaces. In con- model, IEEE Trans. Pattern Anal. Mach. Intell. 15 (8) (1993) 815–822.
trast to Lee and Rosenfeld's algorithm, the proposed method can re- [5] J. Oliensis, P. Dupuis, A global algorithm for shape from shading, in: Proceedings
of the International Conference on Computer Vision, 1993, pp. 692–701.
solve the convex/concave ambiguity by using the energy minimiza- [6] R. Kimmel, A.M. Bruckstein, Global shape from shading, Comput. Vision Image
tion framework. Furthermore, the result improvement can be seen Understanding 62 (3) (1995) 360–369.
in the close-up image shown in Fig. 9. Fig. 10 shows the result of our [7] P.L. Worthington, E.R. Hancock, New constraints on data-closeness and needle-
map consistency for shape-from-shading, IEEE Trans. Pattern Anal. Mach. Intell.
algorithm on additional real-world images, Pepper and Vase. These 21 (12) (1999) 1250–1267.
results demonstrate that the proposed algorithm is able to recon- [8] Q. Zhu, J. Shi, Shape from shading: recognizing the mountains through a global
struct the 3-D surface of various real-world objects successfully. view, in: Proceedings on Computer Vision and Pattern Recognition, 2006, pp.
1839–1846.
[9] C.H. Lee, A. Rosenfeld, Improved methods of estimating shape from shading
6. Conclusions using the light source coordinate system, Artif. Intell. 26 (1985) 125–143.
[10] P.S. Tsai, M. Shah, Shape from shading using linear approximation, Image Vision
In this paper, we proposed a new semi-global SFS algorithm that Comput. 12 (8) (1994) 487–498.
[11] J. Kain, D.N. Ostrov, Numerical shape-from-shading for discontinuous
combines local and global energy minimization frameworks. The photographic images, Int. J. Comput. Vision 44 (3) (2001) 163–173.
method uses the surface normal vectors obtained by Lee and Rosen- [12] Y. Boykov, O. Veksler, R. Zabih, Fast approximate energy minimization via graph
feld's method as the allowable normals at each pixel. By employing a cuts, IEEE Trans. Pattern Anal. Mach. Intell. 23 (11) (2001) 1222–1239.
[13] M.J. Brooks, B.K.P. Horn, Shape and source from shading, in: Proceedings of the
new energy minimization formulation based on the convex/concave International Joint Conference on Artificial Intelligence, 1985, pp. 932–936.
regularization constraint of local normal vectors, the method deter- [14] V. Kolmogorov, R. Zabih, What energy functions can be minimized via graph
mines the final needle map. To minimize the proposed energy func- cuts?, IEEE Trans. Pattern Anal. Mach. Intell. 26 (2) (2004) 147–159.
[15] R. Zhang, P.S. Tsai, J.E. Cryer, M. Shah, Shape from shading: a survey, IEEE
tion, we applied the graph cuts technique. The results on synthetic Trans. Pattern Anal. Mach. Intell. 21 (8) (1999) 690–706.
and real world objects reveal that the proposed algorithm produces [16] R.T. Frankot, R. Chellappa, A method for enforcing integrability in shape from
more robust and enhanced results than local methods, and it exhibits shading, IEEE Trans. Pattern Anal. Mach. Intell. 10 (4) (1988) 439–451.
local features better than other global methods.
About the Author—JU YONG CHANG received the B.S. and Ph.D. degrees in Electrical Engineering and Computer Science from Seoul National University, Seoul, Korea, in
2001 and 2008, respectively. In February 2008, he joined the Mitsubishi Electric Research Laboratories at Cambridge, MA, as a postdoctoral researcher. His current research
interests are 3-D shape modeling and scene reconstruction.
About the Author—KYOUNG MU LEE received the B.S. and M.S. degrees in Control and Instrumentation Engineering from Seoul National University, Seoul, Korea, in 1984
and 1986, respectively, and Ph.D. degree in Electrical Engineering from the University of Southern California, Los Angeles, in 1993. From 1993 to 1994, he was a research
associate in the Signal and Image Processing Institute at the University of Southern California. He was with the Samsung Electronics Co. Ltd. at Suwon in Korea as a senior
researcher from 1994 to 1995, where he worked on developing industrial real-time vision systems. From 1995 to 2003, he was an Assistant and an Associate Professor in
the Department of Electronics and Electrical Engineering of the Hong-Ik University in Seoul, Korea. In September 2003, he joined the School of Electrical Engineering and
Computer Science at Seoul National University, where he is now a Professor. His current primary research interests include computational vision, shape from X, 2-D and
3-D object recognition, human-computer interface, and visual navigation.
About the Author—SANG UK LEE received the B.S. degree from Seoul National University, Seoul, Korea, in 1973, the M.S. degree from Iowa State University, Ames, in
1976, and Ph.D. degree from the University of Southern California, Los Angeles, in 1980, all in electrical engineering. From 1980 to 1981, he was with the General Electric
Company, Lynchburg, VA, working on the development of digital mobile radio. From 1981 to 1983, he was a Member of Technical Staff, M/A-COM Research Center, Rockville,
MD. In 1983, he joined the Department of Control and Instrumentation Engineering at Seoul National University as an Assistant Professor, where he served as the Head of
the School of Electrical Engineering and Computer Science. He is also affiliated with the Automation and Systems Research Institute and the Institute of New Media and
Communications at Seoul National University. He was the President of the Korean Institute of Communication Science in 2005. His current research interests are in the
areas of image and video signal processing, digital communication, and computer vision.
Dr. Lee served as an Editor-in-Chief for the Transaction of the Korean Institute of Communication Science from 1994 to 1996. He was an Associate Editor for IEEE Transactions
on Circuits and Systems for Video Technology from 2002 to 2005, and was on the Editorial Board of the EURASIP Journal of Applied Signal Processing from 2003 to 2004.
He is currently on the Editorial Board of the Journal of Visual Communication and Image Representation. He is a member of Phi Kappa Phi.