Computer Vision

Shape from Shading

A photograph is flat, yet you see a surface in it. All the eye has is brightness, and brightness is decided by how each patch leans towards the light. Turn that around and the shape can be read back out, provided you guess the light right.

the line you are readingthe true surfacewhat the shading implies

Move the mouse over the picture to read a different line · the line always follows the light

—
—

grazingoverhead
light vector—
its sideways part—
brightness on this line—
agreement with the truth—

What to observe

  1. Every pixel is one number: how much its patch leans towards the light. Walk along the light and add up those leanings, and the true profile comes back.
  2. Tick assume the light is on the other side. The picture does not change, yet every bump reads as a dent and the agreement flips sign.
  3. Light the craters from below: they can look like bumps, because the eye assumes light from above.
  4. Raise the light height towards overhead and the picture flattens to one grey: with no sideways light there is nothing left to invert.

Shortcuts:f fullscreen