Instance-level recognition I. - Camera geometry and image alignment Josef Sivic INRIA, WILLOW, ENS/INRIA/CNRS UMR 8548 Laboratoire.

Slides:



Advertisements
Similar presentations
C280, Computer Vision Prof. Trevor Darrell Lecture 2: Image Formation.
Advertisements

CSE473/573 – Stereo and Multiple View Geometry
Reconnaissance d’objets et vision artificielle Josef Sivic INRIA - Equipe-projet WILLOW ENS/INRIA/CNRS.
Instance-level recognition II.
Study the mathematical relations between corresponding image points.
Two-view geometry.
Lecture 8: Stereo.
Image alignment Image from
Camera Models CMPUT 498/613 Richard Hartley and Andrew Zisserman, Multiple View Geometry, Cambridge University Publishers, 2000 Readings: HZ Ch 6, 7.
Camera calibration and epipolar geometry
Camera Models A camera is a mapping between the 3D world and a 2D image The principal camera of interest is central projection.
Image alignment Image from
Structure from motion.
Single-view metrology
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
Geometry of Images Pinhole camera, projection A taste of projective geometry Two view geometry:  Homography  Epipolar geometry, the essential matrix.
Used slides/content with permission from
Epipolar geometry. (i)Correspondence geometry: Given an image point x in the first view, how does this constrain the position of the corresponding point.
Structure from motion. Multiple-view geometry questions Scene geometry (structure): Given 2D point matches in two or more images, where are the corresponding.
Uncalibrated Geometry & Stratification Sastry and Yang
Lecture 7: Image Alignment and Panoramas CS6670: Computer Vision Noah Snavely What’s inside your fridge?
CS485/685 Computer Vision Prof. George Bebis
CAU Kiel DAGM 2001-Tutorial on Visual-Geometric 3-D Scene Reconstruction 1 The plan for today Leftovers and from last time Camera matrix Part A) Notation,
Computer Vision : CISC4/689
Cameras and Projections Dan Witzner Hansen Course web page:
Lecture 6: Image Warping and Projection CS6670: Computer Vision Noah Snavely.
Lecture 20: Two-view geometry CS6670: Computer Vision Noah Snavely.
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
The Pinhole Camera Model
Lec 21: Fundamental Matrix
CSE473/573 – Stereo Correspondence
Two-views geometry Outline Background: Camera, Projection Necessary tools: A taste of projective geometry Two view geometry:  Homography  Epipolar geometry,
Cameras, lenses, and calibration
3-D Scene u u’u’ Study the mathematical relations between corresponding image points. “Corresponding” means originated from the same 3D point. Objective.
Multi-view geometry. Multi-view geometry problems Structure: Given projections of the same 3D point in two or more images, compute the 3D coordinates.
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2013.
Projective Geometry and Camera Models
Image alignment.
Lecture 11 Stereo Reconstruction I Lecture 11 Stereo Reconstruction I Mata kuliah: T Computer Vision Tahun: 2010.
Introduction à la vision artificielle III Jean Ponce
Camera Geometry and Calibration Thanks to Martial Hebert.
Multi-view geometry.
Epipolar geometry The fundamental matrix and the tensor
Homogeneous Coordinates (Projective Space) Let be a point in Euclidean space Change to homogeneous coordinates: Defined up to scale: Can go back to non-homogeneous.
Geometric Models & Camera Calibration
Imaging Geometry for the Pinhole Camera Outline: Motivation |The pinhole camera.
Metrology 1.Perspective distortion. 2.Depth is lost.
Geometric Camera Models
Vision Review: Image Formation Course web page: September 10, 2002.
Lecture 03 15/11/2011 Shai Avidan הבהרה : החומר המחייב הוא החומר הנלמד בכיתה ולא זה המופיע / לא מופיע במצגת.
Computer Vision : CISC 4/689 Going Back a little Cameras.ppt.
Affine Structure from Motion
Single-view geometry Odilon Redon, Cyclops, 1914.
Two-view geometry. Epipolar Plane – plane containing baseline (1D family) Epipoles = intersections of baseline with image planes = projections of the.
EECS 274 Computer Vision Affine Structure from Motion.
1 Chapter 2: Geometric Camera Models Objective: Formulate the geometrical relationships between image and scene measurements Scene: a 3-D function, g(x,y,z)
Feature Matching. Feature Space Outlier Rejection.
Reconnaissance d’objets et vision artificielle Jean Ponce Equipe-projet WILLOW ENS/INRIA/CNRS UMR 8548 Laboratoire.
Computer vision: models, learning and inference M Ahad Multiple Cameras
Local features: detection and description
776 Computer Vision Jan-Michael Frahm Spring 2012.
EECS 274 Computer Vision Projective Structure from Motion.
Lecture 18: Cameras CS4670 / 5670: Computer Vision KavitaBala Source: S. Lazebnik.
776 Computer Vision Jan-Michael Frahm Spring 2012.
Homogeneous Coordinates (Projective Space)
Study the mathematical relations between corresponding image points.
GEOMETRIC CAMERA MODELS
Geometric Camera Models
Lecturer: Dr. A.H. Abdul Hafez
The Pinhole Camera Model
Presentation transcript:

Instance-level recognition I. - Camera geometry and image alignment Josef Sivic 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 Reconnaissance d’objets et vision artificielle 2011

Class webpage:

Object recognition and computer vision 2011 Class webpage: 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. with close links to SIERRA – machine learning (F. Bach) 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

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

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

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

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

Pinhole Perspective Equation NOTE: z is always negative.. Camera center Image plane (retina) Principal axis Camera co- ordinate system World point Imaged point

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 x,y: World coordinates x’,y’: Image coordinates f: pinhole-to-retina distance Weak-Perspective Projection (Affine) x,y: World coordinates x’,y’: Image coordinates m: magnification Orthographic Projection (Affine) x,y: World coordinates x’,y’: Image coordinates Common distortion model x’,y’: Ideal image coordinates x’’,y’’: Actual image coordinates

Cameras and their parameters Images from M. Pollefeys

The Intrinsic Parameters of a Camera Normalized Image Coordinates Physical Image Coordinates Units: k,l : pixel/m f : m  : pixel

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

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

Weak perspective (affine) camera

Observations: 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 Projection equation:

u v a3a3 C Geometric Interpretation: The rows of the projection matrix describe the three planes defined by the image coordinate system a1a1 a2a2

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

Other useful geometric properties Depth of points: How far a point lies from the principal plane of a camera? a3a3 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

p P Other useful geometric properties Q: Can we compute the position of the camera center  ? A: Q: Given an image point p, what is the direction of the corresponding ray in space? A: Hint: Start from the projection equation. Show that the right null-space of camera matrix M is the camera center. 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 depth of the scene point is unknown camera centre image plane image point scene point C X x 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 Points on a world plane map with a 2D affine geometric transformation (6 parameters)

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

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 1 image plane 2 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 P = K [ I | 0 ] P’ = K’ [ R | 0 ] H = K’ R K^(-1) Slide credit: A. Zisserman

Case II: Cameras rotating about their centre image plane 1 image plane 2 Slide credit: A. Zisserman