31
Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Embed Size (px)

Citation preview

Page 1: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Verifying the “Consistency” of Shading Patterns and 3-D

Structures

Pawan Sinha & Edward Adelson

Page 2: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

What is the 3D Structure of Each Image?

Page 3: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Infinite Number of Possible Interpretations

Page 4: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Goal 1: 3D Shape Recovery

Page 5: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Goal 2: Check Shading Consistency

Page 6: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Input Patterns

Page 7: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Goal 1: Propose 3D Structure

● Questions:– What distinguishes correct structure?– How to search for it algorithmically?

Page 8: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

What Distinguishes Correct Structure?

Wrong Right

Page 9: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

What Distinguishes Correct Structure?

● Low “Complexity”– Low Angle Variance– Planarity of Faces– Overall Compactness

Page 10: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

How to Search?

● Minimize Cost Function– How to weight constraints?– Cumbersome

● Incremental Solution– Start with 2-D Line Drawing– “Pull” vertices until regularity is

maximized● i.e. Gradient descent in regularity space

Page 11: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Incremental Solution

Page 12: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Goal 2: Check Shading Consistency

● Given– 3D structure– 2D gray-level image

● Assume– Structure is uniformly colored

● Find– Single light source to account for shading

Page 13: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Quantitative Approach

● Given:– Lambertian Reflectance Model– Surface Normal– Surface Brightness

● Defines:– A cone of valid light directions for each

surface

Page 14: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Cone of valid light direction

N=surface normalE=brightnessarccos E

N

Page 15: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Quantitative Approach

● Consider cones for all surfaces● Intersection is direction of illumination

Page 16: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Problems

● Small changes in grey lead to no solution

Surface l3 changes brightness

Gradient SpaceInput Patterns

BeforeAfter

Intersection

Page 17: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Qualitative Approach

● Observation– Human vision

● Good at judging relation between brightness● Bad at judging absolute brightness

● So...– Use binary relations to:

● find light source● Not commit to particular reflectance function

Page 18: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Qualitative Approach

● Each surface now defines a hemisphere of possible light directions– Overall consistency implies finding a non-

null intersection of hemispheres

Page 19: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Qualitative Approach

● Hemisphere ~ set of vectors t s.t

Angle between s and t is less than 90sij t 0where sij satisfies

sij ni n j 2 0sij ni n j 0sij ni 0 sij n j 0 if surfacei brighter than surface j

sij ni 0 sij n j 0 if surface j brighter than surfacei

Page 20: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Qualitative Approach

● Hemisphere ~ set of vectors t s.t

sij is defined between a surface i and surface j, with normals ni and nj

sij t 0where sij satisfies

sij ni n j 2 0sij ni n j 0sij ni 0 sij n j 0 if surfacei brighter than surface j

sij ni 0 sij n j 0 if surface j brighter than surfacei

Page 21: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Qualitative Approach

● Hemisphere ~ set of vectors t s.t

s is perpindicular to the average of the normals

sij t 0where sij satisfies

sij ni n j 2 0sij ni n j 0sij ni 0 sij n j 0 if surfacei brighter than surface j

sij ni 0 sij n j 0 if surface j brighter than surfacei

Page 22: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Qualitative Approach

● Hemisphere ~ set of vectors t s.t

s is perpindicular to plane defined by the normals

sij t 0where sij satisfies

sij ni n j 2 0sij ni n j 0sij ni 0 sij n j 0 if surfacei brighter than surface j

sij ni 0 sij n j 0 if surface j brighter than surfacei

Page 23: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Qualitative Approach

● Hemisphere ~ set of vectors t s.t

The angle between s and ni is less than 90 & the angle between s and nj is greater

sij t 0where sij satisfies

sij ni n j 2 0sij ni n j 0sij ni 0 sij n j 0 if surfacei brighter than surface j

sij ni 0 sij n j 0 if surface j brighter than surfacei

Page 24: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Solution

● Solution to constraints lie on a convex polygon on the unit sphere.

Direction of agreement

Page 25: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Is it consistent?

● If no polygons found that satisfy all constraints, then– Shading is not consistent

No maximum

Page 26: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Largely Solveable

● For each polygon, count # of constraints matched– A maximum indicates most likely lighting

direction

Page 27: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Compound Edges

● What do unsatisfied constraints represent?– Compound edge – where surface changes

color, not just shading

Compound edges

Page 28: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Justification

● Why do shape derivation with line drawings and not brightness?– Humans can use edges

● Can humans use grey level?– It seems like it– An experiment

Page 29: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

An Experiment

● Random Height Tesselation– Can human determine 3d structure?

3D Representation

Overhead View

Page 30: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Limitations

● Polyhedral objects only● Later research addresses contoured

objects w/ smoothly changing brightness.

Page 31: Verifying the “Consistency” of Shading Patterns and 3-D Structures Pawan Sinha & Edward Adelson

Conclusions

● Humans mostly use edges to determine 3D structure

● Use shading to verify this determination

● Algorithm effective for polyhedra