# Reflection Models Can use two cameras or two light sources to understand shape. Two view stereo - Use feature motion to understand shape Photometric Stereo - Use pixel brightness to understand shape. ## Lambertian Reflectance ![[Screenshot 2020-09-13 at 11.46.04 AM.jpg]] ![[Screenshot 2020-09-13 at 11.46.40 AM.jpg]] Lambert's law: 1. Reflected energy is proportional to cosine of angle between L(light) and N(surface normal) (incoming) 2. Measured intensity is viewpoint-independent (outgoing) ![[Screenshot 2020-09-13 at 11.53.01 AM.jpg]] $ \begin{align} I_{\text {diffuse}}&=I_{\text {light}} k_{d} \cos (\theta) \\ I_{\text {diffuse}}&=I_{\text {light}} k_{d} N . L \end{align} $ Diffuse albedo $k_d$ - what fraction of incoming light is reflected? ## Shape from Shading What can we measure from one image? - $cos^{-1}(I)$ is the angle between N and L - Doesn't work well in real life Multiple images - Photometric stereo $I_{1}=k_{d} \mathbf{N} \cdot \mathbf{L}_{1}$ $I_{2}=k_{d} \mathbf{N} \cdot \mathbf{L}_{2}$ $I_{3}=k_{d} \mathbf{N} \cdot \mathbf{L}_{3}$ In matrix form, $\left[\begin{array}{lll}I_{1} & I_{2} & I_{3}\end{array}\right]=k_{d} \mathbf{N}^{T}\left[\begin{array}{lll}\mathbf{L}_{1} & \mathbf{L}_{2} & \mathbf{L}_{3}\end{array}\right]$ $\mathrm{G}=\mathrm{IL}^{-1}$ When i s L nonsingular (invertible)? - \>= 3 light directions are linearly independant or - all light direction vectors cannot lie in a plane For more than one pixel: $\left[\begin{array}{lll}I_{1} & \ldots & I_{n}\end{array}\right]=k_{d} \mathbf{N}^{T}\left[\begin{array}{lll}\mathbf{L}_{1} & \ldots & \mathbf{L}_{\mathbf{n}}\end{array}\right]$ Solve using least squares $\begin{aligned} \mathbf{I} &=\mathbf{G} \mathbf{L} \\ \mathbf{I L}^{\mathrm{T}} &=\mathbf{G L L}^{\mathrm{T}} \\ \mathbf{G} &=\left(\mathbf{I L}^{\mathrm{T}}\right)\left(\mathbf{L} \mathbf{L}^{\mathrm{T}}\right)^{-1} \end{aligned}$ Equivalently use SVD Given G, solve for N and $k_d$ Stack all pixels into one system $\mathrm{p} \times \#$ images $\quad \mathrm{p} \times 3 \quad 3 \times \#$ images ![[Screenshot 2020-09-13 at 12.09.37 PM.jpg]] ![[Screenshot 2020-09-13 at 12.12.54 PM.jpg]] ![[Screenshot 2020-09-13 at 12.13.35 PM.jpg]] ![[Screenshot 2020-09-13 at 12.18.57 PM.jpg]] --- ## References