Instructor: Mircea Nicolescu Lecture 9

Slides:



Advertisements
Similar presentations
Invariants (continued).
Advertisements

Computer Graphics Lecture 4 Geometry & Transformations.
Geometric Transformations
Systems of Linear Equations (see Appendix A.6, Trucco & Verri) CS485/685 Computer Vision Prof. George Bebis.
Mapping: Scaling Rotation Translation Warp
1 Computer Graphics Chapter 6 2D Transformations.
Dan Witzner Hansen  Groups?  Improvements – what is missing?
Structure from motion.
2D Geometric Transformations
Some useful linear algebra. Linearly independent vectors span(V): span of vector space V is all linear combinations of vectors v i, i.e.
Chapter 2 Basic Linear Algebra
2D/3D Geometric Transformations CS485/685 Computer Vision Dr. George Bebis.
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
CS485/685 Computer Vision Prof. George Bebis
3-D Geometry.
© 2003 by Davi GeigerComputer Vision October 2003 L1.1 Structure-from-EgoMotion (based on notes from David Jacobs, CS-Maryland) Determining the 3-D structure.
Previously Two view geometry: epipolar geometry Stereo vision: 3D reconstruction epipolar lines Baseline O O’ epipolar plane.
3D Geometry for Computer Graphics
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
The Pinhole Camera Model
Math for CSLecture 21 Solution of Linear Systems of Equations Consistency Rank Geometric Interpretation Gaussian Elimination Lecture 2. Contents.
Camera parameters Extrinisic parameters define location and orientation of camera reference frame with respect to world frame Intrinsic parameters define.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology 3D Engines and Scene Graphs Spring 2012.
CS 450: Computer Graphics 2D TRANSFORMATIONS
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
Linear Equations in Linear Algebra
Presentation by: H. Sarper
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
Euclidean cameras and strong (Euclidean) calibration Intrinsic and extrinsic parameters Linear least-squares methods Linear calibration Degenerate point.
Transformations Dr. Amy Zhang.
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.
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
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
视觉的三维运动理解 刘允才 上海交通大学 2002 年 11 月 16 日 Understanding 3D Motion from Images Yuncai Liu Shanghai Jiao Tong University November 16, 2002.
Matrices CHAPTER 8.1 ~ 8.8. Ch _2 Contents  8.1 Matrix Algebra 8.1 Matrix Algebra  8.2 Systems of Linear Algebra Equations 8.2 Systems of Linear.
Elementary Linear Algebra Anton & Rorres, 9th Edition
5.5 Row Space, Column Space, and Nullspace
Transformation.
University of Texas at Austin CS384G - Computer Graphics Fall 2008 Don Fussell Affine Transformations.
EECS 274 Computer Vision Affine Structure from Motion.
Computer Graphics 3D Transformations. Translation.
Geometric Transformations
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
3-D Geometric Transformations
CSCI 425/ D Mathematical Preliminaries. CSCI 425/525 2 Coordinate Systems Z X Y Y X Z Right-handed coordinate system Left-handed coordinate system.
Affine Geometry.
Matrices and Matrix Operations. Matrices An m×n matrix A is a rectangular array of mn real numbers arranged in m horizontal rows and n vertical columns.
Camera Model Calibration
Instructor: Mircea Nicolescu Lecture 8 CS 485 / 685 Computer Vision.
III- 1 III 3D Transformation Homogeneous Coordinates The three dimensional point (x, y, z) is represented by the homogeneous coordinate (x, y, z, 1) In.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Camera Calibration Course web page: vision.cis.udel.edu/cv March 24, 2003  Lecture 17.
CS 325 Introduction to Computer Graphics 02 / 19 / 2010 Instructor: Michael Eckmann.
4. Affine transformations. Reading Required:  Watt, Section 1.1. Further reading:  Foley, et al, Chapter  David F. Rogers and J. Alan Adams,
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
Image Warping 2D Geometric Transformations
Modeling Transformation
CSE 554 Lecture 8: Alignment
Lecture 16: Image alignment
3. Transformation
Homogeneous Coordinates (Projective Space)
2D transformations (a.k.a. warping)
Simultaneous Equations
TWO DIMENSIONAL TRANSFORMATION
The Pinhole Camera Model
Presentation transcript:

