Linear Algebra Review Octavia I Camps Why do
Linear Algebra Review Octavia I. Camps
Why do we need Linear Algebra? • We will associate coordinates to – 3 D points in the scene – 2 D points in the CCD array – 2 D points in the image • Coordinates will be used to – Perform geometrical transformations – Associate 3 D with 2 D points • Images are matrices of numbers – We will find properties of these numbers 9/25/2020 Octavia I. Camps 2
Matrices Sum: A and B must have the same dimensions Example: 9/25/2020 Octavia I. Camps 3
Matrices Product: A and B must have compatible dimensions Examples: 9/25/2020 Octavia I. Camps 4
Matrices Transpose: If A is symmetric Examples: 9/25/2020 Octavia I. Camps 5
Matrices Determinant: A must be square Example: 9/25/2020 Octavia I. Camps 6
Matrices Inverse: A must be square Example: 9/25/2020 Octavia I. Camps 7
2 D Vector x 2 v x 1 Magnitude: If P Is a UNIT vector , Is a unit vector Orientation: 9/25/2020 Octavia I. Camps 8
Vector Addition v 9/25/2020 V+w w Octavia I. Camps 9
Vector Subtraction v 9/25/2020 V-w w Octavia I. Camps 10
Scalar Product av v 9/25/2020 Octavia I. Camps 11
Inner (dot) Product v w The inner product is a SCALAR! 9/25/2020 Octavia I. Camps 12
Orthonormal Basis P x 2 j v i 9/25/2020 x 1 Octavia I. Camps 13
Vector (cross) Product u w v The cross product is a VECTOR! Magnitude: Orientation: 9/25/2020 Octavia I. Camps 14
Vector Product Computation u w v 9/25/2020 Octavia I. Camps 15
2 D Geometrical Transformations Octavia I. Camps
2 D Translation P’ t P 9/25/2020 Octavia I. Camps 17
2 D Translation Equation ty P P’ t y x 9/25/2020 tx Octavia I. Camps 18
2 D Translation using Matrices ty P P’ t y x 9/25/2020 t tx Octavia I. Camps P 19
Homogeneous Coordinates • Multiply the coordinates by a non-zero scalar and add an extra coordinate equal to that scalar. For example, • NOTE: If the scalar is 1, there is no need for the multiplication! 9/25/2020 Octavia I. Camps 20
Back to Cartesian Coordinates: • Divide by the last coordinate and eliminate it. For example, 9/25/2020 Octavia I. Camps 21
2 D Translation using Homogeneous Coordinates ty P P’ t t P y x 9/25/2020 tx Octavia I. Camps 22
Scaling P’ P 9/25/2020 Octavia I. Camps 23
Scaling Equation P’ Sy. y P y x 9/25/2020 Sx. x Octavia I. Camps 24
Scaling & Translating S P’’=T. P P’=S. P T P P’’=T. P’=T. (S. P)=(T. S). P 9/25/2020 Octavia I. Camps 25
Scaling & Translating P’’=T. P’=T. (S. P)=(T. S). P 9/25/2020 Octavia I. Camps 26
Translating & Scaling & Translating P’’=S. P’=S. (T. P)=(S. T). P 9/25/2020 Octavia I. Camps 27
Rotation P P’ 9/25/2020 Octavia I. Camps 28
Rotation Equations Counter-clockwise rotation by an angle Y’ P’ P y X’ 9/25/2020 x Octavia I. Camps 29
Degrees of Freedom R is 2 x 2 4 elements BUT! There is only 1 degree of freedom: The 4 elements must satisfy the following constraints: 9/25/2020 Octavia I. Camps 30
Scaling, Translating & Rotating Order matters! P’ = S. P P’’=T. P’=(T. S). P P’’’=R. P”=R. (T. S). P=(R. T. S). P R. T. S R. S. T T. S. R … 9/25/2020 Octavia I. Camps 31
3 D Rotation of Points Rotation around the coordinate axes, counter-clockwise: Y’ P’ g y X’ P x z 9/25/2020 Octavia I. Camps 32
3 D Rotation (axis & angle) 9/25/2020 Octavia I. Camps 33
3 D Translation of Points Translate by a vector t=(tx, ty, tx)T: P’ Y’ z’ z t x’ P x y 9/25/2020 Octavia I. Camps 34
- Slides: 34