Computer Vision Lecture 17

Similar documents
Computer Vision Lecture 17

Recap: Features and filters. Recap: Grouping & fitting. Now: Multiple views 10/29/2008. Epipolar geometry & stereo vision. Why multiple views?

Stereo. 11/02/2012 CS129, Brown James Hays. Slides by Kristen Grauman

Stereo. Outline. Multiple views 3/29/2017. Thurs Mar 30 Kristen Grauman UT Austin. Multi-view geometry, matching, invariant features, stereo vision

Project 4 Results. Representation. Data. Learning. Zachary, Hung-I, Paul, Emanuel. SIFT and HoG are popular and successful.

Epipolar Geometry and Stereo Vision

Stereo: Disparity and Matching

Multiple View Geometry

Stereo vision. Many slides adapted from Steve Seitz

Image Rectification (Stereo) (New book: 7.2.1, old book: 11.1)

Think-Pair-Share. What visual or physiological cues help us to perceive 3D shape and depth?

Last time: Disparity. Lecture 11: Stereo II. Last time: Triangulation. Last time: Multi-view geometry. Last time: Epipolar geometry

CS 4495 Computer Vision A. Bobick. Motion and Optic Flow. Stereo Matching

Mosaics wrapup & Stereo

Epipolar Geometry and Stereo Vision

Lecture 9 & 10: Stereo Vision

Epipolar Geometry and Stereo Vision

Lecture 14: Computer Vision

Stereo II CSE 576. Ali Farhadi. Several slides from Larry Zitnick and Steve Seitz

Multiple View Geometry

Miniature faking. In close-up photo, the depth of field is limited.

Chaplin, Modern Times, 1936

CS 4495 Computer Vision A. Bobick. Motion and Optic Flow. Stereo Matching

CS4495/6495 Introduction to Computer Vision. 3B-L3 Stereo correspondence

CS5670: Computer Vision

Final project bits and pieces

Epipolar Geometry and Stereo Vision

Binocular stereo. Given a calibrated binocular stereo pair, fuse it to produce a depth image. Where does the depth information come from?

Today. Stereo (two view) reconstruction. Multiview geometry. Today. Multiview geometry. Computational Photography

Cameras and Stereo CSE 455. Linda Shapiro

Project 3 code & artifact due Tuesday Final project proposals due noon Wed (by ) Readings Szeliski, Chapter 10 (through 10.5)

6.819 / 6.869: Advances in Computer Vision Antonio Torralba and Bill Freeman. Lecture 11 Geometry, Camera Calibration, and Stereo.

There are many cues in monocular vision which suggests that vision in stereo starts very early from two similar 2D images. Lets see a few...

Camera Geometry II. COS 429 Princeton University

CS 2770: Intro to Computer Vision. Multiple Views. Prof. Adriana Kovashka University of Pittsburgh March 14, 2017

Stereo Vision A simple system. Dr. Gerhard Roth Winter 2012

Project 2 due today Project 3 out today. Readings Szeliski, Chapter 10 (through 10.5)

Computer Vision I. Announcement. Stereo Vision Outline. Stereo II. CSE252A Lecture 15

What have we leaned so far?

Multi-View Geometry (Ch7 New book. Ch 10/11 old book)

Dense 3D Reconstruction. Christiano Gava

Recap from Previous Lecture

Announcements. Stereo

Stereo. Many slides adapted from Steve Seitz

BIL Computer Vision Apr 16, 2014

Lecture 14: Basic Multi-View Geometry

Fundamental matrix. Let p be a point in left image, p in right image. Epipolar relation. Epipolar mapping described by a 3x3 matrix F

Dense 3D Reconstruction. Christiano Gava

Announcements. Stereo

Recovering structure from a single view Pinhole perspective projection

Stereo Vision. MAN-522 Computer Vision

Stereo and Epipolar geometry

Computer Vision Lecture 20

Passive 3D Photography

Computer Vision Lecture 20

Lecture'9'&'10:'' Stereo'Vision'

Two-view geometry Computer Vision Spring 2018, Lecture 10

Rectification and Disparity

Stereo CSE 576. Ali Farhadi. Several slides from Larry Zitnick and Steve Seitz