Instructor: Mircea Nicolescu Lecture 9 CS 485 / 685 Computer Vision Instructor: Mircea Nicolescu Lecture 9 Good afternoon and thank you everyone for coming. My talk today will describe the research I performed at the IRIS at USC, the object of this work being to build a computational framework that addresses the problem of motion analysis and interpretation.

Systems of Linear Equations An arbitrary system of m linear equations in n unknowns can be written as: where: or Example (m=n=2):

Solutions of Ax=b (m=n) Characterize the solutions of Ax = b using conditions on the rank of A and A|b (i.e., augmented matrix).

Solutions of Ax=b (m=n) The system has one solution if : rank(A|b) = rank(A) = n Solution: i.e., b can be expressed as a linear combination of the columns of A

Solutions of Ax=b (m=n) The following statements are equivalent: rank(A|b) = rank(A) = n A is invertible b has a unique expansion in the column space of A

Solving Ax=b Using SVD Ax=b Assuming that A=UDVT, then UDVTx=b or DVTx=UTb Setting VTx=z and UTb=d, we have Dz=d (1) Compute z=D-1d (assume no zeroes in the diagonal) (2) Compute solution x=Vz Ax=b

Solutions of Ax=b (m=n) (2) The system has no solution if rank(A|b) > rank(A) b cannot be expressed as a linear combination of the columns of A e.g., using substitution leads to the contradiction 16=9

Solutions of Ax=b (m=n) (3) The system has infinitely many solutions if rank(A|b) = rank(A) < n - Less equations than unknowns (i.e, free variables). - b can be expressed as a linear combination of the columns of A in more than one way.

Homogeneous System: Ax=0 (m=n) If b=0, then Ax=0 is called homogeneous. (1) Has the trivial solution x=0 iff rank(A) = n (i.e., A is invertible) (2) Has a non-trivial solution iff rank(A) < n (i.e., A is singular)

Over/Under-Determined Systems m>n m<n

Solving Ax=b (m>n) Consider the over-determined system of linear equations: Let r be the residual vector for some x: The vector x* which yields the smallest possible residual is called a least-squares solution:

Solving Ax=b (m>n) Although a least-squares solution always exist, it might not be unique! The least-squares solution x with the smallest norm ||x|| is unique and it is given by:

Solving Ax=b (m>n) – Example

Computing A+ Using SVD If ATA is ill-conditioned (or singular), we can use SVD to obtain a least squares solution as follows: where: (where t is a small threshold)

Homogeneous Systems The minimum-norm solution is x=0; need to modify the meaning of a least-squares solution by imposing the constraint: This is a "constrained" optimization problem:

Homogeneous Systems The solution for homogeneous systems is not always unique. Special case: Solution: (vn is the last column of V; the one corresponding to the smallest σ)

Homogeneous Systems General case: Solution: with +2 with (vn-k+1, …,vn are the last columns of V ; correspond to the smallest σ’s)

2D Translation Moves a point to a new location by adding translation amounts to the coordinates of the point. or or

2D Translation To translate an object, translate every point of the object by the same amount.

2D Scaling Changes the size of the object by multiplying the coordinates of the points by scaling factors. or or

2D Scaling Uniform vs non-uniform scaling Effect of scale factors:

2D Scaling Scaling with respect to an arbitrary point

2D Rotation Rotates points by an angle θ about origin (θ >0: counterclockwise rotation) From ABP triangle: C B A From ACP’ triangle:

2D Rotation From the above equations we have: or or

2D Rotation Rotation about an arbitrary point

Summary of 2D Transformations Use homogeneous coordinates to express translation as matrix multiplication

Homogeneous Coordinates Add one more coordinate: (x,y)  (xh, yh, w) Recover (x,y) by homogenizing (xh, yh, w): So, xh=xw, yh=yw, (x, y)  (xw, yw, w)

