Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig...

45
Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the figures and slides are adapted from M. Pollefeys, J.S. Franco, J. Matusik’s presentations, and referenced papers)

Transcript of Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig...

Page 1: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Shape from Silhouettes II

Guido GerigCS 6320, S2015

(slides modified from Marc PollefeysUNC Chapel Hill, some of the figures and slides are adapted from M. Pollefeys, J.S. Franco, J. Matusik’s

presentations, and referenced papers)

Page 2: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Shape from silhouettes

Automatic 3D Model Construction for Turn-Table Sequences, A.W. Fitzgibbon, G. Cross, and A. Zisserman, SMILE 1998

Slides fromLazebnik,MatusikYerexand others

Page 3: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Outline

• Silhouettes– basic concepts– extract silhouettes– fundamentals about using silhouettes– reconstruct shapes from silhouettes– use uncertain silhouettes– calibrate from silhouettes

• Perspectives and interesting ideas

Page 4: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Algorithms

• Standard voxel based method

• Exact polyhedral methods

• Image-based visual hulls

Page 5: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

IBVH: Image based visual hulls• VH without constructing

auxiliary geometric/volumetric representation

• All steps of rendering are in computed in 2D “image space” coordinates (eliminates resampling/quantization artifacts)

• Reference images used as textures for shading the VH

• Image-based objects in real-time

Wojciech Matusik, Image Based Visual Hulls

Page 6: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Image based visual hulls

– This algorithm will only produce renderings of a visual hull from any view.

– Every pixel in the desired output image is back-projected to form a 3D ray.

– Each of those rays is intersected with each of the input silhouettes in the same way as the rays in the marching intersections method.

– Then a pixel in the output image is inside the new rendering of the visual hull if its ray has any segments left in it that are intersecting the visual hull. The depth of these pixels is known from the depth of the nearest entry point on the ray

Wojciech Matusik, Image Based Visual Hulls

Page 7: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Image based - example

Page 8: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Image-Based Computation

1. Project 3D viewing ray (blue) into reference image

2. Intersection of projected ray with 2D silhouettes → list of intervals along ray interior to cone’s cross section

3. Intervals lifted back to 3D, intersected with results of other reference images

Page 9: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Image-Based Computation

Reference 1

Reference 2

Desired

Page 10: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Image-Based Computation

Efficiency for desired view:

n: #pixels per scanlineO(n2): #pixels in imagek: #imagesl: average #times ray

intersects silhouetteO(ln): #silhouette edges

(search along epip lines)

O(lkn3): Efficiency

Naïve Algorithm

Page 11: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Image-Based ComputationRemember Epipolar Geometry:• Epipolar planes: Set of planes that share line OO’• Epipolar planes project to lines in each image:

epipolar lines• All epipolar lines intersect in common point: epipole

Page 12: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Image-Based ComputationTraverse scan line of

desired viewEach ray project to line

through epipole in reference image

Set of rays in desired image: pencil of epipolar lines in reference image

Monotonic change of slopeCompute silhouette

intersections for whole scan line incrementally (trick: presorted silhouette edges relative to epipole)

Complexity: O(lkn2)

Improved Algorithm:Take advantage of

incremental computations enabled by epipolar geometry relating reference and desired images

Efficiency: O(lkn2)

Page 13: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Observation

• Incremental computation along scanlines

Page 14: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Shading Algorithm

• A view-dependent strategy

Page 15: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Shading Algorithm

A view-dependent strategy

• Use reference images as textures

• Rank reference-image textures as “best” to “worst” based on angle between desired viewing ray and rays of each reference image

• Consider visibility (avoid textures of points that are blocked): Take advantage of epipolar geometry for incremental procedure

Page 16: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Visibility Algorithm

Page 17: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Visibility in 2D

Desired viewReference view

Page 18: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Visibility in 2D

Desired viewReference view

Front-most Points

Page 19: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Visibility in 2D

Desired viewReference view

Visible

Page 20: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Visibility in 2D

Desired viewReference view

Coverage Mask

Page 21: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Visibility in 2D

Desired viewReference view

Coverage Mask

Visible

Page 22: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Visibility in 2D

Desired viewReference view

Coverage Mask

Visible

Page 23: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Visibility in 2D

Desired viewReference view

Coverage Mask

VisibleNot

Page 24: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Visibility in 2D

Desired viewReference view

Coverage Mask

Page 25: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Visibility in 2D

Desired viewReference view

Coverage Mask

Visible

Page 26: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Visibility in 2D

Desired viewReference view

Coverage Mask

Page 27: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Visibility in 2D

Desired viewReference view

Coverage Mask

VisibleNot

Page 28: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

System

Server(4x 500 Mhz)

Camera Client

Camera Client

Camera Client

Camera Client

Page 29: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

System

Server(4x 500 Mhz)

Camera Client

Camera Client

Camera Client

Camera Client

Trigger Signal

Page 30: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

System

Server(4x 500 Mhz)

Camera Client

Camera Client

Camera Client

Camera Client

Page 31: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

System

Server(4x 500 Mhz)

Camera Client

Camera Client

Camera Client

Camera Client

Compressed video

Page 32: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

System

Server(4x 500 Mhz)

Camera Client

Camera Client

Camera Client

Camera Client

Intersection

Page 33: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

System

Server(4x 500 Mhz)

Camera Client

Camera Client

Camera Client

Camera Client

Visibility

Page 34: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

System

Server(4x 500 Mhz)

Camera Client

Camera Client

Camera Client

Camera Client

Shading

Page 35: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

IBVH Results

• Approximately constant computation per pixel per camera

• Parallelizes• Consistent with

input silhouettes

Page 36: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

IBVH Results

Page 37: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Image Based Visual Hullshttp://www.youtube.com/watch?v=Lw9aFaHobao

See also: http://www.youtube.com/watch?v=UdmBW4kDcok

Page 38: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Outline

• Silhouettes– basic concepts– extract silhouettes– fundamentals about using silhouettes– reconstruct shapes from silhouettes– use uncertain silhouettes– calibrate from silhouettes

• Perspectives and cool ideas

Page 39: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

What if my silhouettes are noisy?

Page 40: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

What if my silhouettes are noisy?

• Idea: we wish to find the content of the scene from images, as a probability grid

• Modeling the forward problem - explaining image observations given the grid state - is easy. It can be accounted for in a sensor model.

• Bayesian inference enables the formulation of our initial inverse problem from the sensor model

• Simplification for tractability: independent analysis and processing of voxels

??

Page 41: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Idea

• Unreliable silhouettes: do not make decision about their location

• Do sensor fusion: use all image information simultaneously

Page 42: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Modeling

• I: color information in images• B: background color model• F: silhouette detection variable (0 or 1): hidden• OX: occupancy at voxel X (0 or 1)

Sensor model:

F

XX FPBFIPOIP )O|(),|()|(

Inference:

XO pixelimgXpixelimg

pixelimgXpixelimg

X IP

IPIOP

,,

,,

)O|(

)O|()|(

Grid

Page 43: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Visualization

Page 44: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Outline

• Silhouettes– basic concepts– extract silhouettes– fundamentals about using silhouettes– reconstruct shapes from silhouettes– use uncertain silhouettes– calibrate from silhouettes

• Perspectives and cool ideas

Page 45: Shape from Silhouettes IIgerig/CS6320-S2015/Materials... · Shape from Silhouettes II Guido Gerig CS 6320, S2015 (slides modified from Marc Pollefeys UNC Chapel Hill, some of the

Next Lecture

• Visual Hulls using uncalibrated camera views (Forbes et al.)

• Wrap-up