CS485/685 Computer Vision Prof. George Bebis

Slides:



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

3D reconstruction.
CS 691 Computational Photography Instructor: Gianfranco Doretto 3D to 2D Projections.
Three Dimensional Viewing
Camera Calibration. Issues: what are intrinsic parameters of the camera? what is the camera matrix? (intrinsic+extrinsic) General strategy: view calibration.
Computer vision. Camera Calibration Camera Calibration ToolBox – Intrinsic parameters Focal length: The focal length in pixels is stored in the.
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.
3D Vision Topic 1 of Part II Camera Models CSC I6716 Fall 2010
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
Announcements. Projection Today’s Readings Nalwa 2.1.
Used slides/content with permission from
Lecture 5: Projection CS6670: Computer Vision Noah Snavely.
Uncalibrated Geometry & Stratification Sastry and Yang
Image Formation1 Projection Geometry Radiometry (Image Brightness) - to be discussed later in SFS.
3-D Geometry.
Camera model Relation between pixels and rays in space ?
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.
Computer Vision : CISC4/689
Multiple View Geometry Marc Pollefeys University of North Carolina at Chapel Hill Modified by Philippos Mordohai.
Lecture 13: Projection, Part 2
Lecture 12: Projection CS4670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
Lecture 6: Image Warping and Projection CS6670: Computer Vision Noah Snavely.
The Pinhole Camera Model
MSU CSE 803 Fall 2008 Stockman1 CV: 3D sensing and calibration Coordinate system changes; perspective transformation; Stereo and structured light.
The Image Formation Pipeline
CS223b, Jana Kosecka Rigid Body Motion and Image Formation.
Camera Calibration CS485/685 Computer Vision Prof. Bebis.
CS4670 / 5670: Computer Vision KavitaBala Lecture 15: Projection “The School of Athens,” Raphael.
Camera parameters Extrinisic parameters define location and orientation of camera reference frame with respect to world frame Intrinsic parameters define.
1 Digital Images WorldCameraDigitizer Digital Image (i) What determines where the image of a 3D point appears on the 2D image? (ii) What determines how.
Cameras, lenses, and calibration
Image formation & Geometrical Transforms Francisco Gómez J MMS U. Central y UJTL.
Instance-level recognition I. - Camera geometry and image alignment Josef Sivic INRIA, WILLOW, ENS/INRIA/CNRS UMR 8548 Laboratoire.
Lecture 14: Projection CS4670 / 5670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
Euclidean cameras and strong (Euclidean) calibration Intrinsic and extrinsic parameters Linear least-squares methods Linear calibration Degenerate point.
Camera Geometry and Calibration Thanks to Martial Hebert.
Image Formation Fundamentals Basic Concepts (Continued…)
Geometric Camera Models and Camera Calibration
Course 12 Calibration. 1.Introduction In theoretic discussions, we have assumed: Camera is located at the origin of coordinate system of scene.
Geometric Models & Camera Calibration
University of Palestine Faculty of Applied Engineering and Urban Planning Software Engineering Department Introduction to computer vision Chapter 2: Image.
Geometric Camera Models
Vision Review: Image Formation Course web page: September 10, 2002.
Lecture 03 15/11/2011 Shai Avidan הבהרה : החומר המחייב הוא החומר הנלמד בכיתה ולא זה המופיע / לא מופיע במצגת.
Affine Structure from Motion
Single-view geometry Odilon Redon, Cyclops, 1914.
CS-498 Computer Vision Week 7, Day 2 Camera Parameters Intrinsic Calibration  Linear  Radial Distortion (Extrinsic Calibration?) 1.
A Flexible New Technique for Camera Calibration Zhengyou Zhang Sung Huh CSPS 643 Individual Presentation 1 February 25,
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)
12/24/2015 A.Aruna/Assistant professor/IT/SNSCE 1.
Computer vision: models, learning and inference M Ahad Multiple Cameras
Single-view geometry Odilon Redon, Cyclops, 1914.
Digital Image Processing Additional Material : Imaging Geometry 11 September 2006 Digital Image Processing Additional Material : Imaging Geometry 11 September.
Robotics Chapter 6 – Machine Vision Dr. Amit Goradia.
Lecture 14: Projection CS4670 / 5670: Computer Vision Noah Snavely “The School of Athens,” Raphael.
3D Computer Vision 3D Vision Lecture 3 - Part 1 Camera Models Spring 2006 Zhang Aiwu.
Lecture 18: Cameras CS4670 / 5670: Computer Vision KavitaBala Source: S. Lazebnik.
Nazar Khan PUCIT Lecture 19
Rendering Pipeline Fall, 2015.
Geometric Model of Camera
PERSPECTIVE PROJECTION…...
CSCE 441 Computer Graphics 3-D Viewing
Three Dimensional Viewing
Geometric Camera Models
Multiple View Geometry for Robotics
Announcements Midterm out today Project 1 demos.
Credit: CS231a, Stanford, Silvio Savarese
The Pinhole Camera Model
Presentation transcript:

