370 likes | 448 Views
Understanding the effect of lighting in images. Ronen Basri. Light field. Rays travel from sources to objects T here they are either absorbed or reflected Energy decreases with distance and number of bounces Camera captures the set of rays that travel through the focal center.
E N D
Understanding the effect of lighting in images Ronen Basri
Light field • Rays travel from sources to objects • There they are either absorbed or reflected • Energy decreases with distance and number of bounces • Camera captures the set of rays that travel through the focal center
Specular reflectance (mirror) • When a surface is smooth light reflects in the opposite direction of the surface normal
Specular reflectance • When a surface is slightly rough the reflected light will fall off around the specular direction
Diffuse reflectance • When the surface is very rough light may be reflected equally in all directions
Diffuse reflectance • When the surface is very rough light may be reflected equally in all directions
BRDF • Bidirectional Reflectance Distribution Function • Specifies for a unit of incominglight in a direction how much light will be reflectedin a direction
Preliminaries • A surface is denoted • A point on is • The tangent plane is spanned by • The surface normal is given by
Photometric stereo • Given several images of the a lambertianobject under varying lighting • Assuming single directional source
Photometric stereo • We can solve for S if L is known (Woodham) • If L is unknown we can use SVD factorization (Hayakawa)
Factorization • Use SVD to find a rank 3 approximation • Define • Factorization is not unique, since invertible To reduce ambiguity we impose integrability –up to generalized bas relief transformation (Belhumeur et al.)
Integrability • Recall that • Given , we set • And solve for
Shape from shading (SFS) • What if we only have one image? • Assuming that lighting is knownand uniform albedo • Every intensity determinesa circle of possible normals • There is only one unknown ()if uniform albedo is assume
Shape from shading • We write • Therefore • We obtain • This is a first order, non-linear PDE (Horn)
Shape from shading • Suppose , then • This is called an Eikonal equation
Distance transform • The distance of each point to the boundary • Posed as an Eikonal equation
Solution • Right hand side in SFSdetermines “speed” • Eikonal equation can be solved by a continuous analog of “shortest path” algorithm, called “fast marching” • The case is handled by change of variables (Kimmel & Sethian)
Illumination cone • What is the set of images of an object under different lighting, with any number of sources? • Due to additivity, this set forms a convex cone in number of pixels (Belhumeur & Kriegman) = 0.5* +0.2* +0.3*
Illumination cone • Cone characterization is generic, holds also with specularities, shadows and inter-reflections • Unfortunately, representing the cone is complicated (infinite degrees of freedom) • Cone is “thin” for Lambertian objects;indeed the illumination cone of many objects can be represented with few PCA vectors (Yuille et al.)
Lambertian reflectance is smooth (Basri & Jacobs; Ramamoorthi & Hanrahan) lighting reflectance
+ + + Reflectance obtained with convolution
+ + + Reflectance obtained with convolution
Positive values Negative values Spherical harmonics 1 Z X Y XY XZ YZ
Harmonic approximation • Lighting, in terms of harmonics • Reflectance • Approximation accuracy, 99%(Basri & Jacobs; Ramamoorthi & Hanrahan)
Positive values Negative values ρ Albedo n Surface normal “Harmonic faces” r
Image 1 Light 1 : : Image n Light n Photometric stereo (Basri, Jacobs &Kemelmacher) S L M SVD recovers LandS up to an ambiguity
Motion + lighting (Basri & Frolova) • Given 2 images • Take ratio to eliminate albedo • If motion is small we can represent using a Taylor expansion around
Small motion • We obtain a PDE that is quasi linear in • Wherewith • Can be solved with continuation (characteristics)
Conclusion • Understanding the effect of lighting on images is challenging, but can lead to better interpretation of images • We surveyed several problems: • Photometric stereo • Shape from shading • Modeling multiple sources with spherical harmonics • Motion and lighting • We only looked at Lambertian objects…