computer vision for linear algebrabuzzard.ups.edu/...ups...computer-vision-present.pdf · basics...

26
Basics Least Squares Singular Value Decomposition Benefits of Linear Algebra Applications Sources Computer Vision for Linear Algebra Hunter Wills April 24, 2014 Hunter Wills Computer Vision for Linear Algebra

Upload: others

Post on 25-May-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Computer Vision for Linear Algebra

Hunter Wills

April 24, 2014

Hunter Wills Computer Vision for Linear Algebra

Page 2: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

1 BasicsHomogenous coordinatesTransformations

2 Least Squares3 Singular Value

Decomposition4 Benefits of Linear Algebra

Matrix DecompositionsEfficiency

5 ApplicationsStructure from MotionConvolutionEigenfaces

6 Sources

Hunter Wills Computer Vision for Linear Algebra

Page 3: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Homogenous coordinatesTransformations

What is Computer Vision?

Artificial intelligence

Having a computer describe what is sees in the world aroundit the way a human or animal can

An inverse problem recovering unknowns from insufficientdata to fully describe a “solution”

Hunter Wills Computer Vision for Linear Algebra

Page 4: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Homogenous coordinatesTransformations

Homogenous coordinates

Adding an extra dimension to the Euclidean system

Account for the concept of infinity

Hunter Wills Computer Vision for Linear Algebra

Page 5: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Homogenous coordinatesTransformations

Transformations

Linear transformations used to manipulate the image

Represented through matrices which act on image vectorsthrough multiplication

Camera projection matrix

Types of transformations:

Hunter Wills Computer Vision for Linear Algebra

Page 6: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Real world data is error prone

Total Least Squares

Robust Least Squares

Non-Linear Least Squares

Hunter Wills Computer Vision for Linear Algebra

Page 7: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Rotation, scaling, rotation

Principal Component Analysis

Generalized inverse

Hunter Wills Computer Vision for Linear Algebra

Page 8: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Matrix DecompositionsEfficiency

Most situations can be approximated well linearly

Estimation of lost data

Hunter Wills Computer Vision for Linear Algebra

Page 9: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Matrix DecompositionsEfficiency

Matrix Decompositions

Inverting the transformation from 3D to 2D

Speedy Calculations

Accurate Computations

Projections

Positive Definite Matricies

Hunter Wills Computer Vision for Linear Algebra

Page 10: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Matrix DecompositionsEfficiency

Efficiency

Space efficiency

Time efficiency

Hunter Wills Computer Vision for Linear Algebra

Page 11: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Structure from MotionConvolutionEigenfaces

Modern Uses of Computer Vision

Hunter Wills Computer Vision for Linear Algebra

Page 12: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Structure from MotionConvolutionEigenfaces

Structure from Motion

Process of using a series of 2D images to reconstruct a 3Dimage

Depth has been lost in a single 2D image

Transformations that cannot be inverted have occurred in theprocess of shifting from 3D to 2D

Each camera has its own coordinate system so the stationarycoordinate system of the object must be used

Hunter Wills Computer Vision for Linear Algebra

Page 13: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Structure from MotionConvolutionEigenfaces

Method

Clearly identifiable points are identified on the images

The generalized inverse of the camera’s projection matrix iscalculated for a single image

The attempt at an inverted image is transformed into thesystem of the second image

The location of identified points in the second image arecompared to those of the transformed image

Additional transformations are estimated to better align thekey points

The process is repeated until key points are reasonably wellaligned

Hunter Wills Computer Vision for Linear Algebra

Page 14: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Structure from MotionConvolutionEigenfaces

Example

Hunter Wills Computer Vision for Linear Algebra

Page 15: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Structure from MotionConvolutionEigenfaces

Convolution

Form of linear filtering

Utilizes a convolution kernel to perform an action on a largerimage matrix

Examples: Blurring, Sharpening, Smoothing, Edge-Identifying,and more

Hunter Wills Computer Vision for Linear Algebra

Page 16: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Structure from MotionConvolutionEigenfaces

Method

Find the appropriate n × n convolution kernel

For every pixel in the image matrix form an n × n sub-matrixwith the adjacent pixels.

Define the following convolution action on a segment of theimage matrix, I , by the convolution kernel K as:

b =∑n

i=0

∑nj=0 Ii ,jKi ,j

Replace each pixel in the image matrix with the convolutionaction of the pixel’s sub matrix.

Hunter Wills Computer Vision for Linear Algebra

Page 17: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Structure from MotionConvolutionEigenfaces

Example

Hunter Wills Computer Vision for Linear Algebra

Page 18: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Structure from MotionConvolutionEigenfaces

Eigenfaces

Used for face identification and recognition