Homogeneous Coordinates (x, y) has multiple representations in homogeneous coordinates: w=1 (x,y)  (x,y,1) w=2 (x,y)  (2x,2y,2) All these points lie on a line in the space of homogeneous coordinates !! projective space

2D Translation Using Homogeneous Coordinates w=1

2D Translation Using Homogeneous Coordinates Successive translations:

2D Scaling Using Homogeneous Coordinates w=1

2D Scaling Using Homogeneous Coordinates Successive scalings:

2D Scaling Using Homogeneous Coordinates Scaling about an arbitrary point Decomposing the above transformation:

2D Rotation Using Homogeneous Coordinates w=1

2D Rotation Using Homogeneous Coordinates Successive rotations: or

2D Rotation Using Homogeneous Coordinates Rotation about an arbitrary point Decomposing the above transformation:

Composition of Transformations The transformation matrices of a series of transformations can be concatenated into a single transformation matrix. Example: * Translate P1 to origin * Perform scaling and rotation * Translate to P2

Composition of Transformations Important: preserve the order of transformations! translation + rotation rotation + translation Representing a sequence of transformations as a single transformation matrix is more efficient! (only 4 multiplications and 4 additions)

Special Cases of Transformations General form of a transformation matrix (projective transformation): Affine transformations Involve translations, rotations, scale, and shear Preserve parallelism of lines but not lengths and angles

Special Cases of Transformations Similarity transformations Involve rotation, translation, uniform scaling (4 parameters) Preserve angles and length ratios Rigid transformations Involve only translation and rotation (3 parameters) Preserve areas, angles and lengths

Special Cases of Transformations Rigid transformations – cont. Property: the upper 2x2 submatrix is orthonormal Example:

Special Cases of Transformations Shear transformations Change the shape of the object. Shear along the x-axis: Shear along the y-axis:

Affine vs Projective Transformations affine (6 parameters) projective (8 parameters) Under certain assumptions, affine transformations can be used to approximate the effects of perspective projection

3D Geometric Transformations Coordinate systems Right-handed vs. left-handed systems Positive rotation angles for right-handed systems

Homogeneous Coordinates Add one more coordinate: (x,y,z)  (xh, yh, zh,w) Recover (x,y,z) by homogenizing (xh, yh, zh,w): In general, xh=xw, yh=yw, zh=zw (x, y,z)  (xw, yw, zw, w) Each point (x, y, z) corresponds to a line in the 4D space of homogeneous coordinates.

3D Translation

3D Scaling

3D Rotation Rotation about the z-axis:

3D Rotation Rotation about the x-axis:

3D Rotation Rotation about the y-axis

Change of Coordinate Systems Suppose that the coordinates of P3 are given in the xyz coordinate system How can you compute its coordinates in the RxRyRz coordinate system? (1) Recover the translation T and rotation R from RxRyRz to xyz (that align RxRyRz with xyz) (2) Apply T and R on P3 to compute its coordinates in the RxRyRz system.

Recover Translation T If we know the coordinates of P1 (i.e., origin of RxRyRz) in the xyz coordinate system, then T is: ux uy uz 1 0 0 –P1x 0 1 0 –P1y 0 0 1 –P1z 0 0 0 1 T =

Recover Rotation R ux, uy, uz are unit vectors of the xyz coordinate system. rx, ry, rz are unit vectors of the RxRyRz coordinate system (rx, ry, rz are represented in the xyz coordinate system) Find rotation R that maps: rz uz , rxux, ry uy R ux uy uz

Recover Rotation R uz= ux= uy=

Recover Rotation R Thus, the rotation matrix R is given by:

Recover Rotation R Verify that it performs the correct mapping: rx  ux ry  uy rz  uz

Interest Points Interest point: a point in an image which has a well-defined position and can be robustly detected. Typically associated with a significant change of one or more image properties simultaneously (e.g., intensity, color, texture). 57

Interest Points and Corners A corner can be defined as the intersection of two or more edges (special case of interest points). In general, interest points could be: Isolated points of local intensity maximum or minimum Line endings Points on a curve where the curvature is locally maximized