Instance-level recognition I. - Camera geometry and image alignment

Similar documents
Image Formation I Chapter 1 (Forsyth&Ponce) Cameras

Instance-level recognition part 2

Image Formation I Chapter 1 (Forsyth&Ponce) Cameras

Instance-level recognition II.

Agenda. Rotations. Camera models. Camera calibration. Homographies

Augmented Reality II - Camera Calibration - Gudrun Klinker May 11, 2004

Vision Review: Image Formation. Course web page:

calibrated coordinates Linear transformation pixel coordinates

Geometric camera models and calibration

Agenda. Rotations. Camera calibration. Homography. Ransac

Pin Hole Cameras & Warp Functions

Image Formation. Antonino Furnari. Image Processing Lab Dipartimento di Matematica e Informatica Università degli Studi di Catania

Introduction to Computer Vision

COSC579: Scene Geometry. Jeremy Bolton, PhD Assistant Teaching Professor

Homogeneous Coordinates. Lecture18: Camera Models. Representation of Line and Point in 2D. Cross Product. Overall scaling is NOT important.

Pin Hole Cameras & Warp Functions

COS429: COMPUTER VISON CAMERAS AND PROJECTIONS (2 lectures)

Image warping and stitching

CS6670: Computer Vision

Image warping and stitching

Pinhole Camera Model 10/05/17. Computational Photography Derek Hoiem, University of Illinois

Image warping and stitching

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

Image formation. Thanks to Peter Corke and Chuck Dyer for the use of some slides

Camera model and multiple view geometry

Computer Vision Lecture 17

Computer Vision Lecture 17

Unit 3 Multiple View Geometry

Image Formation I Chapter 2 (R. Szelisky)

Projective Geometry and Camera Models

Structure from motion

Projective Geometry and Camera Models

Computer Vision Projective Geometry and Calibration. Pinhole cameras

Geometry of image formation

METRIC PLANE RECTIFICATION USING SYMMETRIC VANISHING POINTS

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

DD2423 Image Analysis and Computer Vision IMAGE FORMATION. Computational Vision and Active Perception School of Computer Science and Communication

Rectification and Distortion Correction

Humanoid Robotics. Projective Geometry, Homogeneous Coordinates. (brief introduction) Maren Bennewitz

CSE 252B: Computer Vision II

Camera Model and Calibration

All human beings desire to know. [...] sight, more than any other senses, gives us knowledge of things and clarifies many differences among them.

Structure from motion

Visual Recognition: Image Formation

CS4670: Computer Vision

Structure from Motion. Prof. Marco Marcon

Stereo Image Rectification for Simple Panoramic Image Generation

Lecture 9: Epipolar Geometry

3D Geometry and Camera Calibration

Two-view geometry Computer Vision Spring 2018, Lecture 10

CS 664 Slides #9 Multi-Camera Geometry. Prof. Dan Huttenlocher Fall 2003

Computer Vision CSCI-GA Assignment 1.

Assignment 2 : Projection and Homography

Rectification. Dr. Gerhard Roth

N-Views (1) Homographies and Projection

Multiple View Geometry in Computer Vision Second Edition

Discriminant Functions for the Normal Density

1 Projective Geometry

Agenda. Perspective projection. Rotations. Camera models

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

Multiple View Geometry

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

Computer Vision. Coordinates. Prof. Flávio Cardeal DECOM / CEFET- MG.

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

Perspective Projection [2 pts]

Camera Geometry II. COS 429 Princeton University

Projective geometry for Computer Vision

Multiple View Geometry in Computer Vision

An idea which can be used once is a trick. If it can be used more than once it becomes a method

Rigid Body Motion and Image Formation. Jana Kosecka, CS 482

CS6670: Computer Vision

CSE 167: Introduction to Computer Graphics Lecture #3: Coordinate Systems

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

Robotics - Projective Geometry and Camera model. Marcello Restelli

Recovering structure from a single view Pinhole perspective projection

CMPSCI 670: Computer Vision! Image formation. University of Massachusetts, Amherst September 8, 2014 Instructor: Subhransu Maji

CSE 4392/5369. Dr. Gian Luca Mariottini, Ph.D.

Computer Vision cmput 428/615

Week 2: Two-View Geometry. Padua Summer 08 Frank Dellaert

Multiple View Geometry in Computer Vision

Camera Models and Image Formation. Srikumar Ramalingam School of Computing University of Utah

MERGING POINT CLOUDS FROM MULTIPLE KINECTS. Nishant Rai 13th July, 2016 CARIS Lab University of British Columbia

Camera Models and Image Formation. Srikumar Ramalingam School of Computing University of Utah

Camera Projection Models We will introduce different camera projection models that relate the location of an image point to the coordinates of the

Camera models and calibration

Single View Geometry. Camera model & Orientation + Position estimation. What am I?

BIL Computer Vision Apr 16, 2014

CHAPTER 3. Single-view Geometry. 1. Consequences of Projection

Camera Model and Calibration. Lecture-12

Structure from Motion

CS-9645 Introduction to Computer Vision Techniques Winter 2019

Image Warping and Mosacing

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

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

CS231A. Review for Problem Set 1. Saumitro Dasgupta

Computer Vision CS 776 Fall 2018

Computer Vision Projective Geometry and Calibration. Pinhole cameras

Computer Vision, Assignment 1 Elements of Projective Geometry

Outline. ETN-FPI Training School on Plenoptic Sensing

3D Computer Vision II. Reminder Projective Geometry, Transformations

Transcription:

Reconnaissance d objets et vision artificielle 2011 Instance-level recognition I. - Camera geometry and image alignment Josef Sivic http://www.di.ens.fr/~josef INRIA, WILLOW, ENS/INRIA/CNRS UMR 8548 Laboratoire d Informatique, Ecole Normale Supérieure, Paris With slides from: S. Lazebnik, J. Ponce, and A. Zisserman

http://www.di.ens.fr/willow/teaching/recvis11/ Class webpage: http://www.di.ens.fr/willow/teaching/recvis11/

Object recognition and computer vision 2011 Class webpage: http://www.di.ens.fr/willow/teaching/recvis11/ Grading: 3 programming assignments (60%) Panorama stitching Image classification Basic face detector Final project (40%) More independent work, resulting in the report and a class presentation.

Matlab tutorial Friday 30/09/2011 at 10:30-12:00. The tutorial will be at 23 avenue d'italie - Salle Rose. Come if you have no/limited experience with Matlab.

Research Both WILLOW (J. Ponce, I. Laptev, J. Sivic) and LEAR (C. Schmid) groups are active in computer vision and visual recognition research. http://www.di.ens.fr/willow/ http://lear.inrialpes.fr/ with close links to SIERRA machine learning (F. Bach) http://www.di.ens.fr/sierra/ There will be master internships available. Talk to us if you are interested.

Outline Part I - Camera geometry image formation Perspective projection Affine projection Projection of planes Part II - Image matching and recognition with local features Correspondence Semi-local and global geometric relations Robust estimation RANSAC and Hough Transform

Reading: Part I. Camera geometry Forsyth&Ponce Chapters 1 and 2 Hartley&Zisserman Chapter 6: Camera models

Motivation: Stitching panoramas

Feature-based alignment outline

Feature-based alignment outline Extract features

Feature-based alignment outline Extract features Compute putative matches

Feature-based alignment outline Extract features Compute putative matches Loop: Hypothesize transformation T (small group of putative matches that are related by T)

Feature-based alignment outline Extract features Compute putative matches Loop: Hypothesize transformation T (small group of putative matches that are related by T) Verify transformation (search for other matches consistent with T)

Feature-based alignment outline Extract features Compute putative matches Loop: Hypothesize transformation T (small group of putative matches that are related by T) Verify transformation (search for other matches consistent with T)

2D transformation models Similarity (translation, scale, rotation) Affine Projective (homography) Why these transformations???

Camera geometry

They are formed by the projection of 3D objects. Images are two-dimensional patterns of brightness values.

Animal eye: a looonnng time ago. Photographic camera: Niepce, 1816. Pinhole perspective projection: Brunelleschi, XV th Century. Camera obscura: XVI th Century.

Pompei painting, 2000 years ago. Brunelleschi, 1415 Van Eyk, XIV th Century Massaccio s Trinity, 1425

Pinhole Perspective Equation Image plane (retina) Camera coordinate system World point Imaged point Camera center Principal axis P = (x,y,z) T P'= (x', y') T y' f ' O z y NOTE: z is always negative..

Affine projection models: Weak perspective projection is the magnification. When the scene relief is small compared its distance from the Camera, m can be taken constant: weak perspective projection.

Affine projection models: Orthographic projection When the camera is at a (roughly constant) distance from the scene, take m=1.

Strong perspective: Angles are not preserved The projections of parallel lines intersect at one point

From Zisserman & Hartley

Strong perspective: Angles are not preserved The projections of parallel lines intersect at one point Weak perspective: Angles are better preserved The projections of parallel lines are (almost) parallel

Beyond pinhole camera model: Geometric Distortion

Rectification

Radial Distortion Model

Perspective Projection Weak-Perspective Projection (Affine) Orthographic Projection (Affine) Common distortion model x,y: World coordinates x,y : Image coordinates f: pinhole-to-retina distance x,y: World coordinates x,y : Image coordinates m: magnification x,y: World coordinates x,y : Image coordinates x,y : Ideal image coordinates x,y : Actual image coordinates

