Mosaics wrapup & Stereo

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

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

Image warping and stitching

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

Stereo: Disparity and Matching

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

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

Computer Vision Lecture 17

Computer Vision Lecture 17

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

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

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...

Image warping and stitching

Image warping and stitching

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

Epipolar Geometry and Stereo Vision

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

Multiple View Geometry

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

Epipolar Geometry and Stereo Vision

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

Chaplin, Modern Times, 1936

Multiple View Geometry

Stereo vision. Many slides adapted from Steve Seitz

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

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

Final project bits and pieces

CEng Computational Vision

Epipolar Geometry and Stereo Vision

Dense 3D Reconstruction. Christiano Gava

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

What have we leaned so far?

EE795: Computer Vision and Intelligent Systems

Epipolar Geometry and Stereo Vision

Stereo Vision. MAN-522 Computer Vision

Stereo. Many slides adapted from Steve Seitz

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

Dense 3D Reconstruction. Christiano Gava

CS5670: Computer Vision

Lecture 14: Computer Vision

Announcements. Stereo

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

Lecture 14: Basic Multi-View Geometry

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

BIL Computer Vision Apr 16, 2014

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

Lecture 9 & 10: Stereo Vision

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

Final Exam Study Guide

N-Views (1) Homographies and Projection

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

Homographies and RANSAC

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

Local features and image matching May 8 th, 2018

Announcements. Stereo

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)

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

Mosaics. Today s Readings

Stereo Epipolar Geometry for General Cameras. Sanja Fidler CSC420: Intro to Image Understanding 1 / 33

Rectification and Disparity

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

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

Cameras and Stereo CSE 455. Linda Shapiro

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

Lecture 6 Stereo Systems Multi-view geometry

Stereo and Epipolar geometry

7. The Geometry of Multi Views. Computer Engineering, i Sejong University. Dongil Han

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

Image Based Reconstruction II

Recap from Previous Lecture

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

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

Basic distinctions. Definitions. Epstein (1965) familiar size experiment. Distance, depth, and 3D shape cues. Distance, depth, and 3D shape cues

EE795: Computer Vision and Intelligent Systems

Stereo Image Rectification for Simple Panoramic Image Generation

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

Stereo imaging ideal geometry

Image Transfer Methods. Satya Prakash Mallick Jan 28 th, 2003

Announcements. Mosaics. Image Mosaics. How to do it? Basic Procedure Take a sequence of images from the same position =

Camera Geometry II. COS 429 Princeton University

Fundamentals of Stereo Vision Michael Bleyer LVA Stereo Vision

CS6670: Computer Vision

Image Warping and Mosacing

Depth from two cameras: stereopsis

Multi-stable Perception. Necker Cube

Depth from two cameras: stereopsis

An Algorithm for Seamless Image Stitching and Its Application

calibrated coordinates Linear transformation pixel coordinates

Recovering structure from a single view Pinhole perspective projection

Perception II: Pinhole camera and Stereo Vision

Passive 3D Photography

Step-by-Step Model Buidling

Why is computer vision difficult?

Feature Transfer and Matching in Disparate Stereo Views through the use of Plane Homographies

Lecture 10: Multi-view geometry

Assignment 2: Stereo and 3D Reconstruction from Disparity

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

Lecture 10: Multi view geometry

Video Mosaics for Virtual Environments, R. Szeliski. Review by: Christopher Rasmussen

Transcription:

Mosaics wrapup & Stereo Tues Oct 20 Last time: How to stitch a panorama? Basic Procedure Take a sequence of images from the same position Rotate the camera about its optical center Compute transformation (homography) between second image and first using corresponding points. Transform the second image to overlap with the first. Blend the two together to create a mosaic. (If there are more images, repeat) Source: Stev e Seitz 1

Panoramas: main steps 1. Collect correspondences (manually for now) 2. Solve for homography matrix H Least squares solution 3. Warp content from one image frame to the other to combine: say im1 into im2 reference frame Determine bounds of the new combined image Where will the corners of im1 fall in im2 s coordinate frame? We will attempt to lookup colors for any of these positions we can get from im1. Compute coordinates in im1 s reference frame (via homography) for all points in that range Lookup all colors for all these positions from im1 Inverse warp : interp2 (watch for nans) 4. Overlay im2 content onto the warped im1 content. Careful about new bounds of the output image: minx, miny Panoramas: main steps 1. Collect correspondences (manually for now) 2. Solve for homography matrix H Least squares solution 3. Warp content from one image frame to the other to combine: say im1 into im2 reference frame Determine bounds of the new combined image: Where will the corners of im1 fall in im2 s coordinate frame? We will attempt to lookup colors for any of these positions we can get from im1. Compute coordinates in im1 s reference frame (via homography) for all points in that range: H -1 Lookup all colors for all these positions from im1 Inverse warp : interp2 (watch for nans : isnan) 4. Overlay im2 content onto the warped im1 content. Careful about new bounds of the output image: minx, miny 2

