Linear Algebra and SVD (Some slides adapted from Octavia Camps)

Slides:



Advertisements
Similar presentations
6.4 Best Approximation; Least Squares
Advertisements

3D Geometry for Computer Graphics
CS 691 Computational Photography Instructor: Gianfranco Doretto Image Warping.
Announcements. Structure-from-Motion Determining the 3-D structure of the world, and/or the motion of a camera using a sequence of images taken by a moving.
COMPUTER GRAPHICS 2D TRANSFORMATIONS.
Computer Graphics Lecture 4 Geometry & Transformations.
Transformations We want to be able to make changes to the image larger/smaller rotate move This can be efficiently achieved through mathematical operations.
Geometric Transformations
Mapping: Scaling Rotation Translation Warp
Transformations II Week 2, Wed Jan 17
Geometry (Many slides adapted from Octavia Camps and Amitabh Varshney)
2D Geometric Transformations
Shivkumar Kalyanaraman Rensselaer Polytechnic Institute 1 : “shiv rpi” Linear Algebra A gentle introduction Linear Algebra has become as basic and as applicable.
Computer Graphics Recitation 5.
CS 4731: Computer Graphics Lecture 7: Introduction to Transforms, 2D transforms Emmanuel Agu.
Elementary 3D Transformations - a "Graphics Engine" Transformation procedures Transformations of coordinate systems Translation Scaling Rotation.
Announcements Problem Set 2, handed out today, due next Tuesday. Late Homework should be turned into my office with date and time written on it. Mail problem.
Invariants. Definitions and Invariants A definition of a class means that given a list of properties: –For all props, all objects have that prop. –No.
1 CSCE 441 Computer Graphics: 2D Transformations Jinxiang Chai.
Motion Analysis (contd.) Slides are from RPI Registration Class.
Structure-from-Motion Determining the 3-D structure of the world, and/or the motion of a camera using a sequence of images taken by a moving camera. –Equivalently,
Announcements Class mailing list: send to Hyoungjune Yi: Homework at the end of class. Text is on reserve in the.
Linear Algebra Review. 6/26/2015Octavia I. Camps2 Why do we need Linear Algebra? We will associate coordinates to –3D points in the scene –2D points in.
© 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.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
Math for CSLecture 11 Mathematical Methods for Computer Science Lecture 1.
Transformations CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
CS6825: Linear Algebra Overview 2 Why do we need Linear Algebra? We will associate coordinates to We will associate coordinates to 3D points in the scene3D.
2D Transformations x y x y x y. 2D Transformation Given a 2D object, transformation is to change the object’s Position (translation) Size (scaling) Orientation.
2D Transformations Unit - 3. Why Transformations? In graphics, once we have an object described, transformations are used to move that object, scale it.
3D Graphics Goal: To produce 2D images of a mathematically described 3D environment Issues: –Describing the environment: Modeling (mostly later) –Computing.
CS 450: Computer Graphics 2D TRANSFORMATIONS
Linear Algebra Review By Tim K. Marks UCSD Borrows heavily from: Jana Kosecka Virginia de Sa (UCSD) Cogsci 108F Linear.
COS 397 Computer Graphics Svetla Boytcheva AUBG, Spring 2013.
Matlab tutorial and Linear Algebra Review Today’s goals: Learn enough matlab to get started. Review some basics of Linear Algebra Essential for geometry.
CS 480/680 Computer Graphics Representation Dr. Frederick C Harris, Jr. Fall 2012.
Geometric Transformation. So far…. We have been discussing the basic elements of geometric programming. We have discussed points, vectors and their operations.
Transformations Dr. Amy Zhang.
CS 480/680 Computer Graphics Transformations Dr. Frederick C Harris, Jr.
Graphics Graphics Korea University cgvr.korea.ac.kr 2D Geometric Transformations 고려대학교 컴퓨터 그래픽스 연구실.
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.
CSE 681 Review: Transformations. CSE 681 Transformations Modeling transformations build complex models by positioning (transforming) simple components.
Transformations Jehee Lee Seoul National University.
16/5/ :47 UML Computer Graphics Conceptual Model Application Model Application Program Graphics System Output Devices Input Devices API Function.
Geometric Transformations
2D Geometric Transformation Translation A translation is applied to an object by repositioning it along a straight-line path from one coordinate location.
3D Transformation A 3D point (x,y,z) – x,y, and z coordinates
Fall 2004CS-321 Dr. Mark L. Hornick 1 2-D Transformations World Coordinates Local/Modelling Coordinates x y Object descriptions Often defined in model.
Computer Graphics Matrices
Learning Objectives Affine transformations Affine transformations Translation Translation Rotation Rotation Scaling Scaling Reflection Reflection Shear.
Jinxiang Chai CSCE441: Computer Graphics 3D Transformations 0.
Computer Graphics I, Fall 2010 Transformations.
w v The reflection of throughvw Reflection is a linear transformation Find a matrix M such that M = v The reflection of through y = mxv.
Computer Graphics Lecture 11 2D Transformations I Taqdees A. Siddiqi
Geometric Transformations Ceng 477 Introduction to Computer Graphics Computer Engineering METU.
CSCE 441 Computer Graphics: 2D Transformations
Transformations. Transformations Introduce standard transformations ◦ Rotation ◦ Translation ◦ Scaling ◦ Shear Derive homogeneous coordinate transformation.
Modeling Transformation
Robotic Arms and Matrices By Chris Wong and Chris Marino.
CPT450 – Computer Graphics
Transforms.
Review: Transformations
Review: Transformations
Lecture 7 Geometric Transformations (Continued)
Homogeneous Coordinates (Projective Space)
Computer Graphics Transformations
Linear Algebra Review.
CSC4820/6820 Computer Graphics Algorithms Ying Zhu Georgia State University Transformations.
Chapter IV Spaces and Transforms
Presentation transcript:

