Linear Algebra for Computer Vision Outline Outline Motivation

Linear Algebra for Computer Vision Outline Outline Motivation

Outline • Notation and Basics • Motivation • Linear systems of equations Linear Algebra for Computer – Gauss Elimination, LU decomposition Vision • Linear Spaces and Operators – Addition, scalar multiplication, scalar product, Introduction transformation, operator, basis CMSC 828 D • Eigenvalues, Eigenvectors • Solvability conditions (“alternative theorem”) – Adjoint, null space, orthogonality Motivation Outline • Fundamental to representation and numerical solution of almost all problems including those in • Euclidean space R3 vision and computational statistics. – Solving equations for calibration, stereo, tracking, … – distance, angles, rotations • Geometry is fundamental to vision. However one • Metric Space way of doing geometry is via algebra. – Distance, angles, rotations – Intersections of lines, points, planes. Determining angles. Determining orthogonal projections … • Least Squares • Modern computer vision is formulated in terms of • Singular Value Decomposition “projective geometry”. Most results in projective geometry are stated algebraically and require • Other Matrix decompositions knowledge of concepts such as rank, null space, constraints Vectors Applications • A vector x of dimension d represents a point in a d dimensional space •Examples • Rectification of images – A point in 3D Euclidean space [x,y,z] or 2D image space [u,v] – A point in a projective space P3 [X,Y,Z,W] or in projective space • Calibrating cameras P2 [U,V,W] • Transforming color spaces – Point in color space [r,g,b] or [y, u, v] – Point in an infinite dimensional functional space on a Fourier • Tracking motion of a rigid body basis – Vector of intrinsic parameters for a camera (focal length, skew • Applying constraints from multiple views ratio, …) • Parametrizing fundamental matrix and • Essentially a short-hand notation to denote a grouping of trifocal tensor. points – No special structure yet 1 Vectors and Matrices Determinant • Determinant of a 2x2 matrix m11m22-m12m21 •d dimensional column vector x and its transpose • For a higher dimensional matrix we have a recursive definition • d×n dimensional matrix M and its transpose Mt • Transpose indicated with a superscript t or a prime ′ Matrix basics Determinant: Remarks • Square matrix: number of rows = number of columns • Determinant determines “magnitude” of • Symmetric matrix Aij=Aji . matrix. Matrix with determinant =0 is called • Skew symmetric matrix Aij=-Aji . singular. δ • Identity I ij= ij • Determinant is important in theorems δ ≠ δ – Kronecker delta ij=0 if i j ij=1 if i=j • Practically the way to compute the • Lower triangular Upper triangular determinant is not this way. aacd00"" %# %# • Homework problem -- determine number of cb0 b operations for recursive algorithm. #"%0 #%%e fgd""00 d Matrix vector product Linear systems of equations ++= ax11 1 ax 12 2 ax 13 3 b 1 × • Systems of equations ++= • m n dimensional matrix M multiplies by a ax21 1 ax 22 2 ax 23 3 b 2 • Can be written as a n dimensional vector x to produce a m ax++= ax ax b matrix vector product 31 1 32 2 33 3 3 dimensional vector • Can change or scale rows Ax= b • Solved via Gauss aaa11 12 13 x 1 b 1 elimination === Axbaaa21 22 23,, x 2 b 2 – Reduce system aaa x b to product of 31 32 33 3 3 lower or upper triangular matrix and x • O(N) operations to solve triangular system • O(N3) operations to perform Gauss elimination 2 LU decomposition Linear/Vector Spaces • Any matrix can be written as a product of a lower • Previous stuff was somewhat mechanical. triangular and upper triangular matrix. • In vision we have to answer questions when • Most used algorithm in linear algebra. – Models provide equations that are singular or degenerate. What can we say about the solutions? Can A=LU we restrict them? • Practically implemented by reordering equations and – Number of unknowns may be more or less than the scaling them so that loss of accuracy is minimized. number of observations. Can we still obtain a 01 meaningful solution? A=PLU 10 – How “far” is an approximation from a solution? How • Scaled LU decomposition with “partial pivoting” do we measure this distance? • When A is symmetric positive definite xAx t > 0 for all x – Matrices are operators that take one vector into another. What can we say about the properties of the operator? “Cholesky decomposition” When is an equation involving an operator solvable? A=LLt Operators Vector Space • Function, Transformation, Operator, Mapping: synonyms • A collection of points that obey certain rules • A function takes elements x defined on its “Domain” D to – Commutative, existence of a zero element elements y in its “Range” R which is part of E E uvvu+=+;()() u + vw + = uv + + w 2u ∃+=∀0,uuuuu 0 ; +−=() 0 R u+v D – Scalar multiplication u • If for each y in R there is exactly one x in D the function is αβ()()uuuu== αβ ;1 O one-to-one. In this case an inverse exists whose domain is R ()αβ+=+uuu α β; α () uvuv +=+ α α v and whose range is D •Let u , …, u be a set of vectors: • We are interested in situations where R and D are finite- 1 k Linear combination -u dimensional linear spaces Manifold spanned ααuu++" 11 kk by u Dependence and dimensionality Distances/Metrics and Norms • We would like to measure distances and directions in the • A set of vectors is dependent if for some scalars α , …, α not 1 k vector space the same way that we do it in Euclidean 3D all zero we can write αα++" = 11uukk 0 • Otherwise the vectors are independent. • Distance function d(u,v) makes a vector space a metric • If the zero vector is part of a set of vectors that set is space if it satisfies dependent. If a set of vectors is dependent so is any larger set – d(u,v)>0 for u,v different which contains it. – d(u,u)=0, d(u,v)=d(v,u) • A linear space is n dimensional if it possesses a set of n – d(u,w)≤ d(u,v)+d(v,w) (triangle inequality) independent vectors but every n+1 dimensional set is • Norm (“length”). dependent. –||u|| >0 for u not 0, ||0||=0 … • A set of vectors b1, , bk is a basis for a k dimensional space – || α u||=| α| ||u||, ||u+v || ≤ ||u|| + ||v|| X if each vector in X can be expressed in one and only one • Normed linear space is a metric space with the metric way as a linear combination of b , …, b 1 k defined by d(u,v)=||u-v|| and ||u||=d(u,0) • One example of a basis are the vectors (1,0,…,0), (0,1,…,0), …, (0,0, …, 1) 3 Dot Product Matrices as operators • Dot product of two vectors with same dimension • Matrix is an operator that takes a vector to <x,y> = another vector. • Dot product space behaves like Euclidean R3 • Dot product defines a norm and a metric. – Square matrix takes it to a vector in the space of • Parallelogram law the same dimension. ||u+v||2+||u-v||2 = 2||u||2 + 2 ||v||2 • Dot product provides a tool to examine • Orthogonal vectors <u,v>=0 matrix properties • Angle between vectors – Adjoint matrix < Au,v> = <u,A*v> θ cos =<x,y>/||x|| ||y|| – Square Matrix fully defined as result of its • Orthonormal basis -- elements have norm 1 and are operation on members of a basis. perpendicular to each other • Other distances and products can also define a space: Aij = < Abj,bi> – Mahalnobis distance Eigenvalues and Eigenvectors • Square matrix possesses its own natural basis. Motivation: Stereo • Eigen relation • Point (x,y) on the image plane lies on a line Au=λu in the world that passes Scene point •MatrixA acts on vector u and produces a scaled version of (xi , yi , 0) (x , y , z ) the vector. through the image point s s s y • Eigen is a German word meaning “proper” or “specific” and center of x • u is the eigenvector while λ is the eigenvalue. projection C O z –If u is an eigenvector so is αu –If||u||=1 then we call it a normal eigenvector •Image of this – λ is like a measure of the “strength” of A in the direction of u f • Set of all eigenvalues and eigenvectors of A is called the line in the world will “spectrum of A” form a line in another camera = ∑mmijij F 0 Epipolar Constraint Eight point algorithm: Determining the • Point in one image lies on the “epipolar Fundamental matrix line” in the other image • Given a set of matching points in the • Algebraic statement of geometry images, Determine F – Equation of line in the other image is Fm – Condition that the point m′ lies on this line is fff 11 12 13 u m′⋅Fm=0 []′′ = uv10fff21 22 23 v • F is the “fundamental matrix” ff 1 1 31 32 ′′()()()+++ +++++= • Estimating the fundamental matrix is an ufufvf11 12 13 vfufvf21 22 23 31 32 f10 f important problem in vision 4 Determining F • Write expression as an equation in the unknown elements. f 11 • If we have eight points we can solve f12 for elements of F, (e.g. via LU) f 13 f21 [][]uu′′′′′′ uv u vu vv v 11=− 1 f 22 • If we have more than eight points f23 we can use a least squares f 31 formulation f32 5.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    5 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us