Reminder: Lecture 20: The Eight-Point Algorithm. Essential/Fundamental Matrix. E/F Matrix Summary. Computing F. Computing F from Point Matches

Lecture 6 Stereo Systems Multi-view geometry

Passive 3D Photography

Epipolar Geometry Prof. D. Stricker. With slides from A. Zisserman, S. Lazebnik, Seitz

Lecture 9: Epipolar Geometry

Correspondence and Stereopsis. Original notes by W. Correa. Figures from [Forsyth & Ponce] and [Trucco & Verri]

CEng Computational Vision

Step-by-Step Model Buidling

Fundamentals of Stereo Vision Michael Bleyer LVA Stereo Vision

3D Sensing and Reconstruction Readings: Ch 12: , Ch 13: ,

55:148 Digital Image Processing Chapter 11 3D Vision, Geometry

calibrated coordinates Linear transformation pixel coordinates

Structure from Motion. Introduction to Computer Vision CSE 152 Lecture 10

Machine vision. Summary # 11: Stereo vision and epipolar geometry. u l = λx. v l = λy

Lecture 6 Stereo Systems Multi- view geometry Professor Silvio Savarese Computational Vision and Geometry Lab Silvio Savarese Lecture 6-24-Jan-15

Colorado School of Mines. Computer Vision. Professor William Hoff Dept of Electrical Engineering &Computer Science.

Public Library, Stereoscopic Looking Room, Chicago, by Phillips, 1923

Image Based Reconstruction II

Unit 3 Multiple View Geometry

But First: Multi-View Projective Geometry

Camera Calibration. Schedule. Jesus J Caban. Note: You have until next Monday to let me know. ! Today:! Camera calibration

EE795: Computer Vision and Intelligent Systems

Multi-view stereo. Many slides adapted from S. Seitz

Stereo and structured light

Structure from motion

EE795: Computer Vision and Intelligent Systems

Depth from two cameras: stereopsis

Stereo Image Rectification for Simple Panoramic Image Generation

EECS 442 Computer vision. Stereo systems. Stereo vision Rectification Correspondence problem Active stereo vision systems

Computer Vision Lecture 20

Depth. Common Classification Tasks. Example: AlexNet. Another Example: Inception. Another Example: Inception. Depth

Local features: detection and description. Local invariant features

Computer Vision I. Announcements. Random Dot Stereograms. Stereo III. CSE252A Lecture 16

Lecture 10: Multi-view geometry

Computer Vision I. Announcement

Depth from two cameras: stereopsis

Stereo Vision Computer Vision (Kris Kitani) Carnegie Mellon University

CS201 Computer Vision Camera Geometry

Perception II: Pinhole camera and Stereo Vision

Multi-stable Perception. Necker Cube

Undergrad HTAs / TAs. Help me make the course better! HTA deadline today (! sorry) TA deadline March 21 st, opens March 15th

Transcription:

Announcements Computer Vision Lecture 17 Epipolar Geometry & Stereo Basics Seminar in the summer semester Current Topics in Computer Vision and Machine Learning Block seminar, presentations in 1 st week of semester break Registration period: 14.01.015 8.01.015 http://web-info8.informatik.rwth-aachen.de/apse 13.01.015 Quick poll: Who would be interested in that? Bastian Leibe RWTH Aachen http://www.vision.rwth-aachen.de leibe@vision.rwth-aachen.de 3 Course Outline Image Processing Basics Segmentation & Grouping Object Recognition Local Features & Matching Object Categorization 3D Reconstruction Epipolar Geometry and Stereo Basics Camera calibration & Uncalibrated Reconstruction Multi-view Stereo Optical Flow Topics of This Lecture Geometric vision Visual cues Stereo vision Epipolar geometry Depth with stereo Geometry for a simple stereo system Case example with parallel optical axes General case with calibrated cameras Stereopsis & 3D Reconstruction Correspondence search Additional correspondence constraints Possible sources of error Applications 4 5 Geometric vision Goal: Recovery of 3D structure What cues in the image allow us to do this? Visual Cues Shading Merle Norman Cosmetics, Los Angeles Slide credit: Svetlana Lazebnik Slide credit: Steve Seitz 7 1