Eigenfaces are the eigenvectors of the covariance matrix for aset of face images.

Each face image is a linear combination of the eigenfaces

Only the “most important” eigenfaces are stored

Hunter Wills Computer Vision for Linear Algebra

Page 19: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Structure from MotionConvolutionEigenfaces

Method

Take a set of n ×m face picture matrices and treat them as aset of nm dimensional vectors.

i1,1 ... in,1... ... ...i1,m ... in,m

i1,1...in,1i1,2...in,m

= i

Find the average face: a = 1m

∑mj=1 ij

Form the image matrix with columns of the differencebetween each face vector and the average face. ij − a

The right singular vectors of this matrix are the eigenfaces

Hunter Wills Computer Vision for Linear Algebra

Page 20: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Structure from MotionConvolutionEigenfaces

Face Recognition

Treat the face picture matrix as a face vector, f.

Find the face vector’s eigenface components: wi = e∗i (f − a)

Form these eigenface components into a component vector, w

Calculate the Euclidian distance between the unknown face’scomponent vector and each known face’s component vectorsas the square of their inner product.

The face which minimizes the Euclidian distance is the one towhich the unknown face belongs

Hunter Wills Computer Vision for Linear Algebra

Page 21: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Structure from MotionConvolutionEigenfaces

Example

Hunter Wills Computer Vision for Linear Algebra

Page 22: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Sources

Szeliski, Richard. 2011. Computer vision algorithms andapplications. London: Springer.

Trefethen, Lloyd N., and David Bau. 1997. Numerical linearalgebra. Philadelphia, PA: Society for Industrial and AppliedMathematics.

Doornik, Jurgen A. 2011. Robust Estimation Using LeastTrimmed Squares. Oxford, UK: Oxford Martin School.

Smith, Lindsay I. 2002. A Tutorial on Principal ComponentsAnalysis.

Turk, Matthew, and Alex Pentland. 1991. Eigenfaces forRecognition. Massachusetts Institute of Technology. Journalof Cognitive Neuroscience.

Hunter Wills Computer Vision for Linear Algebra

Page 23: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Sources

Massachusetts Institute of Technology. Chemical EngineeringNotes: Cholesky Decomposition.

Shah, Mubarak. 1997. Fundamentals of Computer Vision.Orlando, FL: University of Central Florida.

Golub, Gene H., and Charles F. Van Loan. 1983. Matrixcomputations. Baltimore: Johns Hopkins University Press.

Lui, Yui M. 2012. Human Gesture Recognition on ProductManifolds. Journal of Machine Learning Research.

Ahn, Song H. 2005. Homogenous Coordinates.

Hunter Wills Computer Vision for Linear Algebra

Page 24: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Sources

Castro, Luis P., Saburou Saitoh, and Nguyen Minh Tuan.2012. Convolutions, Integral Transforms, and IntegralEquations by means of the Theory of Reproducing Kernels.Opuscula Mathematica Vol. 32.

O’Hagan, Anthony, Caitlin E. Buck, Alireza Daneshkhah, J.Richard Eiser, Paul H. Garthwaite, David J. Jenkinson,Jeremy E. Oakley, and Tim Rakow. 2006. UncertainJudgements: Eliciting Experts’ Probabilities. West Sussex:John Wiley and Sons Ltd.

Interviews of industry computer scientists coming from aPh.D. program in Computer Vision from Georgia TechUniversity. 2014.

Hunter Wills Computer Vision for Linear Algebra

Page 25: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Sources

“PlayMotion SPG: Special Projects Group,” PlayMotion Labs,accessed April 21, 2014,http://www.playmotion.com/services.html

“Google: Self-driving cars in 3-5 years. Feds: Not so fast,”ExtremeTech, accessed April 21, 2014,http://www.extremetech.com/extreme/147940-google-self-driving-cars-in-3-5-years-feds-not-so-fast

“Robotic surgery coming this fall to Southcoast Hospitals,”Southcoast Health System, accessed April 21, 2014,www.southcoast.org/enews/2008/2008-07-enews.html

Hunter Wills Computer Vision for Linear Algebra

Page 26: Computer Vision for Linear Algebrabuzzard.ups.edu/...UPS...computer-vision-present.pdf · Basics Least Squares Singular Value Decomposition Bene ts of Linear Algebra Applications

BasicsLeast Squares

Singular Value DecompositionBenefits of Linear Algebra

ApplicationsSources

Sources

“Video Analytics,” Vision Systems Electrical and SecuritySolutions, accessed April 21, 2014,www.visionsystems.co.nz/Systems-Services/Security-Systems/smart-video-surveillance-intelligent-security-camera-analysis- I.2021

Hunter Wills Computer Vision for Linear Algebra