H im1 im2 (Assuming we have solved for the H that maps points from im1 to im2.) wx2 x1 wy2 H y1 w 1 im1 im2 3

Panoramas: main steps 1. Collect correspondences (manually for now) 2. Solve for homography matrix H Least squares solution 3. Warp content from one image frame to the other to combine: say im1 into im2 reference frame Determine bounds of the new combined image: Where will the corners of im1 fall in im2 s coordinate frame? We will attempt to lookup colors for any of these positions we can get from im1. Inverse warp: Compute coordinates in im1 s reference frame (via homography) for all points in that range. Lookup all colors for all these positions from im1 (interp2) 4. Overlay im2 content onto the warped im1 content. H -1 im1 im2 (Assuming we have solved for the H that maps points from im1 to im2.) 4

im1 im2 im1 warped into reference frame of im2. Use interp2 to ask for the colors (possibly interpolated) from im1 at all the positions needed in im2 s reference frame. Panoramas: main steps 1. Collect correspondences (manually for now) 2. Solve for homography matrix H Least squares solution 3. Warp content from one image frame to the other to combine: say im1 into im2 reference frame Determine bounds of the new combined image: Where will the corners of im1 fall in im2 s coordinate frame? We will attempt to lookup colors for any of these positions we can get from im1. Inverse warp: Compute coordinates in im1 s reference frame (via homography) for all points in that range. Lookup all colors for all these positions from im1 (interp2) 4. Overlay im2 content onto the warped im1 content. Careful about new bounds of the output image 5

Image warping with homographies image plane in front black area w here no pixel maps to image plane below Source: Steve Seitz 6

Image rectification p p Analysing patterns and shapes What is the shape of the b/w floor pattern? The floor (enlarged) Slide from Antonio Criminisi Automatically rectified floor 7

Automatic rectification 10/19/2015 Analysing patterns and shapes From Martin Kemp The Science of Art (manual reconstruction) Slide from Antonio Criminisi Analysing patterns and shapes What is the (complicated) shape of the floor pattern? St. Lucy Altarpiece, D. Veneziano Slide from Criminisi Automatically rectified floor 8

Analysing patterns and shapes Automatic rectification From Martin Kemp, The Science of Art (manual reconstruction) Slide from Criminisi Andrew Harp Andy Luong Sung Ju Hwang Ekapol Chuangsuwanich, CMU 9

10

Changing camera center Does it still work? synthetic PP PP1 PP2 Source: Aly osha Ef ros 11

Recall: same camera center real camera synthetic camera Can generate synthetic camera view as long as it has the same center of projection. Source: Alyosha Efros Or: Planar scene (or far away) PP3 PP1 PP2 PP3 is a projection plane of both centers of projection, so we are OK! This is how big aerial photographs are made Source: Alyosha Efros 12

Boundary extension Wide-Angle Memories of Close- Up Scenes, Helene Intraub and Michael Richardson, Journal of Experimental Psychology: Learning, Memory, and Cognition, 1989, Vol. 15, No. 2, 179-187 13

Creating and Exploring a Large Photorealistic Virtual Space Josef Sivic, Biliana Kaneva, Antonio Torralba, Shai Avidan and William T. Freeman, Internet Vision Workshop, CVPR 2008. http://www.youtube.com/watch?v=e0rbou10rpo Creating and Exploring a Large Photorealistic Virtual Space Current view, and desired view in green Synthesized view from new camera Induced camera motion 14

Summary: alignment & warping Write 2d transformations as matrix-vector multiplication (including translation when we use homogeneous coordinates) Perform image warping (forward, inverse) Fitting transformations: solve for unknown parameters given corresponding points from two views (affine, projective (homography)). Mosaics: uses homography and image warping to merge views taken from same center of projection. Multiple views Multi-view geometry, matching, invariant features, stereo vision Lowe Hartley and Zisserman 15