Cameras and their parameters Images from M. Pollefeys

The Intrinsic Parameters of a Camera Units: k,l : pixel/m f : m α,β : pixel Normalized Image Coordinates Physical Image Coordinates

The Intrinsic Parameters of a Camera Calibration Matrix The Perspective Projection Equation

Notation Euclidean Geometry

Recall: Coordinate Changes and Rigid Transformations

The Extrinsic Parameters of a Camera W x u v = 1 m 12 m 12 m 13 m 14 m 21 m 22 m 23 m W y 24 z W z 1 m 31 m 32 m 33 m 34 1 W P = W x W y W z

Explicit Form of the Projection Matrix Note: M is only defined up to scale in this setting!!

Weak perspective (affine) camera z r = m 3 T P = const. u v = 1 z 1 r m 1 T m 2 T m 3 T m T 1 P /m T 3 P P = m T 2 P /m T 3 P m T 3 P /m T 3 P u = 1 T m 1 T P v z r m 2 u = a 11 a 12 a 13 b 1 v a 21 a 22 a 23 b 2 A 2 3 b 2 1 W x W y W z 1 =A W P + b

Geometric Interpretation Projection equation: Observations: a 1 T X Y + b 1 = 0 Z is the equation of a plane of normal direction a 1 From the projection equation, it is also the plane defined by: u = 0 Similarly: (a 2,b 2 ) describes the plane defined by: v = 0 (a 3,b 3 ) describes the plane defined by: That is the plane parallel to image plane passing through the pinhole (z = 0) principal plane

Geometric Interpretation: The rows of the projection matrix describe the three planes defined by the image coordinate system a 3 v a 1 a 2 C u

Other useful geometric properties a 3 Principal axis of the camera: The ray passing through the camera centre with direction vector a 3

Other useful geometric properties a 3 P = w x w y w z 1 Depth of points: How far a point lies from the principal plane of a camera? d(p,π 3 ) = a 3 T + b 3 = m T 3 P = m 3 a 3 a 3 w x w y w z T P If a 3 =1 But for general camera matrices: - need to be careful about the sign. - need to normalize matrix to have a 3 =1

Other useful geometric properties p P Q: Can we compute the position of the camera center Ω? A: Hint: Start from the projection equation. Show that the right null-space of camera matrix M is the camera center. Q: Given an image point p, what is the direction of the corresponding ray in space? A: Hint: Start from a projection equation and write all points along direction w, that project to point p.

Re-cap: imaging and camera geometry (with a slight change of notation) perspective projection camera centre, image point and scene point are collinear an image point back projects to a ray in 3-space C x X image point scene point depth of the scene point is unknown camera centre image plane Slide credit: A. Zisserman

Slide credit: A. Zisserman

How a scene plane projects into an image?

Plane projective transformations Slide credit: A. Zisserman

Projective transformations continued This is the most general transformation between the world and image plane under imaging by a perspective camera. It is often only the 3 x 3 form of the matrix that is important in establishing properties of this transformation. A projective transformation is also called a ``homography'' and a ``collineation''. H has 8 degrees of freedom. Slide credit: A. Zisserman

Planes under affine projection x 1 x 2 x = a 11 a 12 a 13 b 1 y a 21 a 22 a 23 b 2 0 1 = a 11 a 12 x + b 1 = A a 21 a 22 y b 2 2 P + b 2 1 2 Points on a world plane map with a 2D affine geometric transformation (6 parameters)

Summary Affine projections induce affine transformations from planes onto their images. Perspective projections induce projective transformations from planes onto their images.

2D transformation models Similarity (translation, scale, rotation) Affine Projective (homography)

When is homography a valid transformation model?

Case I: Plane projective transformations Slide credit: A. Zisserman

Case I: Projective transformations continued This is the most general transformation between the world and image plane under imaging by a perspective camera. It is often only the 3 x 3 form of the matrix that is important in establishing properties of this transformation. A projective transformation is also called a ``homography'' and a ``collineation''. H has 8 degrees of freedom. Slide credit: A. Zisserman

Case II: Cameras rotating about their centre image plane 2 image plane 1 P = K [ I 0 ] P = K [ R 0 ] H = K R K^(-1) The two image planes are related by a homography H H depends only on the relation between the image planes and camera centre, C, not on the 3D structure Slide credit: A. Zisserman

Case II: Cameras rotating about their centre image plane 2 image plane 1 P = K[I 0] P'= K'[R 0] x = K[I 0] X = KX X = K 1 x 1 x'= K'[R 0] X = K'RX 1 x'= K'RK 1 x H Slide credit: A. Zisserman