CS485/685 Computer Vision Prof. George Bebis Camera Parameters CS485/685 Computer Vision Prof. George Bebis

CCD array and frame buffer The physical image plane is the CCD array of n x m rectangular grid of photo-sensors. The pixel image plane (frame buffer) is an array of N x M integer values (pixels).

CCD array and frame buffer (cont’d) The position of the same point on the image plane will be different if measured in CCD elements (x, y) or image pixels (xim, yim). (assuming that the origin in both cases is the upper-left corner) (xim, yim) measured in pixels (x, y) measured in millimeters.

Reference Frames Five reference frames are needed in general for 3D scene analysis. Object World Camera Image Pixel

(1) Object Coordinate Frame 3D coordinate system: (xb, yb, zb) Useful for modeling objects (i.e., check if a particular hole is in proper position relative to other holes) Object coordinates do not change regardless how the object is placed in the scene. Our notation: (Xo, Yo, Zo)T

(2) World Coordinate Frame 3D coordinate system: (xw, yw, zw) Useful for interrelating objects in 3D Our notation: (Xw, Yw, Zw)T

(3) Camera Coordinate Frame 3D coordinate system: (xc, yc, zc) Useful for representing objects with respect to the location of the camera. Our notation: (Xc, Yc, Zc)T

(4) Image Plane Coordinate Frame (i.e., CCD plane) 2D coordinate system: (x f , y f ) Describes the coordinates of 3D points projected on the image plane. Our notation: (x, y)T

(5) Pixel Coordinate Frame 2D coordinate system: (c, r) Each pixel in this frame has integer pixel coordinates. y Our notation: (xim, yim)T x

Transformations between frames

World and Camera coordinate systems In general, the world and camera coordinate systems are not aligned. center of projection optical axis

World and Camera coordinate systems (cont’d) To simplify mathematics, let’s assume: (1) The center of projection coincides with the origin of the world coordinate system. (2) The optical axis is aligned with the world’s z-axis and x,y are parallel with X, Y Z Y X y x

World and Camera coordinate systems (cont’d) (3) Avoid image inversion by assuming that the image plane is in front of the center of projection. (4) The origin of the image plane is the principal point. center of projection

Terminology - Summary The model consists of a plane (image plane) and a 3D point O (center of projection). The distance f between the image plane and the center of projection O is the focal length (e.g., the distance between the lens and the CCD array). center of projection

Terminology - Summary (cont’d) The line through O and perpendicular to the image plane is the optical axis. The intersection of the optical axis with the image plane is called principal point. center of projection Note: the principal point is not necessarily the image center.

The equations of perspective projection Y X Z

The equations of perspective projection (cont’d) Using matrix notation: Verify the correctness of the above matrix homogenize using w = Z 1 1/f or

Properties of perspective projection Many-to-one mapping The projection of a point is not unique Any point on the line OP has the same projection

Properties of perspective projection (cont’d) Scaling/Foreshortening Object’s image size is inversely proportional to the distance of the object from the camera.

Properties of perspective projection (cont’d) When a line (or surface) is parallel to the image plane, the effect of perspective projection is scaling. When an line (or surface) is not parallel to the image plane, the effect is foreshortening (i.e., perspective distortion).

Properties of perspective projection (cont’d) Effect of focal length As f gets smaller, more points project onto the image plane (wide-angle camera). As f gets larger, the field of view becomes smaller (more telescopic).

Properties of perspective projection (cont’d) What happens to lines, distances, angles and parallelism? Lines in 3D project to lines in 2D (with an exception …) Distances and angles are not preserved. Parallel lines do not in general project to parallel lines due to foreshortening (unless they are parallel to the image plane).