Linear Algebra and SVD (Some slides adapted from Octavia Camps)

Goals Represent points as column vectors. Represent motion as matrices. Move geometric objects with matrix multiplication. Introduce SVD

Euclidean transformations

2D Translation t P P’

2D Translation Equation P x y txtxtxtx tytytyty P’ t

2D Translation using Matrices P x y txtxtxtx tytytyty P’ t tP

Scaling P P’

Scaling Equation P x y s.x P’ s.y

Rotation P P’

Rotation Equations Counter-clockwise rotation by an angle  P x Y’ P’  X’ y

Why does multiplying points by R rotate them? Think of the rows of R as a new coordinate system. Taking inner products of each points with these expresses that point in that coordinate system. This means rows of R must be orthonormal vectors (orthogonal unit vectors). Think of what happens to the points (1,0) and (0,1). They go to (cos theta, -sin theta), and (sin theta, cos theta). They remain orthonormal, and rotate clockwise by theta. Any other point, (a,b) can be thought of as a(1,0) + b(0,1). R(a(1,0)+b(0,1) = Ra(1,0) + Ra(0,1) = aR(1,0) + bR(0,1). So it’s in the same position relative to the rotated coordinates that it was in before rotation relative to the x, y coordinates. That is, it’s rotated.

Degrees of Freedom R is 2x2 4 elements BUT! There is only 1 degree of freedom:  The 4 elements must satisfy the following constraints:

Transformations can be composed Matrix multiplication is associative. Combine series of transformations into one matrix. (example, whiteboard). In general, the order matters. (example, whiteboard). 2D Rotations can be interchanged. Why?

Rotation and Translation cos  -sin  tx sin  cos  ty 001 ( ) ( x y 1 ) a-btx baty 001 ( ) ( x y 1 ) Rotation, Scaling and Translation

Rotation about an arbitrary point Can translate to origin, rotate, translate back. (example, whiteboard). This is also rotation with one translation. –Intuitively, amount of rotation is same either way. –But a translation is added.

Stretching Equation P x y S x.x P’ S y.y

Stretching = tilting and projecting (with weak perspective)

SVD For any matrix, M = R 1 DR 2 –R 1, R 2 are rotation matrices –D is a diagonal matrix. –This decomposition is unique. –Efficient algorithms can compute this (in matlab, svd).

Linear Transformation SVD

Affine Transformation

Simple 3D Rotation Rotation about z axis. Rotates x,y coordinates. Leaves z coordinates fixed.

Full 3D Rotation Any rotation can be expressed as combination of three rotations about three axes. Rows (and columns) of R are orthonormal vectors. R has determinant 1 (not -1).

Intuitively, it makes sense that 3D rotations can be expressed as 3 separate rotations about fixed axes. Rotations have 3 degrees of freedom; two describe an axis of rotation, and one the amount. Rotations preserve the length of a vector, and the angle between two vectors. Therefore, (1,0,0), (0,1,0), (0,0,1) must be orthonormal after rotation. After rotation, they are the three columns of R. So these columns must be orthonormal vectors for R to be a rotation. Similarly, if they are orthonormal vectors (with determinant 1) R will have the effect of rotating (1,0,0), (0,1,0), (0,0,1). Same reasoning as 2D tells us all other points rotate too. Note if R has determinant -1, then R is a rotation plus a reflection.

3D Rotation + Translation Just like 2D case