Why multiple views? Structure and depth are inherently ambiguous from single views. Images from Lana Lazebni Why multiple views? Structure and depth are inherently ambiguous from single views. P1 P2 P1 =P2 Optical center 16

What cues help us to perceive 3d shape and depth? Texture [From A.M. Loh. The recovery of 3-D structure using visual texture patterns. PhD thesis] 17

Shading [Figure from Prados & Faugeras 2006] Perspective effects Image credit: S. Seitz 18

Motion Figures from L. Zhang http://www.brainconnection.com/teasers/?main=illusion/motion-shape Focus/defocus Images from same point of view, different camera parameters 3d shape / depth estimates [f igs f rom H. Jin and P. Fav aro, 2002] 19

Estimating scene shape Shape from X : Shading, Texture, Focus, Motion Stereo: shape from motion between two views infer 3d shape of scene from two (multiple) images from different viewpoints Main idea: scene point image plane optical center Outline Human stereopsis Epipolar geometry and the epipolar constraint Case example with parallel optical axes General case with calibrated cameras Stereo solutions Correspondences Additional constraints 20

Human eye Rough analogy with human visual system: Pupil/Iris control amount of light passing through lens Retina - contains sensor cells, where image is formed Fovea highest concentration of cones Fig from Shapiro and Stockman Human stereopsis: disparity Human eyes fixate on point in space rotate so that corresponding images form in centers of fovea. 21

Human stereopsis: disparity Disparity occurs when eyes fixate on one object; others appear at different visual angles Human stereopsis: disparity d=0 Disparity: d = r-l = D-F. Forsyth & Ponce 22

Random dot stereograms Julesz 1960: Do we identify local brightness patterns before fusion (monocular process) or after (binocular)? To test: pair of synthetic images obtained by randomly spraying black dots on white objects Random dot stereograms Forsyth & Ponce 23

Random dot stereograms Random dot stereograms When viewed monocularly, they appear random; when viewed stereoscopically, see 3d structure. Conclusion: human binocular fusion not directly associated with the physical retinas; must involve the central nervous system Imaginary cyclopean retina that combines the left and right image stimuli as a single unit 24

Stereo photography and stereo viewers Take two pictures of the same subject from two slightly different viewpoints and display so that each eye sees only one of the images. Invented by Sir Charles Wheatstone, 1838 Image from fisher-price.com http://www.johnsonshawmuseum.org 25

http://www.johnsonshawmuseum.org Public Library, Stereoscopic Looking Room, Chicago, by Phillips, 1923 26

http://www.well.com/~jimg/stereo/stereo_list.html Autostereograms Exploit disparity as depth cue using single image. (Single image random dot stereogram, Single image stereogram) Images from magiceye.com 27

Autostereograms Images from magiceye.com Outline Human stereopsis Stereograms Epipolar geometry and the epipolar constraint Case example with parallel optical axes General case with calibrated cameras 28

Stereo vision Two cameras, simultaneous views Single moving camera and static scene Estimating depth with stereo Stereo: shape from motion between two views We ll need to consider: Info on camera pose ( calibration ) Image point correspondences scene point optical center image plane 29

Geometry for a simple stereo system First, assuming parallel optical axes, known camera parameters (i.e., calibrated cameras): World point image point (left) Depth of p image point (right) Focal length optical center (left) baseline optical center (right) 30

Geometry for a simple stereo system Assume parallel optical axes, known camera parameters (i.e., calibrated cameras). What is expression for Z? Similar triangles (p l, P, p r ) and (O l, P, O r ): T xl x Z f r T Z disparity Z f T x r x l Depth from disparity image I(x,y) Disparity map D(x,y) image I (x,y ) (x,y )=(x+d(x,y), y) So if we could find the corresponding points in two images, we could estimate relative depth 31

Outline Human stereopsis Stereograms Epipolar geometry and the epipolar constraint Case example with parallel optical axes General case with calibrated cameras General case, with calibrated cameras The two cameras need not have parallel optical axes. Vs. 32

Stereo correspondence constraints Given p in left image, where can corresponding point p be? Stereo correspondence constraints 33

Epipolar constraint Geometry of two views constrains where the corresponding pixel for some image point in the first view must occur in the second view. It must be on the line carved out by a plane connecting the world point and optical centers. Epipolar geometry Epipolar Plane Epipolar Line Epipole Baseline Epipole http://www.ai.sri.com/~luong/research/meta3dviewer/epipolargeo.html 34