Visual Cues Shading Visual Cues Shading Texture Texture Focus The Visual Cliff, by William Vandivert, 1960 From The Art of Photography, Canon Slide credit: Steve Seitz 8 Slide credit: Steve Seitz 9 Visual Cues Visual Cues Shading Shading Texture Texture Focus Focus Perspective Perspective Figures from L. Zhang Motion Slide credit: Steve Seitz 10 Slide credit: Steve Seitz, Kristen Grauman 11 http://www.brainconnection.com/teasers/?main=illusion/motion-shape Our Goal: Recovery of 3D Structure We will focus on perspective and motion We need multi-view geometry because recovery of structure from one image is inherently ambiguous To Illustrate This Point Structure and depth are inherently ambiguous from single views. X? X? X? x Slide credit: Svetlana Lazebnik 1 Slide credit: Svetlana Lazebnik, Kristen Grauman 13

Stereo Vision What Is Stereo Vision? Generic problem formulation: given several images of the same object or scene, compute a representation of its 3D shape http://www.well.com/~jimg/stereo/stereo_list.html Slide credit: Svetlana Lazebnik, Steve Seitz 15 What Is Stereo Vision? What Is Stereo Vision? Generic problem formulation: given several images of the same object or scene, compute a representation of its 3D shape Narrower formulation: given a calibrated binocular stereo pair, fuse it to produce a depth image Image 1 Image Dense depth map Slide credit: Svetlana Lazebnik, Steve Seitz 16 Slide credit: Svetlana Lazebnik, Steve Seitz 17 What Is Stereo Vision? What Is Stereo Vision? Narrower formulation: given a calibrated binocular stereo pair, fuse it to produce a depth image. Humans can do it Narrower formulation: given a calibrated binocular stereo pair, fuse it to produce a depth image. Humans can do it Stereograms: Invented by Sir Charles Wheatstone, 1838 Slide credit: Svetlana Lazebnik, Steve Seitz 18 Autostereograms: http://www.magiceye.com Slide credit: Svetlana Lazebnik, Steve Seitz 19 3

What Is Stereo Vision? Application of Stereo: Robotic Exploration Narrower formulation: given a calibrated binocular stereo pair, fuse it to produce a depth image. Humans can do it Nomad robot searches for meteorites in Antartica Real-time stereo on Mars Autostereograms: http://www.magiceye.com Slide credit: Svetlana Lazebnik, Steve Seitz 0 1 Slide credit: Steve Seitz Topics of This Lecture Depth with Stereo: Basic Idea Geometric vision Visual cues Stereo vision Epipolar geometry Depth with stereo Geometry for a simple stereo system Case example with parallel optical axes General case with calibrated cameras Stereopsis & 3D Reconstruction Correspondence search Additional correspondence constraints Possible sources of error Applications Basic Principle: Triangulation Gives reconstruction as intersection of two rays Requires Camera pose (calibration) Point correspondence Slide credit: Steve Seitz 3 Camera Calibration Geometry for a Simple Stereo System World frame Extrinsic parameters: Camera frame Reference frame First, assuming parallel optical axes, known camera parameters (i.e., calibrated cameras): Camera frame Intrinsic parameters: Image coordinates relative to camera Pixel coordinates Parameters Extrinsic: rotation matrix and translation vector Intrinsic: focal length, pixel sizes (mm), image center point, radial distortion parameters We ll assume for now that these parameters are given and fixed. 4 5 4

World point Geometry for a Simple Stereo System Assume parallel optical axes, known camera parameters (i.e., calibrated cameras). We can triangulate via: image point (left) Depth of p image point (right) Similar triangles (p l, P, p r ) and (O l, P, O r ): Focal length optical center (left) baseline optical center (right) 6 disparity 7 Depth From Disparity General Case With Calibrated Cameras Image I(x,y) Disparity map D(x,y) Image I (x,y ) The two cameras need not have parallel optical axes. vs. 8, Steve Seitz 9 Stereo Correspondence Constraints Stereo Correspondence Constraints Given p in the left image, where can the corresponding point p in the right image be? Given p in the left image, where can the corresponding point p in the right image be? 30 31 5

