Skip to main content

Perspective Shape from Shading

An Exposition on Recent Works with New Experiments

  • Chapter
  • First Online:
Advances in Photometric 3D-Reconstruction

Abstract

Shape from Shading (SFS) is a fundamental task in computer vision. By given information about the reflectance of an object’s surface and the position of the light source, the SFS problem is to reconstruct the 3D depth of the object from a single grayscale 2D input image. A modern class of SFS models relies on the property that the camera performs a perspective projection. The corresponding perspective SFS methods have been the subject of many investigations within the last years. The goal of this chapter is to give an overview of these developments. In our discussion, we focus on important model aspects, and we investigate some prominent algorithms appearing in the literature in more detail than it was done in previous works.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Abdelrahim AS, Abdelrahman MA, Abdelmunim H, Farag A, Miller M (2011) Novel image-based 3D reconstruction of the human jaw using shape from shading and feature descriptors. In: Proceedings of the British machine vision conference (BMVC), pp 1–11

    Google Scholar 

  2. Ahmed A, Farag A (2006) A new formulation for shape from shading for non-Lambertian surfaces. In: Proceedings of 2006 IEEE computer society conference on computer vision and pattern recognition, vol 2, June 2006. IEEE Computer Society Press, New York, NY, pp 17–22

    Google Scholar 

  3. Aloimonos JY (1990) Perspective approximations. Image Vis Comput 8(3):179–192

    Google Scholar 

  4. Bakshi S, Yang YH (1994) Shape from shading for non-Lambertian surfaces. In: Proceedings of IEEE international conference on image processing, vol 2, Austin, TX. IEEE Computer Society Press, pp 130–134

    Google Scholar 

  5. Bors AG, Hancock ER, Wilson RC (2003) Terrain analysis using radar shape-from-shading. IEEE Trans Pattern Anal Mach Intell 25(8):974–992

    Google Scholar 

  6. Breuß M, Cristiani E, Durou J-D, Falcone M, Vogel O (2012) Perspective shape from shading: ambiguity analysis and numerical approximations. SIAM J Imaging Sci 5(1):311–342

    MathSciNet  MATH  Google Scholar 

  7. Cacace S, Cristiani E, Falcone M (2014) Can local single-pass methods solve any stationary Hamilton-Jacobi-Bellman equation? SIAM J Sci Comput 36(2):570–587

    MathSciNet  MATH  Google Scholar 

  8. Camilli F, Tozza S (2017) A unified approach to the well-posedness of some non-Lambertian models in shape-from-shading theory. SIAM J Imaging Sci 10(1):26–46

    MathSciNet  MATH  Google Scholar 

  9. Cho SI, Saito H, Ozawa S (1997) A divide-and-conquer strategy in shape from shading. In: Proceedings of the 1997 IEEE computer society conference on computer vision and pattern recognition (CVPR), June 17–19, San Juan, Puerto Rico, pp 413–419

    Google Scholar 

  10. Courteille F, Crouzil A, Durou J-D, Gurdjos P (2007) Shape from shading for the digitization of curved documents. Mach Vis Appl 18:301–316

    MATH  Google Scholar 

  11. Courteille F, Crouzil A, Durou J-D, Gurdjos P (2004) Shape from shading en conditions ralistes d’acquisition photographique. In: 14ème Congr\(\grave{\text{s}}\) Francophone de Reconnaissance des Formes et Intelligence Artificielle - RFIA 2004, Toulouse, 28 January 2004–30 January 2004, vol 2, AFRIF-AFIA, pp 925–934

    Google Scholar 

  12. Courteille F, Crouzil A, Durou J-D, Gurdjos P (2004) Towards shape from shading under realistic photographic conditions. In: Proceedings of 17th international conference on pattern recognition, vol II, August 2004. Cambridge, UK, pp 277–280

    Google Scholar 

  13. Durou J-D, Falcone M, Sagona M (2008) Numerical methods for shape-from-shading: a new survey with benchmarks. Comput Vis Image Underst 109(1):22–43

    Google Scholar 

  14. Forsyth D (2011) Variable-source shading analysis. Int J Comput Vis 91(3):280–302

    MathSciNet  MATH  Google Scholar 

  15. Galliani S, Ju YC, Breuß M, Bruhn A (2013) Generalised perspective shape from shading in spherical coordinates. In: Kuiijper A, Pock T, Bredies K, Bischof H (eds) Proceedings of 4th international conference on scale space and variational methods in computer vision (SSVM 2013), Graz, Austria, June 2013. Lecture notes in computer science, vol 7893. Springer, Berlin, pp 222–233

    Google Scholar 

  16. Gårding J (1992) Shape from texture for smooth curved surfaces in perspective projection. J Math Imaging Vis 2:327–350

    MATH  Google Scholar 

  17. Gårding J (1993) Shape from texture and contour by weak isotropy. Artif Intell 64:243–297

    MathSciNet  MATH  Google Scholar 

  18. Georgoulis S, Rematas K, Ritschel T, Gavves E, Fritz M, Van Gool L, Tuytelaars T (2018) Reflectance and natural illumination from single-material specular objects using deep learning. IEEE Trans Pattern Anal Mach Intell

    Google Scholar 

  19. Gibson JJ (1950) The perception of the visual world. Houghton Mifflin, Boston

    Google Scholar 

  20. Hartley R, Zisserman A (2000) Multiple view geometry in computer vision. Cambridge University Press, Cambridge

    MATH  Google Scholar 

  21. Hasegawa JK, Tozzi CL (1996) Shape from shading with perspective projection and camera calibration. Comput Graph 20(3):351–364

    Google Scholar 

  22. Helmsen JJ, Puckett EG, Colella P, Dorr M (1996) Two new methods for simulating photolithography development in 3d. In: Optical microlithography IX, Santa Clara, CA, USA, March 1996. SPIE, pp 253–261

    Google Scholar 

  23. Horn BKP, Brooks MJ (1989) Shape from shading. Artificial intelligence series. MIT Press, Cambridge

    Google Scholar 

  24. Horn BKP (1970) Shape from shading: a method for obtaining the shape of a smooth opaque object from one view. PhD thesis, Department of Electrical Engineering, MIT, Cambridge, Massachusetts, USA

    Google Scholar 

  25. Horn BKP (1975) Obtaining shape from shading information. In: Winston PH (ed) The psychology of computer vision. McGraw-Hill, New York, pp 115–155

    Google Scholar 

  26. Horn BKP (1986) Robot vision. MIT Press, Cambridge

    Google Scholar 

  27. Ju YC, Tozza S, Breuß M, Bruhn A, Kleefeld A (2013) Generalised perspective shape from shading with Oren-Nayar reflectance. In: Burghardt T, Damen D, Mayol-Cuevas W, Mirmehdi M (eds) Proceedings of 24th British machine vision conference (BMVC 2013), Bristol, UK, September 2013, Article 42. BMVA Press

    Google Scholar 

  28. Kimmel R, Bruckstein AM (1995) Tracking level sets by level sets: a method for solving the shape from shading problem. Comput Vis Image Underst 62(1):47–58

    Google Scholar 

  29. Lambert JH (1760) Photometria: sive de mensura et gradibus luminis, colorum et umbrae. Augsburg, sumptibus viduae E. Klett

    Google Scholar 

  30. Lee KM, Kuo CCJ (1994) Shape from shading with perspective projection. Comput Vis Graph Image Process: Image Underst 59(2):202–211

    Google Scholar 

  31. Lee K, Kuo CCJ (1997) Shape from shading with a generalized reflectance map model. Comput Vis Image Underst 67(2):143–160

    Google Scholar 

  32. Li Z, Xu Z, Ramamoorthi R, Sunkavalli K, Chandraker M (2018) Learning to reconstruct shape and spatially-varying reflectance from a single image. ACM Trans Graph 37(6):269:1–269:11

    Google Scholar 

  33. Maurer D, Ju YC, Breuß M, Bruhn A (2018) Combining shape from shading and stereo: a joint variational method for estimating depth, illumination and albedo. Int J Comput Vis 126(12):1342–1366

    Google Scholar 

  34. Okatani T, Deguchi K (1997) Shape reconstruction from an endoscope image by shape from shading technique for a point light source at the projection center. Comput Vis Image Underst 66(2):119–131

    Google Scholar 

  35. Oliensis J, Dupuis P (1991) Direct method for reconstructing shape from shading. In: Proceedings of SPIE conference 1570 on geometric methods in computer vision, San Diego, California, July 1991, pp 116–128

    Google Scholar 

  36. Oren M, Nayar SK (1995) Generalization of the Lambertian model and implications for machine vision. Int J Comput Vis 14(3):227–251

    Google Scholar 

  37. Penna MA (1989) Local and semi-local shape from shading for a single perspective image of a smooth object. Comput Vis Graph Image Process 46(3):346–366

    Google Scholar 

  38. Penna MA (1989) A shape from shading analysis for a single perspective image of a polyhedron. IEEE Trans Pattern Anal Mach Intell 11(6):545–554

    Google Scholar 

  39. Prados E, Camilli F, Faugeras O (2006) A unifying and rigorous shape from shading method adapted to realistic data and applications. J Math Imaging Vis 25(3):307–328

    MathSciNet  Google Scholar 

  40. Prados E, Camilli F, Faugeras O (2006) A viscosity solution method for shape-from-shading without image boundary data. ESAIM: Math Model Numer Anal 40(2):393–412

    Google Scholar 

  41. Prados E, Faugeras O (2003) “Perspective shape from shading” and viscosity solutions. In: Proceedings of 9th IEEE international conference on computer vision, vol II, Nice, France, October 2003, pp 826–831

    Google Scholar 

  42. Prados E, Faugeras O (2004) Unifying approaches and removing unrealistic assumptions in shape from shading: mathematics can help. In: Proceedings of 8th European conference on computer vision, vol IV, Prague, Czech Republic, May 2004. LNCS, vol 3024, pp 141–154

    Google Scholar 

  43. Prados E, Faugeras O (2005) Shape from shading: a well-posed problem? In: Proceedings of IEEE conference on computer vision and pattern recognition, vol II, San Diego, California, USA, June 2005, pp 870–877

    Google Scholar 

  44. Ragheb H, Hancock E (2005) Surface radiance correction for shape-from-shading. Pattern Recognit 38(10):1574–1595

    Google Scholar 

  45. Rhodin H, Breuß M (2013) A mathematically justified algorithm for shape from texture. In: Kuiijper A, Pock T, Bredies K, Bischof H (eds) Proceedings of 4th international conference on scale space and variational methods in computer vision (SSVM 2013), Graz, Austria, June 2013. Lecture notes in computer science, vol 7893, pp 294–305. Springer, Berlin

    Google Scholar 

  46. Rindfleisch T (1966) Photometric method for lunar topography. Photogramm Eng 32(2):262–277

    Google Scholar 

  47. Samaras D, Metaxas D (2003) Incorporating illumination constraints in deformable models for shape from shading and light direction estimation. IEEE Trans Pattern Anal Mach Intell 25(2):247–264

    Google Scholar 

  48. Sethian JA (1996) Fast marching level set methods for three-dimensional photolithography development. In: Optical microlithography IX, Santa Clara, CA, USA, March 1996. SPIE, pp 262–272

    Google Scholar 

  49. Sethian JA (1999) Level set methods and fast marching methods, 2nd edn. Cambridge University Press, Cambridge. Paperback edition

    Google Scholar 

  50. Sethian JA (1996) A fast marching level set method for monotonically advancing fronts. Proc Natl Acad Sci 93(4):1591–1595

    MathSciNet  MATH  Google Scholar 

  51. Smith WAP, Hancock ER (2008) Facial shape-from-shading and recognition using principal geodesic analysis and robust statistics. Int J Comput Vis 76(1):71–91

    Google Scholar 

  52. Tankus A, Sochen N, Yeshurun Y (2005) Shape-from-shading under perspective projection. Int J Comput Vis 63(1):21–43

    Google Scholar 

  53. Tankus A, Sochen N, Yeshurun Y (2003) A new perspective [on] shape-from-shading. In: Proceedings of 9th IEEE international conference on computer vision, vol II, Nice, France, October 2003, pp 862–869

    Google Scholar 

  54. Tankus A, Sochen N, Yeshurun Y (2004) Perspective shape-from-shading by fast marching. In: Proceedings of IEEE conference on computer vision and pattern recognition, vol I, Washington, D.C., USA, June 2004, pp 43–49

    Google Scholar 

  55. Tozza S, Falcone M (2016) Analysis and approximation of some shape-from-shading models for non-Lambertian surfaces. J Math Imaging Vis 55(2):153–178

    MathSciNet  MATH  Google Scholar 

  56. Tsitsiklis JN (1995) Efficient algorithms for globally optimal trajectories. IEEE Trans Autom Control 40(9):1528–1538

    Google Scholar 

  57. Van Diggelen J (1951) A photometric investigation of the slopes and heights of the ranges of hills in the Maria of the moon. Bull Astron Inst Neth XI(423):283–289

    Google Scholar 

  58. Vogel O, Breuß M, Weickert J (2008) Perspective shape from shading with non-Lambertian reflectance. In: Rigoll G (ed) Pattern recognition. Lecture notes in computer science, vol 5096. Springer, Berlin, pp 517–526

    Google Scholar 

  59. Wöhler C, Grumpe A (2013) Integrated DEM reconstruction and calibration of hyperspectral imagery: a remote sensing perspective. In: Breuß M, Bruckstein A, Maragos P (eds) Innovations for shape analysis: models and algorithms. Mathematics and visualization. Springer, Berlin, pp 467–492

    Google Scholar 

  60. Woodham RJ (1980) Photometric method for determining surface orientation from multiple images. Opt Eng 19(1):139–144

    Google Scholar 

  61. Wu C, Narasimhan S, Jaramaz B (2010) A multi-image shape-from-shading framework for near-lighting perspective endoscopes. Int J Comput Vis 86(2):211–228

    MathSciNet  Google Scholar 

  62. Wu J, Smith WAP, Hancock ER (2010) Facial gender classification using shape from shading. Image Vis Comput 28(6):1039–1048

    Google Scholar 

  63. Yamany SM, Farag AA, Tasman D, Farman AGP (1999) A robust 3-D reconstruction system for human jaw modeling. In: Taylor C, Colchester A (eds) Proceedings of 2nd international conference on medical image computing and computer-assisted intervention (MICCAI’99), Cambridge, England, September 1999. LNCS, vol 1679, pp 778–787

    Google Scholar 

  64. Yamany SM, Farag AA, Tasman D, Farman AGP (2000) A 3-D reconstruction system for the human jaw using a sequence of optical images. IEEE Trans Med Imaging 11(5):538–547

    Google Scholar 

  65. Yuen SY, Tsui YY, Leung YW, Chen RMM (2002) Fast marching method for shape from shading under perspective projection. In: Proceedings of 2nd international conference visualization, imaging, and image processing (VIIP 2002), Marbella, Spain, September 2002, pp 584–589

    Google Scholar 

  66. Yuen SY, Tsui YY, Chow CK (2007) A fast marching formulation of perspective shape from shading under frontal illumination. Pattern Recognit Lett 28:806–824

    Google Scholar 

  67. Zhang R, Tsai P-S, Cryer JE, Shah M (1999) Shape from shading: a survey. IEEE Trans Pattern Anal Mach Intell 21(8):690–706

    MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Ashkan Mansouri Yarahmadi .