Properties of perspective projection (cont’d) Vanishing point: Parallel lines in space project perspectively onto lines that on extension intersect at a single point in the image plane called vanishing point (or point at infinity). The vanishing point of a line depends on the orientation of the line and not on the position of the line. Note: vanishing points might lie outside of the image plane!

Properties of perspective projection (cont’d) Alternative definition for vanishing point: The vanishing point of any given line in space is located at the point in the image where a parallel line through the center of projection intersects the image plane.

Properties of perspective projection (cont’d) Vanishing line: The vanishing points of all the lines that lie on the same plane form the vanishing line. Also defined by the intersection of a parallel plane through the center of projection with the image plane. vanishing line

Orthographic Projection The projection of a 3D object onto a plane by a set of parallel rays orthogonal to the image plane. It is the limit of perspective projection as

Orthographic Projection (cont’d) Using matrix notation: Verify the correctness of the above matrix (homogenize using w=1):

Properties of orthographic projection Parallel lines project to parallel lines. Size does not change with distance from the camera.

Weak-perspective projection Approximate perspective projection by scaled orthographic projection (i.e., linear transformation). Good approximation if: (1) the object lies close to the optical axis. (2) the object’s dimensions are small compared to its average distance from the camera

Weak perspective projection (cont’d) The term is a scale factor now (e.g., every point is scaled by the same factor). Using matrix notation: Verify - homogenize using

What assumptions have we made so far? Camera and world coordinate systems have been aligned (i.e., all distances are measured in the camera’s reference frame). The origin of the image plane is the principal point.

World – Pixel Coordinates In general, world and pixel coordinates are related by additional parameters such as: the position and orientation of the camera the focal length of the lens the position of the principal point the size of the pixels

Types of parameters Extrinsic: the parameters that define the location and orientation of the camera reference frame with respect to a known world reference frame. Intrinsic: the parameters necessary to link the pixel coordinates of an image point with the corresponding coordinates in the camera reference frame.

Types of parameters (cont’d)

Extrinsic camera parameters Describe the transformation between the unknown camera reference frame and the known world reference frame. Typically, determining these parameters means: (1) find the translation vector that maps the camera’s origin to the world’s origin. (2) find the rotation matrix that aligns the camera’s axes with the world’s axes. RT, T R, -T

Extrinsic camera parameters (cont’d) Using the extrinsic camera parameters, we can find the relation between the coordinates of a point P in world (Pw) and camera (Pc) coordinates:

Extrinsic camera parameters (cont’d) or where RiT corresponds to the i-th row of the rotation matrix

Intrinsic camera parameters Characterize the geometric, digital, and optical characteristics of the camera: (1) the perspective projection (focal length f ). (2) the transformation between image plane coordinates and pixel coordinates. (3) the geometric distortion introduced by the optics.

Intrinsic camera parameters (1) From Camera Coordinates to Image Plane Coordinates: perspective projection:

Intrinsic camera parameters (cont’d) (2) From Image Plane Coordinates to Pixel coordinates (ox , oy) are the coordinates of the principal point e.g., ox = N/2, oy = M/2 if the principal point is the center of the image sx , sy correspond to the effective size of the pixels in the horizontal and vertical directions (in millimeters)

Intrinsic camera parameters (cont’d) Using matrix notation:

Intrinsic camera parameters (cont’d) (3) Relating pixel coordinates to world coordinates or f/sx f/sy

Intrinsic camera parameters (cont’d) Image distortions due to optics (1) Radial distortion: k1, k2, and k3 are intrinsic parameters

Correcting radial distortion

Intrinsic camera parameters (cont’d) Image distortions due to optics (2) Tangential distortion: p1 and p2 are intrinsic parameters 45

Combine extrinsic with intrinsic camera parameters The matrix containing the intrinsic camera parameters (not including distortion parameters for simplicity): The matrix containing the extrinsic camera parameters:

Combine extrinsic with intrinsic camera parameters (cont’d) Using homogeneous coordinates: M is called the projection matrix (i.e., 3 x 4 matrix).

Combine extrinsic with intrinsic camera parameters (cont’d) Warning: homogenization is required to obtain the pixel coordinates:

Perspective projection - revisited Assuming ox = oy = 0 and sx = sy = 1 Verify: M  Mp Homogenize: √

Weak-perspective projection - revisited M  Mwp where is the centroid of the object (i.e., average distance from the camera) Verify: √ Homogenize: