EE795: Computer Vision and Intelligent Systems

Similar documents
EE795: Computer Vision and Intelligent Systems

Stereo Matching. Stereo Matching. Face modeling. Z-keying: mix live and synthetic

Mosaics. Today s Readings

Today s lecture. Image Alignment and Stitching. Readings. Motion models

Homographies and RANSAC

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

Image stitching. Digital Visual Effects Yung-Yu Chuang. with slides by Richard Szeliski, Steve Seitz, Matthew Brown and Vaclav Hlavac

Image stitching. Announcements. Outline. Image stitching

Image Stitching. Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi

Stereo vision. Many slides adapted from Steve Seitz

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

Step-by-Step Model Buidling

Computer Vision Lecture 17

Computer Vision Lecture 17

Dense 3D Reconstruction. Christiano Gava

Announcements. Mosaics. How to do it? Image Mosaics

What have we leaned so far?

Multiple View Geometry

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

CS664 Lecture #19: Layers, RANSAC, panoramas, epipolar geometry

Epipolar Geometry and Stereo Vision

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

Dense 3D Reconstruction. Christiano Gava

CSE 252B: Computer Vision II

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

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

Image stitching. Digital Visual Effects Yung-Yu Chuang. with slides by Richard Szeliski, Steve Seitz, Matthew Brown and Vaclav Hlavac

Epipolar Geometry and Stereo Vision

CSE 252B: Computer Vision II

Image warping and stitching

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

Epipolar Geometry CSE P576. Dr. Matthew Brown

CS5670: Computer Vision

Multiple Views Geometry

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

CS6670: Computer Vision

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

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

Image warping and stitching

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

Stereo and structured light

Chaplin, Modern Times, 1936

Lecture 14: Computer Vision

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

Image warping and stitching

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

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

Feature Matching and RANSAC

Multi-stable Perception. Necker Cube

Stereo and Epipolar geometry

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

BIL Computer Vision Apr 16, 2014

Local Feature Detectors

Stereo. Many slides adapted from Steve Seitz

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

Stereo Vision Computer Vision (Kris Kitani) Carnegie Mellon University

Epipolar Geometry and Stereo Vision

1-2 Feature-Based Image Mosaicing

Final project bits and pieces

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

CSE 527: Introduction to Computer Vision

Matching. Compare region of image to region of image. Today, simplest kind of matching. Intensities similar.

Lecture 14: Basic Multi-View Geometry

Last lecture. Passive Stereo Spacetime Stereo

EE795: Computer Vision and Intelligent Systems

Index. 3D reconstruction, point algorithm, point algorithm, point algorithm, point algorithm, 263

Image Warping and Mosacing

Lecture 6 Stereo Systems Multi-view geometry

Image Based Rendering. D.A. Forsyth, with slides from John Hart

Feature Tracking and Optical Flow

Application questions. Theoretical questions

calibrated coordinates Linear transformation pixel coordinates

Recap from Previous Lecture

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

Index. 3D reconstruction, point algorithm, point algorithm, point algorithm, point algorithm, 253

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

Camera Geometry II. COS 429 Princeton University

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

Motion Tracking and Event Understanding in Video Sequences

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

1 Projective Geometry

Cameras and Stereo CSE 455. Linda Shapiro

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

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

Image-Based Modeling and Rendering

Multiple View Geometry

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

Image Based Reconstruction II

Stereo Vision. MAN-522 Computer Vision

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

N-Views (1) Homographies and Projection

Object Recognition with Invariant Features

Computational Optical Imaging - Optique Numerique. -- Single and Multiple View Geometry, Stereo matching --

Geometric Reconstruction Dense reconstruction of scene geometry

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

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

Single-view 3D Reconstruction

Lecture 16: Computer Vision

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

Image-based Modeling and Rendering: 8. Image Transformation and Panorama

Transcription:

EE795: Computer Vision and Intelligent Systems Spring 2012 TTh 17:30-18:45 FDH 204 Lecture 12 130228 http://www.ee.unlv.edu/~b1morris/ecg795/

2 Outline Review Panoramas, Mosaics, Stitching Two View Geometry Basics Epipolar Geometry Planar Homography Stereo

3 Image Mosaics Image Stitching Richard Szeliski + + + = Goal: Stitch together several images into a seamless composite

4 Image Stitching Image Stitching Richard Szeliski 1. Align the images over each other camera pan translation on cylinder 2. Blend the images together

5 Image stitching steps Image Stitching Richard Szeliski 1. Take pictures on a tripod (or handheld) 2. Warp images to spherical coordinates 3. Extract features 4. Align neighboring pairs using RANSAC 5. Write out list of neighboring translations 6. Correct for drift 7. Read in warped images and blend them 8. Crop the result and import into a viewer

6 Matching features Image Stitching Richard Szeliski What do we do about the bad matches?

7 Image Stitching Richard Szeliski RAndom SAmple Consensus Select one match, count inliers

8 Image Stitching Richard Szeliski RAndom SAmple Consensus Select one match, count inliers

9 Least squares fit Image Stitching Richard Szeliski Find average translation vector

10 Image Stitching Assembling the panorama Richard Szeliski Stitch pairs together, blend, then crop

11 Problem: Drift Image Stitching Richard Szeliski Error accumulation small (vertical) errors accumulate over time apply correction so that sum = 0 (for 360 pan.)

12 Problem: Drift (x 1,y 1 ) Image Stitching Richard Szeliski (x n,y n ) copy of first image Solution add another copy of first image at the end this gives a constraint: y n = y 1 there are a bunch of ways to solve this problem add displacement of (y 1 y n )/(n -1) to each image after the first compute a global warp: y = y + ax run a big optimization problem, incorporating this constraint best solution, but more complicated known as bundle adjustment

13 Full-view Panorama Image Stitching Richard Szeliski + + + +

14 Texture Mapped Model Image Stitching Richard Szeliski

15 Global alignment Image Stitching Richard Szeliski Register all pairwise overlapping images Use a 3D rotation model (one R per image) Use direct alignment (patch centers) or feature based Infer overlaps based on previous matches (incremental) Optionally discover which images overlap other images using feature selection (RANSAC)

16 Image Stitching Recognizing Panoramas Richard Szeliski [Brown & Lowe, ICCV 03]

17 Image Stitching Finding the panoramas Richard Szeliski

18 Image Stitching Finding the panoramas Richard Szeliski

19 Image Stitching Finding the panoramas Richard Szeliski

20 Image Stitching Finding the panoramas Richard Szeliski

21 Richard Szeliski Fully automated 2D stitching Image Stitching Free copy from Microsoft Essentials http://windows.microsoft.com/en-us/windowslive/photo-gallery-get-started

22 Final thought: What is a panorama? Image Stitching Richard Szeliski Tracking a subject Panorama Repeated (best) shots Photo Fuse Multiple exposures Photo Fuse Infer what photographer wants?

23 Two View Geometry Basic geometry to relate images of points and their 3d position X 2 = RX 1 + T Use triangulation Will assume cameras are calibrated Cameras match

24 Epipolar Geometry Cameras centered at o 1 and o 2 Homogeneous vectors e 1, e 2 are known as epipoles Points where baseline pierces the image plane Projection of the other camera s optical center onto the other image plane Translation vector T between cameras

25 Epipolar Lines An point in one image maps to a line in another image A plane is spanned by the epipoles, o 1, o 2, and a 3d point p l 1, l 2 are epipolar lines Intersection of the p-plane with the image plane Image point x 1 can map anywhere along line l 2 Depends on the depth of the point

26 Rectified Stereo Simplest case of two-view geometry Camera views are rectified so that there is only a translation between images Epipolar lines are horizontal Points in one image map to a horizontal scan line with the same y coordinate in the other image plane Simple search and match techniques Can give us disparity (depth) image

