Foundations of Computer Vision

Similar documents
Linear Algebra - Part II

Linear Algebra Review. Fei-Fei Li

CS 143 Linear Algebra Review

Linear Algebra Review. Fei-Fei Li

Background Mathematics (2/2) 1. David Barber

Large Scale Data Analysis Using Deep Learning

1 Linearity and Linear Systems

Properties of Linear Transformations from R n to R m

14 Singular Value Decomposition

Data Mining Lecture 4: Covariance, EVD, PCA & SVD

Linear Algebra & Geometry why is linear algebra useful in computer vision?

Deep Learning Book Notes Chapter 2: Linear Algebra

Econ Slides from Lecture 7

Linear Algebra for Machine Learning. Sargur N. Srihari

COMP 558 lecture 18 Nov. 15, 2010

Linear Algebra (Review) Volker Tresp 2017

Review of Linear Algebra

Review of Linear Algebra

Eigenvalues and diagonalization

Final Exam, Linear Algebra, Fall, 2003, W. Stephen Wilson

Linear Algebra (Review) Volker Tresp 2018

q n. Q T Q = I. Projections Least Squares best fit solution to Ax = b. Gram-Schmidt process for getting an orthonormal basis from any basis.

Linear Algebra Review. Vectors

Linear Algebra. Shan-Hung Wu. Department of Computer Science, National Tsing Hua University, Taiwan. Large-Scale ML, Fall 2016

Math Bootcamp An p-dimensional vector is p numbers put together. Written as. x 1 x =. x p

Dimensionality Reduction: PCA. Nicholas Ruozzi University of Texas at Dallas

Math 520 Exam 2 Topic Outline Sections 1 3 (Xiao/Dumas/Liaw) Spring 2008

UNIT 6: The singular value decomposition.

Mathematical foundations - linear algebra

Properties of Matrices and Operations on Matrices

(a) If A is a 3 by 4 matrix, what does this tell us about its nullspace? Solution: dim N(A) 1, since rank(a) 3. Ax =

Review problems for MA 54, Fall 2004.

Solutions to Final Practice Problems Written by Victoria Kala Last updated 12/5/2015

Linear Algebra & Geometry why is linear algebra useful in computer vision?

Image Registration Lecture 2: Vectors and Matrices

Conceptual Questions for Review

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017

Singular Value Decomposition and Principal Component Analysis (PCA) I

Remarks on Definitions

Lecture: Face Recognition and Feature Reduction

1. Linear systems of equations. Chapters 7-8: Linear Algebra. Solution(s) of a linear system of equations (continued)

Linear Algebra- Final Exam Review

Lecture 02 Linear Algebra Basics

Review of similarity transformation and Singular Value Decomposition

Multivariate Statistical Analysis

Example Linear Algebra Competency Test

Notes on singular value decomposition for Math 54. Recall that if A is a symmetric n n matrix, then A has real eigenvalues A = P DP 1 A = P DP T.

Singular Value Decomposition

Chap 3. Linear Algebra

Lecture: Face Recognition and Feature Reduction

MATH 423 Linear Algebra II Lecture 33: Diagonalization of normal operators.

22.3. Repeated Eigenvalues and Symmetric Matrices. Introduction. Prerequisites. Learning Outcomes

CS168: The Modern Algorithmic Toolbox Lecture #10: Tensors, and Low-Rank Tensor Recovery

Eigenvalues and Eigenvectors 7.1 Eigenvalues and Eigenvecto

B553 Lecture 5: Matrix Algebra Review

Glossary of Linear Algebra Terms. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

Introduction to Matrix Algebra

DS-GA 1002 Lecture notes 0 Fall Linear Algebra. These notes provide a review of basic concepts in linear algebra.

MIT Final Exam Solutions, Spring 2017

MATH 583A REVIEW SESSION #1

1. Let m 1 and n 1 be two natural numbers such that m > n. Which of the following is/are true?

Columbus State Community College Mathematics Department Public Syllabus

Singular Value Decomposition (SVD)

CS 246 Review of Linear Algebra 01/17/19

Linear Algebra and Dirac Notation, Pt. 3

Final Review Written by Victoria Kala SH 6432u Office Hours R 12:30 1:30pm Last Updated 11/30/2015

Lecture 3: Review of Linear Algebra

Lecture 3: Review of Linear Algebra

1 Last time: least-squares problems

MAT 1302B Mathematical Methods II

15 Singular Value Decomposition

Exercises * on Principal Component Analysis

Cheng Soon Ong & Christian Walder. Canberra February June 2017

Maths for Signals and Systems Linear Algebra in Engineering

Systems of Algebraic Equations and Systems of Differential Equations

Name Solutions Linear Algebra; Test 3. Throughout the test simplify all answers except where stated otherwise.

MA 575 Linear Models: Cedric E. Ginestet, Boston University Regularization: Ridge Regression and Lasso Week 14, Lecture 2

Econ 204 Supplement to Section 3.6 Diagonalization and Quadratic Forms. 1 Diagonalization and Change of Basis

Linear Algebra: Matrix Eigenvalue Problems

LINEAR ALGEBRA QUESTION BANK

A Brief Outline of Math 355

Matrix Vector Products

Lecture 13. Principal Component Analysis. Brett Bernstein. April 25, CDS at NYU. Brett Bernstein (CDS at NYU) Lecture 13 April 25, / 26

Recall the convention that, for us, all vectors are column vectors.

Stat 206: Linear algebra

LEC 2: Principal Component Analysis (PCA) A First Dimensionality Reduction Approach

SVD and its Application to Generalized Eigenvalue Problems. Thomas Melzer

. = V c = V [x]v (5.1) c 1. c k

2. Review of Linear Algebra

IV. Matrix Approximation using Least-Squares

MATH 20F: LINEAR ALGEBRA LECTURE B00 (T. KEMP)

Assignment 1 Math 5341 Linear Algebra Review. Give complete answers to each of the following questions. Show all of your work.

Introduction to Matrices

Elementary Linear Algebra

Math 308 Practice Final Exam Page and vector y =

Repeated Eigenvalues and Symmetric Matrices

Linear Algebra Formulas. Ben Lee

Knowledge Discovery and Data Mining 1 (VO) ( )

7. Symmetric Matrices and Quadratic Forms

Singular Value Decomposition. 1 Singular Value Decomposition and the Four Fundamental Subspaces

Transcription:

Foundations of Computer Vision Wesley. E. Snyder North Carolina State University Hairong Qi University of Tennessee, Knoxville Last Edited February 8, 2017 1

3.2. A BRIEF REVIEW OF LINEAR ALGEBRA Apply this operator to a scalar, f, and we get a vector which does have meaning, the gradient of f: ] T f =. (3.23) [ f x Similarly, if f is a vector, we may define the divergence using the inner (dot) product (in all the following definitions, only the two-dimensional form of the operator defined in Eq. 3.21 is used. However, remember that the same concepts apply to operators of arbitrary dimension): divf = f = [ x f ] [ f 1 f 2 ] = f 1 x + f 2. (3.24) We will also have opportunity to use the outer product of the operator with a matrix, which is the Jacobian: ] [ ] [ ] f1 f 2 f = f1 f 2 = x x. (3.25) [ x f 1 f 2 3.2.7 Eigenvalues and Eigenvectors If matrix A and vector x are conformable, then one may write the characteristic equation Ax = λx, λ R. (3.26) Since Ax is a linear operation, A may be considered as a transformation which maps x onto itself with only a change in length. There may be more than one eigenvalue 6, λ, which satisfies Eq. 3.26. For x R d, A will have exactly d eigenvalues (which are not, however, necessarily distinct). These may be found by solving det(a λi) = 0. (But for d > 2, we do not recommend this method. Use a numerical package instead.) Given some eigenvalue λ, which satisfies Eq. 3.26, the corresponding x is called the corresponding eigenvector. 7 3.2.8 Eigendecomposition If a positive semidefinite matrix, A, is also symmetric, then it may be written as A = BB T for some matrix B. Many of the matrices encountered in Computer Vision are positive semidefinite. In particular, covariance matrices, which we will encounter several times, have this property. 6 Eigen- is the German prefix meaning principal or most important. These are NOT named for Mr. Eigen. 7 For any given matrix, there are only a few eigenvalue/eigenvector pairs. 64

CHAPTER 3. REVIEW OF MATHEMATICAL PRINCIPLES Assuming we know how to compute eigenvalues and eigenvectors, a positive semidefinite matrix can be written as A = EΛE T, (3.27) where E is a matrix in which each column is an eigenvector of A, and Λ is a square, diagonal matrix with corresponding eigenvalues on the diagonal. Should A not be positive semidefinite and symmetric, but still invertible, the form simply changes to A = EΛE 1, (3.28) We can find the null space easily by taking the eigendecomposition and considering all the eigenvectors which correspond to eigenvalues of zero. As an example, using the same matrix as we used in Eq. 3.7 earlier (which is NOT symmetric), we find A = 4 5 6 1 2 3 2 4 6 = 10.5826 0 0 0 1.4174 0 0 0 0.0000 0.7560 0.9469 0.4082 0.2927 0.1438 0.8165 0.5855 0.2877 0.4082 0.3727 0.6398 0.9069 0.7585 0.0884 0.9353 0.0000 0.9798 0.4899 Observe that the right column of E (the left-hand matrix) is the eigenvector corresponding to the zero eigenvalue, and it is precisely the null space we found in the example in section 3.2.3. Also note that because A is not symmetric, we had to use E 1 for the third matrix in the product. In this example, if we had two zero eigenvalues, the two corresponding eigenvectors would be a basis for the space of elements of the null space. That is, any vector which is a linear sum of those two vectors would be in the null space. But of course, this only works for square matrices! In the next section, we generalize this concept and develop singular value decomposition, or SVD. 3.2.9 Singular Value Decomposition While eigendecomposition is restricted to square matrices, SVD can be applied to any matrix. SVD decomposes a matrix A into the product of three matrices: A = UDV T, (3.29) where U and V are orthonormal matrices, and D is diagonal with values on the diagonal sorted from largest to smallest. 65

3.2. A BRIEF REVIEW OF LINEAR ALGEBRA To understand what this means, suppose you had a machine that could compute a matrix decomposition just as described in Eq. 3.29, and consider using it to decompose A. Now, since A = UDV T, we know that A T = V DU T. Multiplying A on the right by A T produces AA T = UDV T V DU T, but since V is orthonormal, V T V = I, and AA T may be written as AA T = UD 2 U T. (3.30) and the columns of U (see Eq. 3.27) will be the eigenvectors of AA T. Similarly, one can show that the columns of V will be the eigenvectors of A T A. D will be a diagonal matrix with the square root of the eigenvalues of A T A on the diagonal sorted in descending order 8. The diagonal elements of D are referred to as the singular values of A, so the singular values of A are the square roots of the eigenvalues of AA T. This observation tells us one way to compute the SVD: use eigendecomposition. But more important: eigendecomposition can only be applied to square matrices, and both AA T and A T A are square, for ANY matrix A. Now suppose our problem is to find the null space of a 3 3 matrix which is of rank 2, just like the problem in section 3.2.3. Using the same original matrix, we compute 77 32 64 21 30 39 AA T = 32 14 28, A T A = 30 45 60 (3.31) 64 28 56 39 60 81 Decomposing AA T using eigendecomposition, we find 0.7242 0.6896 0.0000 145.1397 0 0 AA T = 0.3084 0.3239 0.8944 0 1.8603 0 0.6168 0.6477 0.4472 0 0 0.0000 Similarly, the eigendecomposition of A T A is 0.3684 0.8352 0.4082 A T A = 0.5565 0.1536 0.8165 0.7447 0.5280 0.4082 8 All numerical packages that compute SVD do this type of sorting 0.7242 0.3084 0.6168 0.6896 0.3239 0.6477 0.0000 0.8944 0.4472 145.1397 0 0 0 1.8603 0 0 0 0.0000 0.3684 0.5565 0.7447 0.8352 0.1536 0.5280 0.4082 0.8165 0.4082 (3.32) (3.33) 66

CHAPTER 3. REVIEW OF MATHEMATICAL PRINCIPLES Choosing U from the eigenvectors of AA T and V from the eigenvectors of A T A, and taking the square roots of the diagonal elements of the center matrix of either one, we can write UΛV T = 0.7242 0.6896 0.0000 0.3084 0.3239 0.8944 0.6168 0.6477 0.4472 12.0474 0 0 0 1.3639 0 0 0 0 0.3684 0.5565 0.7447 0.8352 0.1536 0.5280 0.4082 0.8165 0.4082 (3.34) which is the SVD of A. Thinking about the null space of A, we realize that the null vector (in this particular case) of A is the column of V (or row of V T ) corresponding to the zero singular value., 3.3 Introduction to Function Minimization Minimization 9 of functions is a pervasive element of engineering: One is always trying to find the set of parameters which minimizes some function of those parameters. Notationally, we state the problem as: Find the vector ˆx which produces a minimum of some function H(x): Ĥ = min H(x) (3.35) ˆx where x is some d-dimensional parameter vector, and H is a scalar function of x, often referred to as an objective function. We denote the x which results in the minimal H as ˆx ˆx = arg min x H(x). (3.36) There are two distinct reasons for learning how to minimize a function: We may need to find a way to perform some process which has a minimal cost, minimal run time, minimal programming difficulty, etc. We may need to solve some problem that we don t (immediately) know how to solve. For example, we might seek to draw a contour in an image which separates dark areas from light areas with the additional desire that the regions should be as smooth as possible. 9 In this book, essentially EVERY computer vision topic will be discussed in terms of some sort of minimization, so get used to it! 67