Editor information

Editors and Affiliations

Appendices

Appendices

Appendix 1

The irradiance equation

$$\begin{aligned} I_{0} =\frac{ \left| z_{0}A_3+B_3\right| }{ \sqrt{ \left( z_{0}A_1+B_1\right) ^2+ \left( z_{0}A_2+B_2\right) ^2+ \left( z_{0}A_3+B_3\right) ^2 } } \end{aligned}$$

is reformulated as

$$\begin{aligned} I^2_{0}\left( \left( z_{0}A_1+B_1\right) ^2+ \left( z_{0}A_2+B_2\right) ^2+ \left( z_{0}A_3+B_3\right) ^2 \right) = \left( z_{0}A_3+B_3\right) ^2 \end{aligned}$$

and further simplified as

$$\begin{aligned} I^2_{0}(&\cdots \nonumber \\&\left( z_{0}^2A_1^2+B_1^2+2z_{0}A_1B_1\right) +\nonumber \\&\left( z_{0}^2A_2^2+B_2^2+2z_{0}A_2B_2\right) +\nonumber \\&\left( z_{0}^2A_3^2+B_3^2+2z_{0}A_3B_3\right) \nonumber \\&\cdots )= z_{0}^2A_3^2+B_3^2+2z_{0}A_3B_3. \end{aligned}$$
(2.45)

