Last 4 lectures Camera Structure HDR Image Filtering Image Transform.

Slides:



Advertisements
Similar presentations
Single-view geometry Odilon Redon, Cyclops, 1914.
Advertisements

Computer Vision, Robert Pless
RANSAC and mosaic wrap-up cs129: Computational Photography James Hays, Brown, Fall 2012 © Jeffrey Martin (jeffrey-martin.com) most slides from Steve Seitz,
CS 691 Computational Photography Instructor: Gianfranco Doretto 3D to 2D Projections.
More Mosaic Madness : Computational Photography Alexei Efros, CMU, Fall 2011 © Jeffrey Martin (jeffrey-martin.com) with a lot of slides stolen from.
RANSAC and mosaic wrap-up cs195g: Computational Photography James Hays, Brown, Spring 2010 © Jeffrey Martin (jeffrey-martin.com) most slides from Steve.
Computer vision: models, learning and inference
Chapter 6 Feature-based alignment Advanced Computer Vision.
Camera Calibration. Issues: what are intrinsic parameters of the camera? what is the camera matrix? (intrinsic+extrinsic) General strategy: view calibration.
Camera Models A camera is a mapping between the 3D world and a 2D image The principal camera of interest is central projection.
CS6670: Computer Vision Noah Snavely Lecture 17: Stereo
Announcements. Projection Today’s Readings Nalwa 2.1.
Lecture 5: Projection CS6670: Computer Vision Noah Snavely.
Announcements Project 2 questions Midterm out on Thursday
Announcements Mailing list (you should have received messages) Project 1 additional test sequences online Talk today on “Lightfield photography” by Ren.
Uncalibrated Epipolar - Calibration
Announcements Mailing list Project 1 test the turnin procedure *this week* (make sure it works) vote on best artifacts in next week’s class Project 2 groups.
Lecture 13: Projection, Part 2
Panorama signups Panorama project issues? Nalwa handout Announcements.
Sebastian Thrun and Jana Kosecha CS223B Computer Vision, Winter 2007 Stanford CS223B Computer Vision, Winter 2007 Lecture 4 Camera Calibration Professors.
Lecture 12: Projection CS4670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
Lecture 6: Image Warping and Projection CS6670: Computer Vision Noah Snavely.
Lecture 16: Single-view modeling, Part 2 CS6670: Computer Vision Noah Snavely.
Single-view geometry Odilon Redon, Cyclops, 1914.
The Pinhole Camera Model
Panoramas and Calibration : Rendering and Image Processing Alexei Efros …with a lot of slides stolen from Steve Seitz and Rick Szeliski.
CSE 576, Spring 2008Projective Geometry1 Lecture slides by Steve Seitz (mostly) Lecture presented by Rick Szeliski.
Camera parameters Extrinisic parameters define location and orientation of camera reference frame with respect to world frame Intrinsic parameters define.
Today: Calibration What are the camera parameters?
Sebastian Thrun CS223B Computer Vision, Winter Stanford CS223B Computer Vision, Winter 2006 Lecture 4 Camera Calibration Professor Sebastian Thrun.
Projective Geometry and Single View Modeling CSE 455, Winter 2010 January 29, 2010 Ames Room.
Single-view modeling, Part 2 CS4670/5670: Computer Vision Noah Snavely.
776 Computer Vision Jan-Michael Frahm, Enrique Dunn Spring 2013.
CSC 589 Lecture 22 Image Alignment and least square methods Bei Xiao American University April 13.
Camera Geometry and Calibration Thanks to Martial Hebert.
Epipolar geometry The fundamental matrix and the tensor
Last Lecture (optical center) origin principal point P (X,Y,Z) p (x,y) x y.
Course 12 Calibration. 1.Introduction In theoretic discussions, we have assumed: Camera is located at the origin of coordinate system of scene.
Sebastian Thrun CS223B Computer Vision, Winter Stanford CS223B Computer Vision, Winter 2005 Lecture 2 Lenses and Camera Calibration Sebastian Thrun,
Camera calibration Digital Visual Effects Yung-Yu Chuang with slides by Richard Szeliski, Steve Seitz,, Fred Pighin and Marc Pollefyes.
Geometric Camera Models
Vision Review: Image Formation Course web page: September 10, 2002.
Project 2 –contact your partner to coordinate ASAP –more work than the last project (> 1 week) –you should have signed up for panorama kitssigned up –sign.
Peripheral drift illusion. Multiple views Hartley and Zisserman Lowe stereo vision structure from motion optical flow.
Single-view geometry Odilon Redon, Cyclops, 1914.
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)
Single-view geometry Odilon Redon, Cyclops, 1914.
Project 1 Due NOW Project 2 out today –Help session at end of class Announcements.
Example: warping triangles Given two triangles: ABC and A’B’C’ in 2D (12 numbers) Need to find transform T to transfer all pixels from one to the other.
Project 2 went out on Tuesday You should have a partner You should have signed up for a panorama kit Announcements.
Lecture 14: Projection CS4670 / 5670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
Camera Calibration Course web page: vision.cis.udel.edu/cv March 24, 2003  Lecture 17.
Calibrating a single camera
More Mosaic Madness © Jeffrey Martin (jeffrey-martin.com)
Digital Visual Effects, Spring 2007 Yung-Yu Chuang 2007/4/17
Digital Visual Effects, Spring 2006 Yung-Yu Chuang 2005/4/19
Digital Visual Effects, Spring 2008 Yung-Yu Chuang 2008/4/15
More Mosaic Madness : Computational Photography
More Mosaic Madness © Jeffrey Martin (jeffrey-martin.com)
Lecture 13: Cameras and geometry
Digital Visual Effects Yung-Yu Chuang
Announcements Midterm out today Project 1 demos.
Projective geometry Readings
More Mosaic Madness © Jeffrey Martin (jeffrey-martin.com)
Projection Readings Nalwa 2.1.
Credit: CS231a, Stanford, Silvio Savarese
Single-view geometry Odilon Redon, Cyclops, 1914.
Camera Calibration Reading:
Announcements Project 2 extension: Friday, Feb 8
Presentation transcript:

Last 4 lectures Camera Structure HDR Image Filtering Image Transform

Today Camera Projection Camera Calibration

Pinhole camera

Pinhole camera model (optical center) origin principal point P (X,Y,Z) p (x,y) The coordinate system –We will use the pin-hole model as an approximation –Put the optical center (Center Of Projection) at the origin –Put the image plane (Projection Plane) in front of the COP (Why?)

Pinhole camera model principal point

Pinhole camera model (optical center) origin principal point P (X,Y,Z) p (x,y) x y

Pinhole camera model (optical center) origin principal point P (X,Y,Z) p (x,y) x y

Intrinsic matrix non-square pixels (digital video) Is this form of K good enough?

Intrinsic matrix non-square pixels (digital video) skew Is this form of K good enough?

Intrinsic matrix non-square pixels (digital video) skew radial distortion Is this form of K good enough?

Distortion Radial distortion of the image –Caused by imperfect lenses –Deviations are most noticeable for rays that pass through the edge of the lens

Barrel Distortion No distortion Barrel Wide Angle Lens

Pin Cushion Distortion Pin cushion Telephoto lens No distortion

Modeling distortion To model lens distortion –Use above projection operation instead of standard projection matrix multiplication 2. Apply radial distortion 3. Apply focal length translate image center 1. Project (X, Y, Z) to “normalized” image coordinates Distortion-Free:With Distortion:

Camera rotation and translation extrinsic matrix

Two kinds of parameters internal or intrinsic parameters: focal length, optical center, skew external or extrinsic (pose): rotation and translation:

Other projection models

Orthographic projection Special case of perspective projection –Distance from the COP to the PP is infinite Image World –Also called “parallel projection”: (x, y, z) → (x, y)

Other types of projections Scaled orthographic –Also called “weak perspective” Affine projection –Also called “paraperspective”

Fun with perspective

Perspective cues

Fun with perspective Ames room

Forced perspective in LOTR Elijah Wood: 5' 6" (1.68 m)Ian McKellen 5' 11" (1.80 m)

Camera calibration

Estimate both intrinsic and extrinsic parameters Mainly, two categories: 1.Using objects with known geometry as reference 2.Self calibration (structure from motion)

Camera calibration approaches Directly estimate 11 unknowns in the M matrix using known 3D points (Xi,Yi,Zi) and measured feature positions (ui,vi)

Linear regression

Solve for Projection Matrix M using least- square techniques

Normal equation (Geometric Interpretation) Given an overdetermined system the normal equation is that which minimizes the sum of the square differences between left and right sides

Normal equation (Differential Interpretation) n x m, n equations, m variables

Normal equation Who invented Least Square? Carl Friedrich Gauss

Nonlinear optimization A probabilistic view of least square Feature measurement equations Likelihood of M given {(u i,v i )}

Optimal estimation Log likelihood of M given {(u i,v i )} It is a least square problem (but not necessarily linear least square) How do we minimize C?

Nonlinear least square methods

Least square fitting number of data points number of parameters

Nonlinear least square fitting

Function minimization It is very hard to solve in general. Here, we only consider a simpler problem of finding local minimum. Least square is related to function minimization.

Function minimization

Quadratic functions Approximate the function with a quadratic function within a small neighborhood

Function minimization

Computing gradient and Hessian Gradient Hessian

Computing gradient and Hessian Gradient Hessian

Computing gradient and Hessian Gradient Hessian

Computing gradient and Hessian Gradient Hessian

Computing gradient and Hessian Gradient Hessian

Searching for update h GradientHessian Idea 1: Steepest Descent

Steepest descent method isocontourgradient

Steepest descent method It has good performance in the initial stage of the iterative process. Converge very slow with a linear rate.

Searching for update h GradientHessian Idea 2: minimizing the quadric directly Converge faster but needs to solve the linear system

Recap: Calibration Directly estimate 11 unknowns in the M matrix using known 3D points (Xi,Yi,Zi) and measured feature positions (ui,vi) Camera Model:

Recap: Calibration Directly estimate 11 unknowns in the M matrix using known 3D points (Xi,Yi,Zi) and measured feature positions (ui,vi) Linear Approach:

Recap: Calibration Directly estimate 11 unknowns in the M matrix using known 3D points (Xi,Yi,Zi) and measured feature positions (ui,vi) NonLinear Approach:

Practical Issue is hard to make and the 3D feature positions are difficult to measure!

A popular calibration tool

Multi-plane calibration Images courtesy Jean-Yves Bouguet, Intel Corp. Advantage Only requires a plane Don’t have to know positions/orientations Good code available online! –Intel’s OpenCV library: –Matlab version by Jean-Yves Bouget: –Zhengyou Zhang’s web site:

Step 1: data acquisition

Step 2: specify corner order

Step 3: corner extraction

Step 4: minimize projection error

Step 4: camera calibration

Step 5: refinement