Stereo Correspondence Constraints Stereo Correspondence Constraints Geometry of two views allows us to constrain where the corresponding pixel for some image point in the first view must occur in the second view. epipolar line epipolar plane epipolar line Epipolar constraint: Why is this useful? Reduces correspondence problem to 1D search along conjugate epipolar lines. 3 Slide adapted from Steve Seitz 33 Epipolar Geometry Epipolar Geometry: Terms Baseline Line joining the camera centers Epipole Point of intersection of baseline with the image plane Epipolar plane Plane containing baseline and world point Epipolar line Intersection of epipolar plane with the image plane Epipolar Plane Epipoles Baseline Epipolar Lines Properties All epipolar lines intersect at the epipole. An epipolar plane intersects the left and right image planes in epipolar lines. Slide adapted from Marc Pollefeys 34 Slide credit: Marc Pollefeys 35 Epipolar Constraint Example Potential matches for p have to lie on the corresponding epipolar line l. Potential matches for p have to lie on the corresponding epipolar line l. http://www.ai.sri.com/~luong/research/meta3dviewer/epipolargeo.html Slide credit: Marc Pollefeys 36 37 6

Example: Converging Cameras Example: Motion Parallel With Image Plane As position of 3D point varies, epipolar lines rotate about the baseline 38 Figure from Hartley & Zisserman 39 Figure from Hartley & Zisserman Example: Forward Motion Let s Formalize This! e For a given stereo rig, how do we express the epipolar constraints algebraically? For this, we will need some linear algebra. e But don t worry! We ll go through it step by step Epipole has same coordinates in both images. Points move along lines radiating from e: Focus of expansion 40 Figure from Hartley & Zisserman 41 Stereo Geometry With Calibrated Cameras Rotation Matrix If the rig is calibrated, we know: How to rotate and translate camera reference frame 1 to get to camera reference frame. R x ( ) = 4 1 0 0 3 0 cos sin 5 0 sin cos 3 cos 0 sin R y ( ) = 4 0 1 0 5 sin 0 cos cos sin 3 0 R z ( ) = 4sin cos 05 0 0 1 Express 3D rotation as series of rotations around coordinate axes by angles,, Overall rotation is product of these elementary rotations: Rotation: 3 x 3 matrix; translation: 3 vector. 4, Steve Seitz 43 7

3D Rigid Transformation Stereo Geometry With Calibrated Cameras 4 X0 3 Y 0 5 = Z 0 4 r 3 11 r 1 r 13 r 1 r r 3 5 4 X 3 Y 5 + 4 T 3 x T y 5 r 31 r 3 r 33 Z T z Camera-centered coordinate systems are related by known rotation R and translation T: 44 45 Excursion: Cross Product From Geometry to Algebra Vector cross product takes two vectors and returns a third vector that s perpendicular to both inputs. So here, c is perpendicular to both a and b, which means the dot product is 0. 46 X' RX T T X T RX T T Normal to the plane T RX X T X X T RX 0 X T RX 47 Matrix Form of Cross Product From Geometry to Algebra ~a ~ b = 4 0 a 3 z a y a z 0 a x 5 4 b 3 x b y 5 = ~c a y a x 0 b z skew symmetric matrix [a ] = 4 0 a 3 z a y a z 0 a x 5 ~a ~ b = [a ] ~ b a y a x 0 48 X' RX T T X T RX T T Normal to the plane T RX X T X X T RX 0 X T RX 49 8

Essential Matrix Let X X T RX 0 Tx RX 0 E TxR X T EX 0 This holds for the rays p and p that are parallel to the camera-centered position vectors X and X, so we have: E is called the essential matrix, which relates corresponding image points [Longuet-Higgins 1981] p' T Ep 0 50 Essential Matrix and Epipolar Lines p Ep 0 T E p l Epipolar constraint: if we observe point p in one image, then its position p in second image must satisfy this equation. l ' Ep is the coordinate vector representing the epipolar line for point p is the coordinate vector representing the epipolar line for point p (i.e., the line is given by: l > x = 0) 51 Essential Matrix: Properties Essential Matrix Example: Parallel Cameras Relates image of corresponding points in both cameras, given rotation and translation. Assuming intrinsic parameters are known E TxR p Ep 0 R I T [ d,0,0] E [T x]r 0 0 0 0 0 d 0 d 0 5 For the parallel cameras, image of any point must lie on same horizontal line in each image plane. 53 Essential Matrix Example: Parallel Cameras More General Case R I T [ d,0,0] E [T x]r 0 0 0 0 0 d 0 d 0 Image I(x,y) Disparity map D(x,y) Image I (x,y ) p Ep 0 For the parallel cameras, image of any point must lie on same horizontal line in each image plane. 54 What about when cameras optical axes are not parallel? 55 9

