26 Stereo

  • Upload
    car-alv

  • View
    221

  • Download
    0

Embed Size (px)

Citation preview

  • 7/30/2019 26 Stereo

    1/39

    Multiple View Geometry

    15-463: Computational PhotographyAlexei Efros, CMU, Fall 2005

    Martin Quinn

    with a lot of slides stolen from

    Steve Seitz and Jianbo Shi

  • 7/30/2019 26 Stereo

    2/39

    Our Goal

  • 7/30/2019 26 Stereo

    3/39

    The Plenoptic Function

    P(,,,t,VX,VY,VZ)How can we compress this into somethingmanageable?

  • 7/30/2019 26 Stereo

    4/39

    Stereo Reconstruction

    The Stereo Problem Shape from two (or more) images

    Biological motivation

    knownknown

    cameracamera

    viewpointsviewpoints

  • 7/30/2019 26 Stereo

    5/39

    Why do we have two eyes?

    Cyclope vs. Odysseus

  • 7/30/2019 26 Stereo

    6/39

    1. Two is better than one

  • 7/30/2019 26 Stereo

    7/39

    2. Depth from Convergence

    Human performance: up to 6-8 feet

  • 7/30/2019 26 Stereo

    8/39

    3. Depth from binocular disparity

    Sign and magnitude of disparity

    P: converging point

    C: object nearerprojects to the

    outside of the P,

    disparity = +

    F: object farther

    projects to theinside of the P,

    disparity = -

  • 7/30/2019 26 Stereo

    9/39

  • 7/30/2019 26 Stereo

    10/39

    Stereo

    scene pointscene point

    optical centeroptical center

    image planeimage plane

  • 7/30/2019 26 Stereo

    11/39

    Stereo

    Basic Principle: Triangulation

    Gives reconstruction as intersection of two rays

    Requires

    calibration

    point correspondence

  • 7/30/2019 26 Stereo

    12/39

    Stereo correspondence

    Determine Pixel Correspondence Pairs of points that correspond to same scene point

    Epipolar Constraint Reduces correspondence problem to 1D search along conjugate

    epipolar lines

    epipolar planeepipolar lineepipolar lineepipolar lineepipolar line

  • 7/30/2019 26 Stereo

    13/39

    Stereo image rectification

  • 7/30/2019 26 Stereo

    14/39

    Stereo image rectification

    Image Reprojection reproject image planes onto common

    plane parallel to line between optical centers

    a homography (3x3 transform)applied to both input images

    pixel motion is horizontal after this transformation C. Loop and Z. Zhang. Computing Rectifying Homographies for

    Stereo Vision. IEEE Conf. Computer Vision and PatternRecognition, 1999.

    http://research.microsoft.com/~zhang/Papers/TR99-21.pdfhttp://research.microsoft.com/~zhang/Papers/TR99-21.pdfhttp://research.microsoft.com/~zhang/Papers/TR99-21.pdfhttp://research.microsoft.com/~zhang/Papers/TR99-21.pdfhttp://research.microsoft.com/~zhang/Papers/TR99-21.pdfhttp://research.microsoft.com/~zhang/Papers/TR99-21.pdfhttp://research.microsoft.com/~zhang/Papers/TR99-21.pdf
  • 7/30/2019 26 Stereo

    15/39

    Stereo Rectification

  • 7/30/2019 26 Stereo

    16/39

    Your basic stereo algorithm

    For each epipolar line

    For each pixel in the left image compare with every pixel on same epipolar line in right image

    pick pixel with minimum match cost

    Improvement: match windows This should look familar...

    Can use Lukas-Kanade or discrete search (latter more common)

  • 7/30/2019 26 Stereo

    17/39

    Window size

    Smaller window

    +

    Larger window

    +

    W = 3 W = 20

    Effect of window size

  • 7/30/2019 26 Stereo

    18/39

    Stereo results

    Ground truthScene

    Data from University of Tsukuba Similar results on other images without ground truth

  • 7/30/2019 26 Stereo

    19/39

    Results with window search

    Window-based matching

    (best window size)

    Ground truth

  • 7/30/2019 26 Stereo

    20/39

    Better methods exist...

    State of the art methodBoykov et al., Fast Approximate Energy Minimization via Graph Cuts,

    International Conference on Computer Vision, September 1999.

    Ground truth

    D h f di i

    http://www.cs.cornell.edu/rdz/Papers/BVZ-iccv99.pdfhttp://www.cs.cornell.edu/rdz/Papers/BVZ-iccv99.pdf
  • 7/30/2019 26 Stereo

    21/39

    Depth from disparity

    f

    x x

    baseline

    z

    C C

    X

    f

    input image (1 of 2)[Szeliski & Kang 95]

    depth map 3D rendering

    St t ti i li

  • 7/30/2019 26 Stereo

    22/39

    Camera calibration errors Poor image resolution

    Occlusions

    Violations of brightness constancy (specular reflections)

    Large motions

    Low-contrast image regions

    What will cause errors?

    Stereo reconstruction pipeline

    Steps Calibrate cameras

    Rectify images

    Compute disparity

    Estimate depth

    St t hi

  • 7/30/2019 26 Stereo

    23/39

    Stereo matching

    Need texture for matching

    J ulesz-style Random Dot Stereogram

    A ti t ith t t d li ht

  • 7/30/2019 26 Stereo

    24/39

    Active stereo with structured light

    Project structuredlight patterns onto the object

    simplifies the correspondence problem

    camera 2

    camera 1

    projector

    camera 1

    projector

    Li Zhangs one-shot stereo

    A ti t ith t t d li ht

  • 7/30/2019 26 Stereo

    25/39

    Active stereo with structured light

    Laser scanning

  • 7/30/2019 26 Stereo

    26/39

    Laser scanning

    Optical triangulation Project a single stripe of laser light

    Scan it across the surface of the object

    This is a very precise version of structured light scanning

    Direction of travel

    Object

    CCD

    CCD image plane

    Laser

    Cylindrical lens

    Laser sheet

    Digital Michelangelo Projecthttp://graphics.stanford.edu/projects/mich/

    http://graphics.stanford.edu/projects/mich/http://graphics.stanford.edu/projects/mich/
  • 7/30/2019 26 Stereo

    27/39

    Portable 3D laser scanner (this one by Minolta)

    Real time stereo

  • 7/30/2019 26 Stereo

    28/39

    Real-time stereo

    Used for robot navigation (and other tasks)

    Several software-based real-time stereo techniques havebeen developed (most based on simple discrete search)

    Nomad robot searches for meteorites in Antarticahttp://www.frc.ri.cmu.edu/projects/meteorobot/index.html

    Structure from Motion

    http://www.frc.ri.cmu.edu/projects/meteorobot/index.htmlhttp://www.frc.ri.cmu.edu/projects/meteorobot/index.htmlhttp://www.frc.ri.cmu.edu/projects/meteorobot/index.htmlhttp://www.frc.ri.cmu.edu/projects/meteorobot/index.html
  • 7/30/2019 26 Stereo

    29/39

    Structure from Motion

    Reconstruct

    Scene geometry

    Camera motion

    UnknownUnknowncameracamera

    viewpointsviewpoints

    Three approachesThree approaches

  • 7/30/2019 26 Stereo

    30/39

    Three approachesThree approaches

    Outline of a simple algorithm (1)Outline of a simple algorithm (1)

  • 7/30/2019 26 Stereo

    31/39

    Outline of a simple algorithm (1)Outline of a simple algorithm (1)

    Based on constraints

    Input to the algorithm (1): two images

    Outline of a simple algorithm (2)Outline of a simple algorithm (2)

  • 7/30/2019 26 Stereo

    32/39

    Outline of a simple algorithm (2)Outline of a simple algorithm (2)

    Input to the algorithm (2):

    User select edges and corners

    Outline of a simple algorithm (3)Outline of a simple algorithm (3)

  • 7/30/2019 26 Stereo

    33/39

    Outline of a simple algorithm (3)Outline of a simple algorithm (3)

    Camera Position and Orientation

    Determine the position and orientation of camera

    Outline of a simple algorithm (4)Outline of a simple algorithm (4)

  • 7/30/2019 26 Stereo

    34/39

    Outline of a simple algorithm (4)Outline of a simple algorithm (4)

    Computing projection matrix and Reconstruction

    Outline of a simple algorithm (5)Outline of a simple algorithm (5)

  • 7/30/2019 26 Stereo

    35/39

    Outline of a simple algorithm (5)Outline of a simple algorithm (5)

    Compute 3D textured triangles

    View-Dependant Texture Mapping

  • 7/30/2019 26 Stereo

    36/39

    View Dependant Texture Mapping

    FacadeFacade

  • 7/30/2019 26 Stereo

    37/39

    FacadeFacade

    SFMOMA (San Francisco Museum of Modern Art) by Yizhou Yu,

    Faade (Debevec et al) inputs

  • 7/30/2019 26 Stereo

    38/39

    Faade (Debevec et al) inputs

    Faade (Debevec etal)

  • 7/30/2019 26 Stereo

    39/39

    Faade (Debevec et al)