By distributing the \(I^2_{0}\), on rewrites (2.45) as

$$\begin{aligned}&z_{0}^2A_1^2I^2_{0}+B_1^2I^2_{0}+2z_{0}A_1B_1I^2_{0}+\nonumber \\&z_{0}^2A_2^2I^2_{0}+B_2^2I^2_{0}+2z_{0}A_2B_2I^2_{0}+\nonumber \\&z_{0}^2A_3^2I^2_{0}+B_3^2I^2_{0}+2z_{0}A_3B_3I^2_{0}-\nonumber \\&z_{0}^2A_3^2+B_3^2+2z_{0}A_3B_3=0. \end{aligned}$$
(2.46)

Rearranging (2.46) while factoring out \(z^2_{0}\) and \(z_0\) results it to be written as

$$\begin{aligned}&\overbrace{ \left( I^2_{0} \left( A_1^2+ A_2^2+ A_3^2 \right) -A_3^2 \right) }^{C_1} z_{0}^2+\nonumber \\&\overbrace{\left( 2I^2_{0}\left( A_1B_1+A_2B_2+A_3B_3\right) -2A_3B_3\right) }^{C_2}z_{0}+\nonumber \\&\overbrace{\left( I^2_{0}\left( B_1^2+B_"^2+B_3^2\right) -B_3^2\right) }^{C_3}=0, \end{aligned}$$
(2.47)

and finally the image irradiance equation is reformulated in the form of the quadratic equation

$$\begin{aligned} C_1z_{0}^2+C_2z_{0}+C_3=0. \end{aligned}$$
(2.48)

Appendix 2

In this case, the term \(\left( P_a-P_0\right) ^\top \) is redefined as

$$\begin{aligned} P_a-P_0= \begin{pmatrix} v_bz_b-v_0z_0\\ -\left( u_bz_b-u_0z_0\right) \\ 0 \end{pmatrix} \end{aligned}$$
(2.49)

restricting the wave-front to only propagate from the direction of \(P_b\), namely \(\left( P_a-P_0\right) \cdot \left( P_b-P_0\right) =0\), leading the derivation of the normal N to proceed as

$$\begin{aligned} \mathbf {N}=\left( P_a-P_0\right) ^\top \times \left( P_b-P_0\right) ^\top =&\begin{pmatrix} v_bz_b-v_0z_0\\ -\left( u_bz_b-u_0z_0\right) \\ 0 \end{pmatrix} \times \begin{pmatrix}\frac{u_bz_b-u_0z_0}{f}\\ \frac{v_bz_b-v_0z_0}{f}\\ z_b-z_0 \end{pmatrix}. \end{aligned}$$
(2.50)

Now by letting

$$\begin{aligned} x_b:=\left( u_bz_b-u_0z_0\right) \text {and} y_b:=v_bz_b-v_0z_0 \end{aligned}$$

one writes (2.50) as

(2.51)

as the normal vector to the surface point \(P_0\) in case of the degenerated case \(\eta _1=+\infty \).

Appendix 3

Because \(\left( u_b,v_b\right) \) is a neighbor of \(\left( u_0,v_0\right) \), one can write \(x_b\) and \(y_b\) as

$$\begin{aligned} x_b = u_0\left( z_b-z_0\right) + \varDelta _1 z_b \end{aligned}$$
(2.52)

and

$$\begin{aligned} y_b = v_0\left( z_b-z_0\right) + \varDelta _2 z_b \end{aligned}$$
(2.53)

with \(\left( \varDelta _1,\varDelta _2\right) \in \left\{ \left( 0,\pm 1\right) ,\left( \pm 1,0\right) \right\} \), and substitute them into the numerator of the irradiance image

$$\begin{aligned} I_{0} =\frac{ x_b^2+y_b^2 }{ \sqrt{ f^2x_b^2\left( z_b-z_0\right) ^2+ f^2y_b^2\left( z_b-z_0\right) ^2+ \left( x_b^2+y_b^2\right) ^2 } } \end{aligned}$$

to get

$$\begin{aligned} I_{0}=\frac{ \overbrace{ \left( u_0\left( z_b-z_0\right) + \varDelta _1 z_b\right) ^2 }^{x_b^2}+ \overbrace{ \left( v_0\left( z_b-z_0\right) + \varDelta _2 z_b\right) ^2 }^{y_b^2} }{ \sqrt{ f^2x_b^2\left( z_b-z_0\right) ^2+ f^2y_b^2\left( z_b-z_0\right) ^2+ \left( x_b^2+y_b^2\right) ^2 } } \end{aligned}$$

that is expanded as

$$\begin{aligned} I_{0}= \frac{ \left. {\left\{ \begin{array}{ll} u_0^2\left( z_b-z_0\right) ^2 + \varDelta _1^2 z_b^2 + 2 u_0\left( z_b-z_0\right) \varDelta _1 z_b +\cdots \\ v_0^2\left( z_b-z_0\right) ^2 + \varDelta _2^2 z_b^2 + 2 v_0\left( z_b-z_0\right) \varDelta _2 z_b \end{array}\right. } \right\} }{ \sqrt{ f^2x_b^2\left( z_b-z_0\right) ^2+ f^2y_b^2\left( z_b-z_0\right) ^2+ \left( x_b^2+y_b^2\right) ^2 } }. \end{aligned}$$
(2.54)

In addition, by factoring \(f^2\left( z_b-z_0\right) \) from the first two terms of the (2.54) denominator, we have

$$\begin{aligned} I_{0}= \frac{ \left. {\left\{ \begin{array}{ll} u_0^2\left( z_b-z_0\right) ^2 + \varDelta _1^2 z_b^2 + 2 u_0\left( z_b-z_0\right) \varDelta _1 z_b +\cdots \\ v_0^2\left( z_b-z_0\right) ^2 + \varDelta _2^2 z_b^2 + 2 v_0\left( z_b-z_0\right) \varDelta _2 z_b \end{array}\right. } \right\} }{ \sqrt{ f^2\left( z_b-z_0\right) ^2\left( x_b^2+y_b^2\right) + \left( x_b^2+y_b^2\right) ^2 } } \end{aligned}$$

that is more simplified in its denominator as

$$\begin{aligned} I_{0}= \frac{ \left. {\left\{ \begin{array}{ll} u_0^2\left( z_b-z_0\right) ^2 + \varDelta _1^2 z_b^2 + 2 u_0\left( z_b-z_0\right) \varDelta _1 z_b +\cdots \\ v_0^2\left( z_b-z_0\right) ^2 + \varDelta _2^2 z_b^2 + 2 v_0\left( z_b-z_0\right) \varDelta _2 z_by_b \end{array}\right. } \right\} }{ \sqrt{ \left( x_b^2+y_b^2\right) \left( f^2\left( z_b-z_0\right) ^2+\left( x_b^2+y_b^2\right) \right) } }. \end{aligned}$$
(2.55)

Taking both sides of (2.55) to the power of 2, we are lead to

$$\begin{aligned} I_{0}^2= \frac{ \left. {\left\{ \begin{array}{ll} u_0^2\left( z_b-z_0\right) ^2 + \varDelta _1^2 z_b^2 + 2 u_0\left( z_b-z_0\right) \varDelta _1 z_b +\cdots \\ v_0^2\left( z_b-z_0\right) ^2 + \varDelta _2^2 z_b^2 + 2 v_0\left( z_b-z_0\right) \varDelta _2 z_b \end{array}\right. } \right\} ^2\equiv \left( x_b^2+y_b^2\right) ^2 }{ \left( x_b^2+y_b^2\right) \left( f^2\left( z_b-z_0\right) ^2+\left( x_b^2+y_b^2\right) \right) } \end{aligned}$$

letting us to have the image irradiance equation as

$$\begin{aligned} I_{0}^2= \frac{ \left. {\left\{ \begin{array}{ll} u_0^2\left( z_b-z_0\right) ^2 + \varDelta _1^2 z_b^2 + 2 u_0\left( z_b-z_0\right) \varDelta _1 z_b +\cdots \\ v_0^2\left( z_b-z_0\right) ^2 + \varDelta _2^2 z_b^2 + 2 v_0\left( z_b-z_0\right) \varDelta _2 z_b \end{array}\right. } \right\} }{ f^2\left( z_b-z_0\right) ^2+\left( x_b^2+y_b^2\right) }. \end{aligned}$$

Now, all terms are taken to the same side

$$\begin{aligned} \left. {\left\{ \begin{array}{ll} u_0^2\left( z_b-z_0\right) ^2 + \varDelta _1^2 z_b^2 + 2 u_0\left( z_b-z_0\right) \varDelta _1 z_b +\cdots \\ v_0^2\left( z_b-z_0\right) ^2 + \varDelta _2^2 z_b^2 + 2 v_0\left( z_b-z_0\right) \varDelta _2 z_b -\cdots \\ I_{0}^2f^2\left( z_b-z_0\right) ^2-I_{0}^2\left( x_b^2+y_b^2\right) \end{array}\right. } \right\} =0 \end{aligned}$$

and further simplified based on the common factor \(\left( z_b-z_0\right) \) as

$$\begin{aligned} \left. {\left\{ \begin{array}{ll} \left( u_0^2+v_0^2-I_{0}^2f^2\right) \left( z_b-z_0\right) ^2 +\cdots \\ \left( 2 u_0\varDelta _1 z_b+2 v_0\varDelta _2 z_b\right) \left( z_b-z_0\right) +\cdots \\ \varDelta _1^2 z_b^2+ \varDelta _2^2 z_b^2 - I_{0}^2\left( x_b^2+y_b^2\right) \end{array}\right. } \right\} =0. \end{aligned}$$
(2.56)

To this end, once again the terms \(x_b\) and \(y_b\) in (2.56) need to be replaced by (2.52) and (2.53) as

$$\begin{aligned} \left. {\left\{ \begin{array}{ll} \left( u_0^2+v_0^2-I_{0}^2f^2\right) \left( z_b-z_0\right) ^2 +\cdots \\ \left( 2 u_0\varDelta _1 z_b+2 v_0\varDelta _2 z_b\right) \left( z_b-z_0\right) +\cdots \\ \varDelta _1^2 z_b^2+ \varDelta _2^2 z_b^2 -I_{0}^2 \left. {\left\{ \begin{array}{ll} \overbrace{u_0^2\left( z_b-z_0\right) ^2 + \varDelta _1^2 z_b^2 + 2 u_0\left( z_b-z_0\right) \varDelta _1 z_b}^{x_b^2} +\cdots \\ \underbrace{v_0^2\left( z_b-z_0\right) ^2 + \varDelta _2^2 z_b^2 + 2 v_0\left( z_b-z_0\right) \varDelta _2 z_b}_{y_b^2} \end{array}\right. } \right\} \end{array}\right. } \right\} =0 \end{aligned}$$

and once again rearranged based on \(\left( z_b-z_0\right) \) and \(\left( z_b-z_0\right) ^2\) as

$$\begin{aligned} \left. {\left\{ \begin{array}{ll} \left( \left( u_0^2+v_0^2-I_{0}^2f^2\right) -I_{0}^2\left( u_0^2+v_0^2\right) \right) \left( z_b-z_0\right) ^2 +\cdots \\ \left( 2 u_0\varDelta _1 z_b+2 v_0\varDelta _2 z_b -I_{0}^2 2 u_0\varDelta _1 z_b -I_{0}^2 2 v_0\varDelta _2 z_b \right) \left( z_b-z_0\right) +\cdots \\ \varDelta _1^2 z_b^2+ \varDelta _2^2 z_b^2 -I_{0}^2\varDelta _1^2 z_b^2 -I_{0}^2\varDelta _2^2 z_b^2 \end{array}\right. } \right\} =0 \end{aligned}$$

or

$$\begin{aligned} \left. {\left\{ \begin{array}{ll} \left( \left( u_0^2+v_0^2-I_{0}^2f^2\right) -I_{0}^2\left( u_0^2+v_0^2\right) \right) \left( z_b-z_0\right) ^2 +\cdots \\ \left( 2 u_0\varDelta _1 z_b\left( 1-I_{0}^2\right) +2 v_0\varDelta _2 z_b\left( 1-I_{0}^2\right) \right) \left( z_b-z_0\right) +\cdots \\ \varDelta _1^2 z_b^2\left( 1-I_{0}^2\right) + \varDelta _2^2 z_b^2\left( 1-I_{0}^2\right) \end{array}\right. } \right\} =0 \end{aligned}$$

that leads to

$$\begin{aligned} \left. {\left\{ \begin{array}{ll} \overbrace{ \left( \left( u_0^2+v_0^2-I_{0}^2f^2\right) -I_{0}^2\left( u_0^2+v_0^2\right) \right) }^{D_1}\left( z_b-z_0\right) ^2 +\cdots \\ \overbrace{ \left( \left( 2 u_0\varDelta _1 z_b+2 v_0\varDelta _2 z_b\right) \left( 1-I_{0}^2\right) \right) }^{D_2}\left( z_b-z_0\right) +\cdots \\ \overbrace{ \left( \varDelta _1^2 z_b^2+\varDelta _2^2 z_b^2\right) \left( 1-I_{0}^2\right) }^{D_3} \end{array}\right. } \right\} =0 \end{aligned}$$

and finally written as a quadratic equation

$$\begin{aligned} D_1 \left( z_b-z_0\right) ^2 + D_2 \left( z_b-z_0\right) + D_3 = 0 \end{aligned}$$
(2.57)

with below coefficients\(:\)

$$\begin{aligned} D_1 :=\left( u_0^2+v_0^2\right) -I_{0}^2\left( f^2+u_0^2+v_0^2\right) , \quad D_2 :=2z_b\left( u_0\varDelta _1 + v_0\varDelta _2 \right) \left( 1-I_{0}^2\right) , \end{aligned}$$
$$\begin{aligned} D_3 :=\left( \varDelta _1^2 z_b^2+\varDelta _2^2 z_b^2\right) \left( 1-I_{0}^2\right) . \end{aligned}$$

Appendix 4

Steps in the direction of normal vector derivation by Tankus et al. [54]\(:\)

$$\begin{aligned} \mathbf{n}&{\mathop {=}\limits ^{}} \left( \frac{d}{du}C_1\left( u\right) \right) \times \left( \frac{d}{dv}C_2\left( v\right) \right) \nonumber \\&{\mathop {=}\limits ^{}} \frac{1}{f} \begin{pmatrix} -z-uz_u\\ -v_0z_u\\ fz_u \end{pmatrix} \times \frac{1}{f} \begin{pmatrix} -u_0z_v\\ -z-vz_v\\ fz_v \end{pmatrix}\nonumber \\&{\mathop {=}\limits ^{}} \frac{1}{f^2} \begin{pmatrix} -z-uz_u\\ -v_0z_u\\ fz_u \end{pmatrix} \times \begin{pmatrix} -u_0z_v\\ -z-vz_v\\ fz_v \end{pmatrix}\nonumber \\&{\mathop {=}\limits ^{}} \frac{1}{f^2} \begin{pmatrix} -vz_u\cdot fz_v+fz_u\left( z+vz_v\right) \\ -fz_u\cdot uz_v+\left( z+uz_u\right) fz_v\\ \left( z+uz_u\right) \left( z+vz_v\right) -vz_u\cdot uz_v \end{pmatrix}\nonumber \\&{\mathop {=}\limits ^{}} \frac{1}{f^2} \begin{pmatrix} -fvz_uz_v+fzz_u+fvz_uz_v\\ -fuz_uz_v+fzz_v+fuz_uz_v\\ z^2+vzz_v+uzz_u+uvz_uz_v-uvz_uz_v \end{pmatrix}\nonumber \\&{\mathop {=}\limits ^{}} \frac{1}{f^2} \begin{pmatrix} fzz_u\\ fzz_v\\ z^2+vzz_v+uzz_u \end{pmatrix}\nonumber \\&{\mathop {=}\limits ^{}} \frac{1}{f^2} \begin{pmatrix} fzz_u\\ fzz_v\\ z^2+z\left( vz_v+uz_u\right) \end{pmatrix}\nonumber \\&{\mathop {=}\limits ^{}} \frac{z}{f^2} \begin{pmatrix} fz_u\\ fz_v\\ z+vz_v+uz_u \end{pmatrix}. \end{aligned}$$
(2.58)

Based on (2.58), the unit normal vector is found as

$$\begin{aligned} \hat{\mathbf{n }}&{\mathop {=}\limits ^{}} \frac{\mathbf{n }}{\Vert \mathbf{n }\Vert }\nonumber \\&{\mathop {=}\limits ^{}} \frac{\frac{z}{f^2}\left( fz_u,fz_v,z+vz_v+uz_u\right) }{\sqrt{f^2z_u^2\frac{z^2}{f^4}+f^2z_v^2\frac{z^2}{f^4}+\left( z+vz_v+uz_u\right) ^2}\frac{z^2}{f^4}}\nonumber \\&{\mathop {=}\limits ^{}} \frac{\frac{z}{f^2}\left( fz_u,fz_v,z+vz_v+uz_u\right) }{\frac{z}{f^2} \sqrt{f^2z_u^2+f^2z_v^2+\left( z+vz_v+uz_u\right) ^2}} \nonumber \\&{\mathop {=}\limits ^{}} \frac{\left( fz_u,fz_v,z+vz_v+uz_u\right) }{\sqrt{f^2\left( z_u^2+z_v^2\right) +\left( z+vz_v+uz_u\right) ^2}}. \end{aligned}$$
(2.59)

Appendix 5

Steps to derive the image irradiance equation (2.37) proposed by Tankus et al. [54] and based on (2.34), (2.35) and (2.36).

$$\begin{aligned} I&{\mathop {=}\limits ^{}} \frac{\left( u-fp_s\right) z_u+\left( v-fq_s\right) z_v+z}{\Vert L\Vert \sqrt{f^2\left( z_u^2+z_v^2\right) +\left( z+vz_v+uz_u\right) ^2}}\\&{\mathop {=}\limits ^{}} \frac{\left( u-fp_s\right) pz+\left( v-fq_s\right) qz+z}{\Vert L\Vert \sqrt{f^2 \left( \underbrace{ \left( pz\right) ^2 }_{z_u^2} +\underbrace{ \left( qz\right) ^2 }_{z_v^2} \right) +\left( z+vqz+upz\right) ^2 } }\\&{\mathop {=}\limits ^{}} \frac{\left( u-fp_s\right) pz+\left( v-fq_s\right) qz+z}{\Vert L\Vert \sqrt{f^2 \underbrace{ \left( p^2z^2+q^2z^2\right) }_{\beta } +\left( z+vqz+upz\right) ^2 } }\\&{\mathop {=}\limits ^{}} \frac{\left( u-fp_s\right) pz+\left( v-fq_s\right) qz+z}{\Vert L\Vert \sqrt{f^2z^2 \underbrace{ \left( p^2+q^2\right) }_{\beta } +\left( z+vqz+upz\right) ^2 } }\\&{\mathop {=}\limits ^{}} \frac{\left( u-fp_s\right) pz+\left( v-fq_s\right) qz+z}{\Vert L\Vert \sqrt{f^2z^2\beta +\left( z+vqz+upz\right) ^2 } }\\&{\mathop {=}\limits ^{}} \frac{\left( u-fp_s\right) pz+\left( v-fq_s\right) qz+z}{\Vert L\Vert \sqrt{f^2z^2\beta +\left( z^2+v^2q^2z^2+u^2p^2z^2+2vqz^2+2upz^2+2uvpqz^2\right) } }\\&{\mathop {=}\limits ^{}} \frac{\left( u-fp_s\right) pz+\left( v-fq_s\right) qz+z}{\Vert L\Vert \sqrt{f^2z^2\beta +z^2\left( 1+v^2q^2+u^2p^2+2vq+2up+2uvpq\right) } }\\&{\mathop {=}\limits ^{}} \frac{\left( u-fp_s\right) pz+\left( v-fq_s\right) qz+z}{\Vert L\Vert \sqrt{f^2z^2\beta +z^2\left( up+vq+1\right) ^2 } }\\&{\mathop {=}\limits ^{}} \frac{z\left( \left( u-fp_s\right) p+\left( v-fq_s\right) q+1\right) }{z\Vert L\Vert \sqrt{f^2\beta +\left( up+vq+1\right) ^2 } }\\&{\mathop {=}\limits ^{}} \frac{\left( u-fp_s\right) p+\left( v-fq_s\right) q+1}{\Vert L\Vert \sqrt{f^2\beta +\left( up+vq+1\right) ^2 } }\\&{\mathop {=}\limits ^{}} \frac{\left( u-fp_s\right) p+\left( v-fq_s\right) q+1}{\Vert L\Vert \sqrt{f^2\left( p^2+q^2\right) +\left( up+vq+1\right) ^2 } }\\&{\mathop {=}\limits ^{}} \frac{\left( u-fp_s\right) p+\left( v-fq_s\right) q+1}{\Vert L\Vert \sqrt{f^2\left( p^2+q^2\right) +\left( up+vq+1\right) ^2 } }. \end{aligned}$$

Appendix 6

Steps to further simplify the image irradiance equation (2.37) of Tankus et al. [54] to the form shown in (2.38) proceeds by letting both sides of (2.37) to the power of 2 as

$$\begin{aligned} I^2&{\mathop {=}\limits ^{}} \frac{\left( \left( u-fp_s\right) p+\left( v-fq_s\right) q+1 \right) ^2}{\left( \Vert L\Vert \sqrt{f^2\left( p^2+q^2\right) +\left( up+vq+1\right) ^2} \right) ^2} \end{aligned}$$

and rearranging it as

$$\begin{aligned} I^2\left( \Vert L\Vert \sqrt{f^2\left( p^2+q^2\right) +\left( up+vq+1\right) ^2} \right) ^2 = \left( \left( u-fp_s\right) p+\left( v-fq_s\right) q+1 \right) ^2. \end{aligned}$$

Taking all the terms to the left side

$$\begin{aligned} I^2\left( \Vert L\Vert \sqrt{f^2\left( p^2+q^2\right) +\left( up+vq+1\right) ^2} \right) ^2 -\left( \left( u-fp_s\right) p+\left( v-fq_s\right) q+1 \right) ^2=0, \end{aligned}$$

that simplifies to

$$\begin{aligned} \left( I^2 \Vert L\Vert ^2 \left( f^2\left( p^2+q^2\right) +\left( up+vq+1\right) ^2 \right) \right) -\left( \left( u-fp_s\right) p+\left( v-fq_s\right) q+1 \right) ^2=0, \end{aligned}$$

by canceling the square root and finally appears as

$$\begin{aligned} \left( \underbrace{ I^2\Vert L\Vert ^2f^2\left( p^2+q^2\right) }_{\alpha _1} + \underbrace{ I^2\Vert L\Vert ^2\left( up+vq+1\right) ^2 }_{\alpha _2} \right) - \underbrace{ \left( \left( u-fp_s\right) p + \left( v-fq_s\right) q + 1 \right) ^2 }_{\alpha _3} =0. \end{aligned}$$

Appendix 7

The expanded forms of \(\alpha _1\), \(\alpha _2\) and \(\alpha _3\) are provided as\(:\)

  • \(\alpha _1:\)

    $$\begin{aligned} \begin{aligned} \alpha _1&{\mathop {=}\limits ^{}} I^2\Vert L\Vert ^2f^2\left( p^2+q^2\right) \\&{\mathop {=}\limits ^{}} I^2\Vert L\Vert ^2f^2p^2 + I^2\Vert L\Vert ^2f^2q^2 \end{aligned} \end{aligned}$$
  • \(\alpha _2:\)

    $$\begin{aligned} \begin{aligned} \alpha _2 {\mathop {=}\limits ^{}}&I^2\Vert L\Vert ^2\left( up+vq+1\right) ^2 \\ {\mathop {=}\limits ^{}}&I^2\Vert L\Vert ^2\left( u^2p^2+v^2q^2+1+2pquv+2up+2vq\right) \\ {\mathop {=}\limits ^{}}&I^2\Vert L\Vert ^2u^2p^2+I^2\Vert L\Vert ^2v^2q^2+ I^2\Vert L\Vert ^2+ \cdots \\ {}&2I^2\Vert L\Vert ^2pquv+2I^2\Vert L\Vert ^2up+2I^2\Vert L\Vert ^2vq \\ \end{aligned} \end{aligned}$$
  • \(\alpha _3:\)

    $$\begin{aligned} \begin{aligned} \alpha _3 {\mathop {=}\limits ^{}}&-\left( \left( u-fp_s\right) p + \left( v-fq_s\right) q + 1 \right) ^2 \\ {\mathop {=}\limits ^{}}&-\left( u-fp_s\right) ^2p^2 - \left( v-fq_s\right) ^2q^2 - 1 - \cdots \\ {}&-2pq\left( u-fp_s\right) \left( v-fq_s\right) -2p\left( u-fp_s\right) -2q\left( v-fq_s\right) \end{aligned}. \end{aligned}$$

Appendix 8

To derive (2.39), let us start from (2.38) and proceed as

$$\begin{aligned}&\left. {\left\{ \begin{array}{ll} \underbrace{I^2\Vert L\Vert ^2f^2\left( p^2+q^2\right) }_{\alpha _1} +\cdots \\ \underbrace{I^2\Vert L\Vert ^2\left( up+vq+1\right) ^2 }_{\alpha _2} -\cdots \\ \underbrace{ \left( \left( u-fp_s\right) p + \left( v-fq_s\right) q + 1 \right) ^2 }_{\alpha _3} \end{array}\right. } \right\} =0. \end{aligned}$$

Now, those components have the terms of interest \(p^2\), \(q^2\), 2pq, 2p and 2q in common which are marked as

that leads to

$$\begin{aligned}&\left. {\left\{ \begin{array}{ll} p^2 \overbrace{ \left( I^2\Vert L\Vert ^2 \left( f^2+u^2\right) -\left( u-fp_s\right) ^2 \right) }^{:=A}+ \cdots \\ q^2 \overbrace{ \left( I^2\Vert L\Vert ^2\left( f^2+v^2\right) -\left( v-fq_s\right) ^2\right) }^{:=B}+\cdots \\ 2pq \overbrace{ \left( I^2\Vert L\Vert ^2uv - \left( u-fp_s\right) \left( v-fq_s\right) \right) }^{:=C}+\cdots \\ 2p \overbrace{ \left( I^2\Vert L\Vert ^2u-\left( u-fp_s\right) \right) }^{:=D}+\cdots \\ 2q \overbrace{ \left( I^2\Vert L\Vert ^2v-\left( v-fq_s\right) \right) }^{:=E}+\cdots \\ \overbrace{I^2\Vert L\Vert ^2-1}^{:=F} \end{array}\right. } \right\} =0, \end{aligned}$$

and finally to

$$\begin{aligned} p^2A+q^2B+2pqC+2pD+2qE+F=0. \end{aligned}$$
figure a
figure b
figure c
figure d

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Breuß, M., Mansouri Yarahmadi, A. (2020). Perspective Shape from Shading. In: Durou, JD., Falcone, M., Quéau, Y., Tozza, S. (eds) Advances in Photometric 3D-Reconstruction. Advances in Computer Vision and Pattern Recognition. Springer, Cham. https://doi.org/10.1007/978-3-030-51866-0_2

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-51866-0_2

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-51865-3

  • Online ISBN: 978-3-030-51866-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics