SlideShare ist ein Scribd-Unternehmen logo
1 von 52
Computer vision: models,
 learning and inference
          Chapter 13
Image preprocessing and feature
          extraction

    Please send errata to s.prince@cs.ucl.ac.uk
Preprocessing
• The goal of pre-processing is
  – to try to reduce unwanted variation in image due
    to lighting, scale, deformation etc.
  – to reduce data to a manageable size
• Give the subsequent model a chance
• Preprocessing definition: deterministic
  transformation to pixels p to create data
  vector x
• Usually heuristics based on experience
         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   2
Structure

•   Per-pixel transformations
•   Edges, corners, and interest points
•   Descriptors
•   Dimensionality reduction




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   3
Normalization
• Fix first and second moments to standard
  values
• Remove contrast and constant additive
  luminance variations
                                          Before




                                           After
        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   4
Histogram Equalization
Make all of the moments the same by forcing
 the histogram of intensities to be the same




                    Before/ normalized/ Histogram Equalized
        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   5
Histogram Equalization




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   6
Convolution
Takes pixel image P and applies a filter F




Computes weighted sum of pixel values, where
weights given by filter.

Easiest to see with a concrete example
       Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   7
Blurring (convolve with Gaussian)




     Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   8
Gradient Filters




• Rule of thumb: big response when image
  matches filter
        Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   9
Gabor Filters




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   10
Haar Filters




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   11
Local binary patterns




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   12
Textons
• An attempt to characterize texture
• Replace each pixel with integer representing the texture ‘type’




            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   13
Computing Textons
Take a bank of filters and apply                                   Cluster in filter space
       to lots of images




For new pixel, filter surrounding region with same bank,
              and assign to nearest cluster
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince          14
Structure

•   Per-pixel transformations
•   Edges, corners, and interest points
•   Descriptors
•   Dimensionality reduction




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   15
Edges




                                                                           (from Elder and
                                                                            Goldberg 2000)
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince              16
Canny Edge Detector




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   17
Canny Edge Detector




Compute horizontal and vertical gradient images h and v

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   18
Canny Edge Detector




                                                   Quantize to 4 directions
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince      19
Canny Edge Detector




               Non-maximal suppression
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   20
Canny Edge Detector




            Hysteresis Thresholding
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   21
Harris Corner Detector




Make decision based on
image structure tensor
            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   22
SIFT Detector




Filter with difference of Gaussian filters at increasing scales
Build image stack (scale space)
Find extrema in this 3D volume
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   23
SIFT Detector




Identified Corners                  Remove those on                                Remove those
                                        edges                                     where contrast is
                                                                                        low
             Computer vision: models, learning and inference. ©2011 Simon J.D. Prince            24
Assign Orientation
                                                          Orientation
                                                          assigned by looking
                                                          at intensity
                                                          gradients in region
                                                          around point

                                                          Form a histogram of
                                                          these gradients by
                                                          binning.

                                                          Set orientation to
                                                          peak of histogram.
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince        25
Structure

•   Per-pixel transformations
•   Edges, corners, and interest points
•   Descriptors
•   Dimensionality reduction




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   26
Sift Descriptor
Goal: produce a vector that describes the region
  around the interest point.
                                                          All calculations are relative
                                                          to the orientation and
                                                          scale of the keypoint

                                                          Makes descriptor invariant
                                                          to rotation and scale




         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince     27
Sift Descriptor




1. Compute image gradients                                      2. Pool into local histograms
                                                                3. Concatenate histograms
                                                                4. Normalize histograms
         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince               28
HoG Descriptor




Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   29
Bag of words descriptor

•   Compute visual features in image
•   Compute descriptor around each
•   Find closest match in library and assign index
•   Compute histogram of these indices over the region
•   Dictionary computed using K-means




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   30
Shape context descriptor




 Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   31
Structure

•   Per-pixel transformations
•   Edges, corners, and interest points
•   Descriptors
•   Dimensionality reduction




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   32
Dimensionality Reduction
Dimensionality reduction attempt to find a low dimensional (or
hidden) representation h which can approximately explain the
data x so that




where         is a function that takes the hidden variable and
a set of parameters q.

Typically, we choose the function family                                       and then learn h
and q from training data

            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince          33
Least Squares Criterion



Choose the parameters q and the hidden variables h so that they
minimize the least squares approximation error (a measure of
how well they can reconstruct the data x).




            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   34
Simple Example


Approximate each data example x with a scalar value h.

Data is reconstructed by multiplying h by a parameter f and
adding the mean vector m.


... or even better, lets subtract m from each data example to get
mean-zero data

            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   35
Simple Example



Approximate each data example x with a scalar value h.

Data is reconstructed by multiplying h by a factor f.

Criterion:




             Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   36
Criterion



Problem: the problem is non-unique. If we multiply f by any
constant a and divide each of the hidden variables h1...I by the
same constant we get the same cost. (i.e. (fa) (hi/a) = fhi)

Solution: We make the solution unique by constraining the
length of f to be 1 using a Lagrange multiplier.



            Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   37
Criterion
Now we have the new cost function:




To optimize this we take derivatives with respect to f and hi,
equate the resulting expressions to zero and re-arrange.

           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   38
Solution

To compute the hidden value, take dot product with the vector f




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   39
Solution

To compute the hidden value, take dot product with the vector f




 or                                                                              where




 To compute the vector f, compute the first eigenvector of the
 scatter matrix     .
          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince       40
Computing h




To compute the hidden value, take dot product with the vector f
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   41
Reconstruction




To reconstruct, multiply the hidden variable h by vector f.
             Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   42
Principal Components Analysis
Same idea, but not the hidden variable h is multi-dimensional.
Each components weights one column of matrix F so that data is
approximated as



This leads to cost function:




This has a non-unique optimum so we enforce the constraint
that F should be a (truncated) rotation matrix and FTF=I
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   43
PCA Solution

To compute the hidden vector, take dot product with each
column of F.


To compute the matrix F, compute the first                                           eigenvectors of
the scatter matrix     .

The basis functions in the columns of F are called principal
components and the entries of h are called loadings


          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince                44
Dual PCA
Problem: PCA as described has a major drawback. We need to
compute the eigenvectors of the scatter matrix



But this has size Dx x Dx. Visual data tends to be very high
dimensional, so this may be extremely large.

Solution: Reparameterize the principal components as
weighted sums of the data



...and solve for the new variables Y.
           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   45
Geometric Interpretation


Each column of F can be
described as a weighted
sum of the original
datapoints.

Weights given in the
corresponding columns of
the new variable Y.


           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   46
Motivation
Solution: Reparameterize the principal components as
weighted sums of the data



...and solve for the new variables Y.

Why? If the number of datapoints I is less than the number of
observed dimension Dx then the Y will be smaller than F and
the resulting optimization becomes easier.

Intuition: we are not interested in principal components that
are not in the subspace spanned by the data anyway.
             Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   47
Cost functions
Principal components analysis




...subject to FTF=I.

Dual principal components analysis




...subject to FTF=I or YTXTXY=I.
         Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   48
Solution

To compute the hidden vector, take dot product with each
column of F=YX.




          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   49
Solution

To compute the hidden vector, take dot product with each
column of F=YX.


To compute the matrix Y, compute the first                                       eigenvectors of
the inner product matrix XTX.

The inner product matrix has size I x I.

If the number of examples I is less than the dimensionality of
the data Dx then this is a smaller eigenproblem.

          Computer vision: models, learning and inference. ©2011 Simon J.D. Prince            50
K-Means algorithm
Approximate data with a set of means


Least squares criterion



Alternate minimization




           Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   51
Computer vision: models, learning and inference. ©2011 Simon J.D. Prince   52

Weitere ähnliche Inhalte

Was ist angesagt?

Morphological image processing
Morphological image processingMorphological image processing
Morphological image processingVinayak Narayanan
 
Chapter 9 morphological image processing
Chapter 9 morphological image processingChapter 9 morphological image processing
Chapter 9 morphological image processingasodariyabhavesh
 
Image segmentation 3 morphology
Image segmentation 3 morphologyImage segmentation 3 morphology
Image segmentation 3 morphologyRumah Belajar
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processingAhmed Daoud
 
04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_modelszukun
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processingkumari36
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processingRaghu Kumar
 
"Fundamentals of Monocular SLAM," a Presentation from Cadence
"Fundamentals of Monocular SLAM," a Presentation from Cadence"Fundamentals of Monocular SLAM," a Presentation from Cadence
"Fundamentals of Monocular SLAM," a Presentation from CadenceEdge AI and Vision Alliance
 
Shadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL HardwareShadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL HardwareMark Kilgard
 
Boundary Extraction
Boundary ExtractionBoundary Extraction
Boundary ExtractionMaria Akther
 
COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingHemantha Kulathilake
 
morphological image processing
morphological image processingmorphological image processing
morphological image processingJohn Williams
 
Dilation and erosion
Dilation and erosionDilation and erosion
Dilation and erosionAswin Pv
 
Morphology in graphics and image processing
Morphology in graphics and image processingMorphology in graphics and image processing
Morphology in graphics and image processingDheeban Smart
 
GRPHICS05 - Rendering (2)
GRPHICS05 - Rendering (2)GRPHICS05 - Rendering (2)
GRPHICS05 - Rendering (2)Michael Heron
 

Was ist angesagt? (20)

Morphological image processing
Morphological image processingMorphological image processing
Morphological image processing
 
Chapter 9 morphological image processing
Chapter 9 morphological image processingChapter 9 morphological image processing
Chapter 9 morphological image processing
 
Image segmentation 3 morphology
Image segmentation 3 morphologyImage segmentation 3 morphology
Image segmentation 3 morphology
 
Morphological operations
Morphological operationsMorphological operations
Morphological operations
 
Chapter 9 morphological image processing
Chapter 9   morphological image processingChapter 9   morphological image processing
Chapter 9 morphological image processing
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processing
 
04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models04 cv mil_fitting_probability_models
04 cv mil_fitting_probability_models
 
GRPHICS06 - Shading
GRPHICS06 - ShadingGRPHICS06 - Shading
GRPHICS06 - Shading
 
Cp31608611
Cp31608611Cp31608611
Cp31608611
 
Morphological Image Processing
Morphological Image ProcessingMorphological Image Processing
Morphological Image Processing
 
Morphological image processing
Morphological image processingMorphological image processing
Morphological image processing
 
"Fundamentals of Monocular SLAM," a Presentation from Cadence
"Fundamentals of Monocular SLAM," a Presentation from Cadence"Fundamentals of Monocular SLAM," a Presentation from Cadence
"Fundamentals of Monocular SLAM," a Presentation from Cadence
 
Shadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL HardwareShadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL Hardware
 
Boundary Extraction
Boundary ExtractionBoundary Extraction
Boundary Extraction
 
COM2304: Morphological Image Processing
COM2304: Morphological Image ProcessingCOM2304: Morphological Image Processing
COM2304: Morphological Image Processing
 
morphological image processing
morphological image processingmorphological image processing
morphological image processing
 
Hit and-miss transform
Hit and-miss transformHit and-miss transform
Hit and-miss transform
 
Dilation and erosion
Dilation and erosionDilation and erosion
Dilation and erosion
 
Morphology in graphics and image processing
Morphology in graphics and image processingMorphology in graphics and image processing
Morphology in graphics and image processing
 
GRPHICS05 - Rendering (2)
GRPHICS05 - Rendering (2)GRPHICS05 - Rendering (2)
GRPHICS05 - Rendering (2)
 

Andere mochten auch

Fcv core szeliski_zisserman
Fcv core szeliski_zissermanFcv core szeliski_zisserman
Fcv core szeliski_zissermanzukun
 
03 history of cv - a personal perspective
03  history of cv - a personal perspective03  history of cv - a personal perspective
03 history of cv - a personal perspectivezukun
 
06 history of cv computer vision - toweards a simple bruth-force utility
06  history of cv computer vision - toweards a simple bruth-force utility06  history of cv computer vision - toweards a simple bruth-force utility
06 history of cv computer vision - toweards a simple bruth-force utilityzukun
 
Fcv cross hertzmann
Fcv cross hertzmannFcv cross hertzmann
Fcv cross hertzmannzukun
 
Fcv bio cv_cottrell
Fcv bio cv_cottrellFcv bio cv_cottrell
Fcv bio cv_cottrellzukun
 
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...zukun
 
07 history of cv vision paradigms - system - algorithms - applications - eva...
07  history of cv vision paradigms - system - algorithms - applications - eva...07  history of cv vision paradigms - system - algorithms - applications - eva...
07 history of cv vision paradigms - system - algorithms - applications - eva...zukun
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video searchzukun
 

Andere mochten auch (9)

Fcv core szeliski_zisserman
Fcv core szeliski_zissermanFcv core szeliski_zisserman
Fcv core szeliski_zisserman
 
03 history of cv - a personal perspective
03  history of cv - a personal perspective03  history of cv - a personal perspective
03 history of cv - a personal perspective
 
06 history of cv computer vision - toweards a simple bruth-force utility
06  history of cv computer vision - toweards a simple bruth-force utility06  history of cv computer vision - toweards a simple bruth-force utility
06 history of cv computer vision - toweards a simple bruth-force utility
 
Fcv cross hertzmann
Fcv cross hertzmannFcv cross hertzmann
Fcv cross hertzmann
 
Fcv bio cv_cottrell
Fcv bio cv_cottrellFcv bio cv_cottrell
Fcv bio cv_cottrell
 
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
Deep Learning workshop 2010: Deep Learning of Invariant Spatiotemporal Featur...
 
07 history of cv vision paradigms - system - algorithms - applications - eva...
07  history of cv vision paradigms - system - algorithms - applications - eva...07  history of cv vision paradigms - system - algorithms - applications - eva...
07 history of cv vision paradigms - system - algorithms - applications - eva...
 
Lecture 01 internet video search
Lecture 01 internet video searchLecture 01 internet video search
Lecture 01 internet video search
 
From Zero To Visibility
From Zero To VisibilityFrom Zero To Visibility
From Zero To Visibility
 

Ähnlich wie 13 cv mil_preprocessing

17 cv mil_models_for_shape
17 cv mil_models_for_shape17 cv mil_models_for_shape
17 cv mil_models_for_shapezukun
 
09 cv mil_classification
09 cv mil_classification09 cv mil_classification
09 cv mil_classificationzukun
 
08 cv mil_regression
08 cv mil_regression08 cv mil_regression
08 cv mil_regressionzukun
 
20 cv mil_models_for_words
20 cv mil_models_for_words20 cv mil_models_for_words
20 cv mil_models_for_wordszukun
 
15 cv mil_models_for_transformations
15 cv mil_models_for_transformations15 cv mil_models_for_transformations
15 cv mil_models_for_transformationszukun
 
14 cv mil_the_pinhole_camera
14 cv mil_the_pinhole_camera14 cv mil_the_pinhole_camera
14 cv mil_the_pinhole_camerazukun
 
07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densitieszukun
 
11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_trees11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_treeszukun
 
16 cv mil_multiple_cameras
16 cv mil_multiple_cameras16 cv mil_multiple_cameras
16 cv mil_multiple_cameraszukun
 
03 cv mil_probability_distributions
03 cv mil_probability_distributions03 cv mil_probability_distributions
03 cv mil_probability_distributionszukun
 
12 cv mil_models_for_grids
12 cv mil_models_for_grids12 cv mil_models_for_grids
12 cv mil_models_for_gridszukun
 
Common Probability Distibution
Common Probability DistibutionCommon Probability Distibution
Common Probability DistibutionLukas Tencer
 
18 cv mil_style_and_identity
18 cv mil_style_and_identity18 cv mil_style_and_identity
18 cv mil_style_and_identityzukun
 
10 cv mil_graphical_models
10 cv mil_graphical_models10 cv mil_graphical_models
10 cv mil_graphical_modelszukun
 
Introduction to Probability
Introduction to ProbabilityIntroduction to Probability
Introduction to ProbabilityLukas Tencer
 
02 cv mil_intro_to_probability
02 cv mil_intro_to_probability02 cv mil_intro_to_probability
02 cv mil_intro_to_probabilityzukun
 
06 cv mil_learning_and_inference
06 cv mil_learning_and_inference06 cv mil_learning_and_inference
06 cv mil_learning_and_inferencezukun
 
Graphical Models for chains, trees and grids
Graphical Models for chains, trees and gridsGraphical Models for chains, trees and grids
Graphical Models for chains, trees and gridspotaters
 
05 cv mil_normal_distribution
05 cv mil_normal_distribution05 cv mil_normal_distribution
05 cv mil_normal_distributionzukun
 
Introduction to 3D Computer Vision and Differentiable Rendering
Introduction to 3D Computer Vision and Differentiable RenderingIntroduction to 3D Computer Vision and Differentiable Rendering
Introduction to 3D Computer Vision and Differentiable RenderingPreferred Networks
 

Ähnlich wie 13 cv mil_preprocessing (20)

17 cv mil_models_for_shape
17 cv mil_models_for_shape17 cv mil_models_for_shape
17 cv mil_models_for_shape
 
09 cv mil_classification
09 cv mil_classification09 cv mil_classification
09 cv mil_classification
 
08 cv mil_regression
08 cv mil_regression08 cv mil_regression
08 cv mil_regression
 
20 cv mil_models_for_words
20 cv mil_models_for_words20 cv mil_models_for_words
20 cv mil_models_for_words
 
15 cv mil_models_for_transformations
15 cv mil_models_for_transformations15 cv mil_models_for_transformations
15 cv mil_models_for_transformations
 
14 cv mil_the_pinhole_camera
14 cv mil_the_pinhole_camera14 cv mil_the_pinhole_camera
14 cv mil_the_pinhole_camera
 
07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities07 cv mil_modeling_complex_densities
07 cv mil_modeling_complex_densities
 
11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_trees11 cv mil_models_for_chains_and_trees
11 cv mil_models_for_chains_and_trees
 
16 cv mil_multiple_cameras
16 cv mil_multiple_cameras16 cv mil_multiple_cameras
16 cv mil_multiple_cameras
 
03 cv mil_probability_distributions
03 cv mil_probability_distributions03 cv mil_probability_distributions
03 cv mil_probability_distributions
 
12 cv mil_models_for_grids
12 cv mil_models_for_grids12 cv mil_models_for_grids
12 cv mil_models_for_grids
 
Common Probability Distibution
Common Probability DistibutionCommon Probability Distibution
Common Probability Distibution
 
18 cv mil_style_and_identity
18 cv mil_style_and_identity18 cv mil_style_and_identity
18 cv mil_style_and_identity
 
10 cv mil_graphical_models
10 cv mil_graphical_models10 cv mil_graphical_models
10 cv mil_graphical_models
 
Introduction to Probability
Introduction to ProbabilityIntroduction to Probability
Introduction to Probability
 
02 cv mil_intro_to_probability
02 cv mil_intro_to_probability02 cv mil_intro_to_probability
02 cv mil_intro_to_probability
 
06 cv mil_learning_and_inference
06 cv mil_learning_and_inference06 cv mil_learning_and_inference
06 cv mil_learning_and_inference
 
Graphical Models for chains, trees and grids
Graphical Models for chains, trees and gridsGraphical Models for chains, trees and grids
Graphical Models for chains, trees and grids
 
05 cv mil_normal_distribution
05 cv mil_normal_distribution05 cv mil_normal_distribution
05 cv mil_normal_distribution
 
Introduction to 3D Computer Vision and Differentiable Rendering
Introduction to 3D Computer Vision and Differentiable RenderingIntroduction to 3D Computer Vision and Differentiable Rendering
Introduction to 3D Computer Vision and Differentiable Rendering
 

Mehr von zukun

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009zukun
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVzukun
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Informationzukun
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statisticszukun
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibrationzukun
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionzukun
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluationzukun
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-softwarezukun
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptorszukun
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectorszukun
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-introzukun
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video searchzukun
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video searchzukun
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learningzukun
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionzukun
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick startzukun
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysiszukun
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structureszukun
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities zukun
 
Icml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant featuresIcml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant featureszukun
 

Mehr von zukun (20)

My lyn tutorial 2009
My lyn tutorial 2009My lyn tutorial 2009
My lyn tutorial 2009
 
ETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCVETHZ CV2012: Tutorial openCV
ETHZ CV2012: Tutorial openCV
 
ETHZ CV2012: Information
ETHZ CV2012: InformationETHZ CV2012: Information
ETHZ CV2012: Information
 
Siwei lyu: natural image statistics
Siwei lyu: natural image statisticsSiwei lyu: natural image statistics
Siwei lyu: natural image statistics
 
Lecture9 camera calibration
Lecture9 camera calibrationLecture9 camera calibration
Lecture9 camera calibration
 
Brunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer visionBrunelli 2008: template matching techniques in computer vision
Brunelli 2008: template matching techniques in computer vision
 
Modern features-part-4-evaluation
Modern features-part-4-evaluationModern features-part-4-evaluation
Modern features-part-4-evaluation
 
Modern features-part-3-software
Modern features-part-3-softwareModern features-part-3-software
Modern features-part-3-software
 
Modern features-part-2-descriptors
Modern features-part-2-descriptorsModern features-part-2-descriptors
Modern features-part-2-descriptors
 
Modern features-part-1-detectors
Modern features-part-1-detectorsModern features-part-1-detectors
Modern features-part-1-detectors
 
Modern features-part-0-intro
Modern features-part-0-introModern features-part-0-intro
Modern features-part-0-intro
 
Lecture 02 internet video search
Lecture 02 internet video searchLecture 02 internet video search
Lecture 02 internet video search
 
Lecture 03 internet video search
Lecture 03 internet video searchLecture 03 internet video search
Lecture 03 internet video search
 
Icml2012 tutorial representation_learning
Icml2012 tutorial representation_learningIcml2012 tutorial representation_learning
Icml2012 tutorial representation_learning
 
Advances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer visionAdvances in discrete energy minimisation for computer vision
Advances in discrete energy minimisation for computer vision
 
Gephi tutorial: quick start
Gephi tutorial: quick startGephi tutorial: quick start
Gephi tutorial: quick start
 
EM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysisEM algorithm and its application in probabilistic latent semantic analysis
EM algorithm and its application in probabilistic latent semantic analysis
 
Object recognition with pictorial structures
Object recognition with pictorial structuresObject recognition with pictorial structures
Object recognition with pictorial structures
 
Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities Iccv2011 learning spatiotemporal graphs of human activities
Iccv2011 learning spatiotemporal graphs of human activities
 
Icml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant featuresIcml2012 learning hierarchies of invariant features
Icml2012 learning hierarchies of invariant features
 

Kürzlich hochgeladen

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Kürzlich hochgeladen (20)

Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

13 cv mil_preprocessing

  • 1. Computer vision: models, learning and inference Chapter 13 Image preprocessing and feature extraction Please send errata to s.prince@cs.ucl.ac.uk
  • 2. Preprocessing • The goal of pre-processing is – to try to reduce unwanted variation in image due to lighting, scale, deformation etc. – to reduce data to a manageable size • Give the subsequent model a chance • Preprocessing definition: deterministic transformation to pixels p to create data vector x • Usually heuristics based on experience Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 2
  • 3. Structure • Per-pixel transformations • Edges, corners, and interest points • Descriptors • Dimensionality reduction Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 3
  • 4. Normalization • Fix first and second moments to standard values • Remove contrast and constant additive luminance variations Before After Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 4
  • 5. Histogram Equalization Make all of the moments the same by forcing the histogram of intensities to be the same Before/ normalized/ Histogram Equalized Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 5
  • 6. Histogram Equalization Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 6
  • 7. Convolution Takes pixel image P and applies a filter F Computes weighted sum of pixel values, where weights given by filter. Easiest to see with a concrete example Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 7
  • 8. Blurring (convolve with Gaussian) Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 8
  • 9. Gradient Filters • Rule of thumb: big response when image matches filter Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 9
  • 10. Gabor Filters Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 10
  • 11. Haar Filters Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 11
  • 12. Local binary patterns Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 12
  • 13. Textons • An attempt to characterize texture • Replace each pixel with integer representing the texture ‘type’ Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 13
  • 14. Computing Textons Take a bank of filters and apply Cluster in filter space to lots of images For new pixel, filter surrounding region with same bank, and assign to nearest cluster Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 14
  • 15. Structure • Per-pixel transformations • Edges, corners, and interest points • Descriptors • Dimensionality reduction Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 15
  • 16. Edges (from Elder and Goldberg 2000) Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 16
  • 17. Canny Edge Detector Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 17
  • 18. Canny Edge Detector Compute horizontal and vertical gradient images h and v Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 18
  • 19. Canny Edge Detector Quantize to 4 directions Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 19
  • 20. Canny Edge Detector Non-maximal suppression Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 20
  • 21. Canny Edge Detector Hysteresis Thresholding Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 21
  • 22. Harris Corner Detector Make decision based on image structure tensor Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 22
  • 23. SIFT Detector Filter with difference of Gaussian filters at increasing scales Build image stack (scale space) Find extrema in this 3D volume Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 23
  • 24. SIFT Detector Identified Corners Remove those on Remove those edges where contrast is low Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 24
  • 25. Assign Orientation Orientation assigned by looking at intensity gradients in region around point Form a histogram of these gradients by binning. Set orientation to peak of histogram. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 25
  • 26. Structure • Per-pixel transformations • Edges, corners, and interest points • Descriptors • Dimensionality reduction Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 26
  • 27. Sift Descriptor Goal: produce a vector that describes the region around the interest point. All calculations are relative to the orientation and scale of the keypoint Makes descriptor invariant to rotation and scale Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 27
  • 28. Sift Descriptor 1. Compute image gradients 2. Pool into local histograms 3. Concatenate histograms 4. Normalize histograms Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 28
  • 29. HoG Descriptor Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 29
  • 30. Bag of words descriptor • Compute visual features in image • Compute descriptor around each • Find closest match in library and assign index • Compute histogram of these indices over the region • Dictionary computed using K-means Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 30
  • 31. Shape context descriptor Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 31
  • 32. Structure • Per-pixel transformations • Edges, corners, and interest points • Descriptors • Dimensionality reduction Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 32
  • 33. Dimensionality Reduction Dimensionality reduction attempt to find a low dimensional (or hidden) representation h which can approximately explain the data x so that where is a function that takes the hidden variable and a set of parameters q. Typically, we choose the function family and then learn h and q from training data Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 33
  • 34. Least Squares Criterion Choose the parameters q and the hidden variables h so that they minimize the least squares approximation error (a measure of how well they can reconstruct the data x). Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 34
  • 35. Simple Example Approximate each data example x with a scalar value h. Data is reconstructed by multiplying h by a parameter f and adding the mean vector m. ... or even better, lets subtract m from each data example to get mean-zero data Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 35
  • 36. Simple Example Approximate each data example x with a scalar value h. Data is reconstructed by multiplying h by a factor f. Criterion: Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 36
  • 37. Criterion Problem: the problem is non-unique. If we multiply f by any constant a and divide each of the hidden variables h1...I by the same constant we get the same cost. (i.e. (fa) (hi/a) = fhi) Solution: We make the solution unique by constraining the length of f to be 1 using a Lagrange multiplier. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 37
  • 38. Criterion Now we have the new cost function: To optimize this we take derivatives with respect to f and hi, equate the resulting expressions to zero and re-arrange. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 38
  • 39. Solution To compute the hidden value, take dot product with the vector f Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 39
  • 40. Solution To compute the hidden value, take dot product with the vector f or where To compute the vector f, compute the first eigenvector of the scatter matrix . Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 40
  • 41. Computing h To compute the hidden value, take dot product with the vector f Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 41
  • 42. Reconstruction To reconstruct, multiply the hidden variable h by vector f. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 42
  • 43. Principal Components Analysis Same idea, but not the hidden variable h is multi-dimensional. Each components weights one column of matrix F so that data is approximated as This leads to cost function: This has a non-unique optimum so we enforce the constraint that F should be a (truncated) rotation matrix and FTF=I Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 43
  • 44. PCA Solution To compute the hidden vector, take dot product with each column of F. To compute the matrix F, compute the first eigenvectors of the scatter matrix . The basis functions in the columns of F are called principal components and the entries of h are called loadings Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 44
  • 45. Dual PCA Problem: PCA as described has a major drawback. We need to compute the eigenvectors of the scatter matrix But this has size Dx x Dx. Visual data tends to be very high dimensional, so this may be extremely large. Solution: Reparameterize the principal components as weighted sums of the data ...and solve for the new variables Y. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 45
  • 46. Geometric Interpretation Each column of F can be described as a weighted sum of the original datapoints. Weights given in the corresponding columns of the new variable Y. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 46
  • 47. Motivation Solution: Reparameterize the principal components as weighted sums of the data ...and solve for the new variables Y. Why? If the number of datapoints I is less than the number of observed dimension Dx then the Y will be smaller than F and the resulting optimization becomes easier. Intuition: we are not interested in principal components that are not in the subspace spanned by the data anyway. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 47
  • 48. Cost functions Principal components analysis ...subject to FTF=I. Dual principal components analysis ...subject to FTF=I or YTXTXY=I. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 48
  • 49. Solution To compute the hidden vector, take dot product with each column of F=YX. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 49
  • 50. Solution To compute the hidden vector, take dot product with each column of F=YX. To compute the matrix Y, compute the first eigenvectors of the inner product matrix XTX. The inner product matrix has size I x I. If the number of examples I is less than the dimensionality of the data Dx then this is a smaller eigenproblem. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 50
  • 51. K-Means algorithm Approximate data with a set of means Least squares criterion Alternate minimization Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 51
  • 52. Computer vision: models, learning and inference. ©2011 Simon J.D. Prince 52