Epipolar geometry: terms Baseline: line joining the camera centers Epipole: point of intersection of baseline with image plane Epipolar plane: plane containing baseline and world point Epipolar line: intersection of epipolar plane with the image plane All epipolar lines intersect at the epipole An epipolar plane intersects the left and right image planes in epipolar lines Why is the epipolar constraint useful? Epipolar constraint This is useful because it reduces the correspondence problem to a 1D search along an epipolar line. Image f rom Andrew Zisserman 35

Example What do the epipolar lines look like? 1. O l O r 2. O l O r 36

Example: converging cameras Figure f rom Hartley & Zisserman Example: parallel cameras Where are the epipoles? Figure f rom Hartley & Zisserman 37

Stereo image rectification In practice, it is convenient if image scanlines (rows) are the epipolar lines. reproject image planes onto a common plane parallel to the line between optical centers pixel motion is horizontal after this transformation two homographies (3x3 transforms), one for each input image reprojection Slide credit: Li Zhang Stereo image rectification: example Source: Alyosha Efros 38

An audio camera & epipolar geometry Spherical microphone array Adam O' Donovan, Ramani Duraiswami and Jan Neumann Microphone Arrays as Generalized Cameras for Integrated Audio Visual Processing, IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Minneapolis, 2007 An audio camera & epipolar geometry 39

An audio camera & epipolar geometry Summary Depth from stereo: main idea is to triangulate from corresponding image points. Epipolar geometry defined by two cameras We ve assumed known extrinsic parameters relating their poses Epipolar constraint limits where points from one view will be imaged in the other Makes search for correspondences quicker Terms: epipole, epipolar plane / lines, disparity, rectification, intrinsic/extrinsic parameters, essential matrix, baseline 40

Correspondence problem Multiple match hypotheses satisfy epipolar constraint, but which is correct? Figure from Gee & Cipolla 1999 Correspondence problem Beyond the hard constraint of epipolar geometry, there are soft constraints to help identify corresponding points Similarity Uniqueness Ordering Disparity gradient 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 41

Dense correspondence search For each epipolar line For each pixel / window in the left image compare with every pixel / window on same epipolar line in right image pick position with minimum match cost (e.g., SSD, correlation) Adapted from Li Zhang Correspondence problem Parallel camera example: epipolar lines are corresponding image scanlines Source: Andrew Zisserman 42

Correspondence problem Intensity profiles Source: Andrew Zisserman Correspondence problem Neighborhoods of corresponding points are similar in intensity patterns. Source: Andrew Zisserman 43

Correlation-based window matching Source: Andrew Zisserman Textureless regions Textureless regions are non-distinct; high ambiguity for matches. Source: Andrew Zisserman 44

Effect of window size W = 3 W = 20 Want window large enough to have sufficient intensity variation, yet small enough to contain only pixels with about the same disparity. Figures from Li Zhang Foreshortening effects Source: Andrew Zisserman 45

Occlusion Slide credit: David Kriegman Sparse correspondence search Restrict search to sparse set of detected features (e.g., corners) Rather than pixel values (or lists of pixel values) use feature descriptor and an associated feature distance Still narrow search further by epipolar geometry Tradeoffs between dense and sparse search? 46

Correspondence problem Beyond the hard constraint of epipolar geometry, there are soft constraints to help identify corresponding points Similarity Uniqueness Disparity gradient Ordering Uniqueness constraint Up to one match in right image for every point in left image Figure from Gee & Cipolla 1999 47

Disparity gradient constraint Assume piecewise continuous surface, so want disparity estimates to be locally smooth Figure from Gee & Cipolla 1999 Ordering constraint Points on same surface (opaque object) will be in same order in both views Figure from Gee & Cipolla 1999 48

Error sources Low-contrast ; textureless image regions Occlusions Camera calibration errors Violations of brightness constancy (e.g., specular reflections) Large motions Virtual viewpoint video C. Zitnick et al, High-quality video view interpolation using a layered representation, SIGGRAPH 2004. 49

Virtual viewpoint video http://research.microsoft.com/ivm/vvv/ Summary Depth from stereo: main idea is to triangulate from corresponding image points. Epipolar geometry defined by two cameras We ve assumed known extrinsic parameters relating their poses Epipolar constraint limits where points from one view will be imaged in the other Makes search for correspondences quicker To estimate depth Limit search by epipolar constraint Compute correspondences, incorporate matching preferences 50