27 Essential Matrix Relate 3d world coordinates and image coordinates with epipolar constraints Given 3d relationship X 2 = RX 1 + T Image coordinate relationship X 1 = λ 1 x 1 and X 2 = λ 2 x 2 Map line to a point between images x 2 T Ex 1 = 0 E 3 3 Essential matrix compactly encodes (R, T) Can find the Essential matrix using the 8-point algorithm This gives the camera rotation and translation

28 Homography 8-point algorithm will fail with coplanar points Planar relationship N T X 1 = n 1 X + n 2 Y + n 3 Z = d 1 d NT X 1 = 1 3d relationship X 2 = RX 1 + T X 2 = RX 1 + T 1 d NT X 1 X 2 = HX 1 Homography matrix H = R + T 1 d NT 3 3 linear transformation from 3d points 2D homography coordinates X 1 = λ 1 x 1 and X 2 = λ 2 x 2 λ 2 x 2 = Hλ 1 x 1 Homography is a direct mapping between points in the image planes Equality up to a scale factor (universal scale ambiguity)

29 Induced Homography Plane P induces the homography x 2 ~Hx 1 A point p not actually on the plane P will get mapped in image 2 as if it were pushed onto P along the ray o 1 p

30 Computing Homography Process known as the 4-point algorithm or the Direct Linear Transform (DLT) Start from homography constraint x 2 ~Hx 1 Adapted from R. Szeliski

Solving for Homographies Defines a least squares problem: A h 0 2n 9 9 2n Since h is only defined up to scale, solve for unit vector ĥ Solution: ĥ = eigenvector of A T A with smallest eigenvalue Works with 4 or more points Adapted from R. Szeliski

32 Purely Rotating Camera No translation between cameras X 2 = RX 1 H = R Camera rotating about optical center captures images of a 3d scene as if the scene were on a plane infinitely far away from the camera Planar panoramas can be constructed from rotation Select image to be a reference Find corresponding points between overlapping images derive pairwise homography Blend images together

33 Planar Panorama Notice the bow-tie effect as images further away from the reference are warped outward to fit the homography

34 Planar Image Rectification Given a single perspective image, unwarp it so that a plane has parallel lines Select 4 corners of rectangle, define the output coordinates, compute homography, and warp image

35 More Fun with Homographies http://youtu.be/uirmvnktkbc

36 Stereo Matching Given two more images of the same scene or object, compute a representation of its shape Common application is generating disparity or depth map Popularized for games recently by Kinect What are applications?

37 Face modeling Stereo matching CSE 576, Spring 2008 From one stereo pair to a 3D head model [Frederic Deverney, INRIA]

38 Stereo matching CSE 576, Spring Z-keying: mix live and synthetic 2008 Takeo Kanade, CMU (Stereo Machine)

39 View Interpolation Stereo matching CSE 576, Spring 2008 Given two images with correspondences, morph (warp and cross-dissolve) between them [Chen & Williams, SIGGRAPH 93] input depth image novel view [Matthies,Szeliski,Kanade 88]

40 Stereo matching More view interpolation CSE 576, Spring 2008 Spline-based depth map input depth image novel view [Szeliski & Kang 95]

41 View Morphing Stereo matching CSE 576, Spring 2008 Morph between pair of images using epipolar geometry [Seitz & Dyer, SIGGRAPH 96]

42 Stereo matching Video view interpolation CSE 576, Spring 2008 [Zitnick et. al 2004] http://research.microsoft.com/en-us/um/people/larryz/massivearabesque.wmv http://www.youtube.com/watch?v=uqktbynoaxe

43 Virtualized Reality TM Stereo matching CSE 576, Spring 2008 [Takeo Kanade et al., CMU] collect video from 50+ stream reconstruct 3D model sequences steerable version used for SuperBowl XXV eye vision

44 Real-time stereo Stereo matching CSE 576, Spring 2008 Nomad robot searches for meteorites in Antartica http://www.frc.ri.cmu.edu/projects/meteorobot/index.html Used for robot navigation (and other tasks) Software-based real-time stereo techniques