Stereo Image Rectification Stereo Image Rectification: Example In practice, it is convenient if image scanlines are the epipolar lines. Algorithm Reproject image planes onto a common plane parallel to the line between optical centers Pixel motion is horizontal after this transformation Two homographies (3 3 transforms), one for each input image reprojection 56 Slide adapted from Li Zhang C. Loop & Z. Zhang, Computing Rectifying Homographies for Stereo Vision. CVPR 99 57 Source: Alyosha Efros Topics of This Lecture Stereo Reconstruction Geometric vision Visual cues Stereo vision Epipolar geometry Depth with stereo Geometry for a simple stereo system Case example with parallel optical axes General case with calibrated cameras Main Steps Calibrate cameras Rectify images Compute disparity Estimate depth Stereopsis & 3D Reconstruction Correspondence search Additional correspondence constraints Possible sources of error Applications 58 59 Correspondence Problem Correspondence Problem Multiple match hypotheses satisfy epipolar constraint, but which is correct? To find matches in the image pair, we will assume Most scene points visible from both views Image regions for the matches are similar in appearance 60 Figure from Gee & Cipolla 1999 61 10

Dense Correspondence Search Example: Window Search Data from University of Tsukuba For each pixel in the first image Find corresponding epipolar line in the right image Examine all pixels on the epipolar line and pick the best match (e.g. SSD, correlation) Triangulate the matches to get depth information This is easiest when epipolar lines are scanlines Rectify images first adapted from Svetlana Lazebnik, Li Zhang 6 63 Example: Window Search Effect of Window Size Data from University of Tsukuba W = 3 W = 0 Want window large enough to have sufficient intensity variation, yet small enough to contain only pixels with about the same disparity. 64 65 Figures from Li Zhang Alternative: Sparse Correspondence Search Idea: Restrict search to sparse set of detected features Rather than pixel values (or lists of pixel values) use feature descriptor and an associated feature distance Still narrow search further by epipolar geometry What would make good features? 66 Dense vs. Sparse Sparse Efficiency Can have more reliable feature matches, less sensitive to illumination than raw pixels But Have to know enough to pick good features Sparse information Dense Simple process More depth estimates, can be useful for surface reconstruction But Breaks down in textureless regions anyway Raw pixel distances can be brittle Not good with very different viewpoints 67 11

Difficulties in Similarity Constraint???? Untextured surfaces Possible Sources of Error? Low-contrast / textureless image regions Occlusions Camera calibration errors Violations of brightness constancy (e.g., specular reflections) Large motions Occlusions 68 69 Application: View Interpolation Application: View Interpolation Right Image Left Image Slide credit: Svetlana Lazebnik Slide credit: Svetlana Lazebnik Application: View Interpolation Application: View Interpolation Disparity Slide credit: Svetlana Lazebnik Slide credit: Svetlana Lazebnik 1

Application: Free-Viewpoint Video Summary: Stereo Reconstruction Main Steps Calibrate cameras Rectify images Compute disparity Estimate depth So far, we have only considered calibrated cameras http://www.liberovision.com 74 Next lecture Uncalibrated cameras Camera parameters Revisiting epipolar geometry Robust fitting 75 References and Further Reading Background information on epipolar geometry and stereopsis can be found in Chapters 10.1-10. and 11.1-11.3 of D. Forsyth, J. Ponce, Computer Vision A Modern Approach. Prentice Hall, 003 More detailed information (if you really want to implement 3D reconstruction algorithms) can be found in Chapters 9 and 10 of R. Hartley, A. Zisserman Multiple View Geometry in Computer Vision nd Ed., Cambridge Univ. Press, 004 76 13