45 Driver Assistance Systems Environment sensing and autonomous control http://youtu.be/_imrrzn8ndk?t=12s http://youtu.be/-mwvbfia3dk http://vislab.it/automotive/ Autonomous drive from Parma, Italy to Shanghai, China

46 Stereo matching Additional applications CSE 576, Spring 2008 Real-time people tracking (systems from Pt. Gray Research and SRI) Gaze correction for video conferencing [Ott,Lewis,Cox InterChi 93] Other ideas?

47 Stereo Matching Stereo matching CSE 576, Spring 2008 Given two or more images of the same scene or object, compute a representation of its shape What are some possible representations? depth maps volumetric models 3D surface models planar (or offset) layers

48 Stereo Matching Stereo matching CSE 576, Spring 2008 What are some possible algorithms? match features and interpolate match edges and interpolate match all pixels with windows (coarse-fine) use optimization: iterative updating dynamic programming energy minimization (regularization, stochastic) graph algorithms

49 Stereo matching Stereo: epipolar geometry Match features along epipolar lines CSE 576, Spring 2008 epipolar line epipolar plane viewing ray Rectification: warping the input images (perspective transformation) so that epipolar lines are horizontal

50 Rectification Stereo matching CSE 576, Spring 2008 Project each image onto same plane, which is parallel to the epipole Resample lines (and shear/stretch) to place lines in correspondence, and minimize distortion [Loop and Zhang, CVPR 99]

51 Stereo matching CSE 576, Spring 2008 Rectification BAD!

52 Stereo matching CSE 576, Spring 2008 Rectification GOOD!

53 Stereo matching Finding correspondences CSE 576, Spring 2008 apply feature matching criterion (e.g., correlation or Lucas-Kanade) at all pixels simultaneously search only over epipolar lines (many fewer candidate positions)

54 Stereo matching CSE 576, Spring Your basic stereo algorithm 2008 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...

55 CSE 576, Spring Image registration (revisited) 2008 Stereo matching How do we determine correspondences? block matching or SSD (sum squared differences) d is the disparity (horizontal motion) How big should the neighborhood be?

56 Neighborhood size Stereo matching CSE 576, Spring 2008 Smaller neighborhood: more details Larger neighborhood: fewer isolated mistakes w = 3 w = 20

57 Matching criteria Stereo matching CSE 576, Spring 2008 Raw pixel values (correlation) Band-pass filtered images [Jones & Malik 92] Corner like features [Zhang, ] Edges [many people ] Gradients [Seitz 89; Scharstein 94] Rank statistics [Zabih & Woodfill 94]

58 CSE 576, Spring Stereo: certainty modeling 2008 Stereo matching Compute certainty map from correlations input depth map certainty map

59 Stereo matching CSE 576, Spring Stereo matching framework 2008 1. For every disparity, compute raw matching costs Why use a robust function? occlusions, other outliers Can also use alternative match criteria

60 Stereo matching CSE 576, Spring Stereo matching framework 2008 2. Aggregate costs spatially Here, we are using a box filter (efficient moving average implementation) Can also use weighted average, [non-linear] diffusion

61 Stereo matching CSE 576, Spring Stereo matching framework 2008 3. Choose winning disparity at each pixel 4. Interpolate to sub-pixel accuracy E(d) d* d

62 Stereo matching CSE 576, Spring Traditional Stereo Matching 2008 Advantages: gives detailed surface estimates fast algorithms based on moving averages sub-pixel disparity estimates and confidence Limitations: narrow baseline noisy estimates fails in textureless areas gets confused near occlusion boundaries

63 Feature-based stereo Stereo matching CSE 576, Spring 2008 Match corner (interest) points Interpolate complete solution

64 Data interpolation Stereo matching CSE 576, Spring 2008 Given a sparse set of 3D points, how do we interpolate to a full 3D surface? Scattered data interpolation [Nielson93] triangulate put onto a grid and fill (use pyramid?) place a kernel function over each data point minimize an energy function Lots of more advanced stereo matching options and algorithms exist

65 Depth Map Results Stereo matching CSE 576, Spring 2008 Input image Sum Abs Diff Mean field Graph cuts