midterm review - artificial...
TRANSCRIPT
Midterm Review
Midterm Review
Jonathan Krause Vignesh Ramanathan
Zixuan Wang Kevin Wong Jinchao Ye
2012.10.26
Midterm Review
Outline
• Face Recognition
• Filters and Line Fitting
• Segmentation and Clustering
• Pinhole Geometry and Camera Models
• Epipolar Geometry and Stereo
• Q&A
2012.10.26
Midterm Review
AdaBoost for Face Detection
Boosting
Defines a classifier using an additive model
For each round of boosting:
Evaluate each rectangle filter on each example
Select best filter/threshold combination
Reweight examples
ℎ 𝑥 = 𝑎1ℎ1 𝑥 + 𝑎2ℎ2 𝑥 + 𝑎3ℎ3 𝑥 + …
2012.10.26
Midterm Review
AdaBoost
2012.10.26
Midterm Review
AdaBoost
2012.10.26
Midterm Review
AdaBoost
2012.10.26
Midterm Review
AdaBoost
2012.10.26
Midterm Review
AdaBoost: Algorithm
2012.10.26
Midterm Review
Eigenfaces and Fisherfaces • Representation of faces in the face space
– The eigenfaces v1, …, vK span the face space
Lect ure 2 - !
!
!
Fei-Fei Li!
Projec<ng'onto'the'Eigenfaces'
• The'eigenfaces'v1,'...,'vK'span'the'space'of'faces''
– A'face'is'converted'to'eigenface'coordinates'by'
24>Sep>12'27'2012.10.26
Midterm Review
Eigenfaces and Fisherfaces
• Faces should be aligned.
• Not robust on the illumination change.
• Not robust on the deformable object recognition.
• Difference between two: – Eigenfaces use Principle Component Analysis
(PCA)
– Fisherfaces use Linear Discriminant Analysis (LDA)
2012.10.26
Midterm Review
Outline
• Face Recognition
• Filters and Line Fitting
• Segmentation and Clustering
• Pinhole Geometry and Camera Models
• Epipolar Geometry and Stereo
• Q&A
2012.10.26
Midterm Review
RANSAC for Model Fitting
RANSAC loop:
1. Randomly select a minimum number of points for model fitting
2. Compute a model from these points
3. Find inliers to this transformation
4. If the number of inliers is sufficiently large, re-compute least-squares estimate of model on all of the inliers
• Keep the model with the largest number of inliers
2012.10.26
Midterm Review
RANSAC Pros/Cons
Pros:
• General method suited for a wide range of model fitting problems
• Easy to implement and easy to calculate its failure rate
Cons:
• Only handles a moderate percentage of outliers without cost blowing up
• Many real problems have high rate of outliers (but sometimes selective choice of random subsets can help)
2012.10.26
Midterm Review
Hough Transform
• A voting technique that can be used for model fitting problems
• Main idea:
1. Record all possible models on which all given points belong to.
2. Look for models that get many votes.
• Line fitting carried out in (d, θ) space
2012.10.26
Midterm Review
Hough Transform Pros/Cons Pros • All points are processed independently, so can cope with
occlusion • Some robustness to noise: noise points unlikely to
contribute consistently to any single bin • Can detect multiple instances of a model in a single pass
Cons • Complexity of search time increases exponentially with the
number of model parameters • Non-target shapes can produce spurious peaks in
parameter space • Quantization: hard to pick a good grid size
2012.10.26
Midterm Review
Linear Filter
• Linear filtering: – Form a new image whose pixels are a weighted sum of
original pixel values
• 1D linear filter and 2D linear filters
• Convolution – Linear Shift Invariant system
– Gaussian filter
– DFT can be used to perform fast convolution
• Cross-correlation
2012.10.26
Midterm Review
Canny Edge detector
1. Filter image with derivative of Gaussian
2. Find magnitude and orientation of gradient
3. Non‐maximum suppression: – Thin multi-pixel wide “ridges” down to single
pixel width
4. Linking and thresholding (hysteresis): – Define two thresholds: low and high
– Use the high threshold to start edge curves and the low threshold to continue them
2012.10.26
Midterm Review
Outline
• Face Recognition
• Filters and Line Fitting
• Segmentation and Clustering
• Pinhole Geometry and Camera Models
• Epipolar Geometry and Stereo
• Q&A
2012.10.26
Midterm Review
Segmentation
2012.10.26
Midterm Review
Techniques
• K-Means
• Mixture of Gaussians
• Mean-Shift
• Graph Cut (eigenvalues)
• Min Cut
• Min Normalized Cut
2012.10.26
Midterm Review
Mean-Shift
For each point in the image
1. Set window center to be point
2. Get mean of points in window
3. Set window center to mean
4. If not converged, goto 2.
Speed-ups exist
e.g. basin of attraction
2012.10.26
Midterm Review
Mean-Shift
2012.10.26
• “Model-Free”
– Don't need to specify number of clusters
– Free parameter: size of window
Midterm Review
Normalized Cut
• Problem with min cut:
• Solution:
2012.10.26
Midterm Review
Normalized Cut
• Reduces to generalized eigenvalue problem
• Optimal solution is second smallest eigenvector of a particular matrix
• Need to discretize
2012.10.26
Midterm Review
Example questions
• Which methods have explicit parameters for the number of clusters?
• How do we increase/decrease the number of clusters of each?
• Which are subject to local minima?
2012.10.26
Midterm Review
Example questions
• What types of features could be used?
• Which scale well with feature dimension?
• Other strengths/weaknesses of each
2012.10.26
Midterm Review
Outline
• Face Recognition
• Filters and Line Fitting
• Segmentation and Clustering
• Pinhole Geometry and Camera Models
• Epipolar Geometry and Stereo
• Q&A
2012.10.26
Midterm Review
Pinhole Geometry
28 10/19/2012
• 𝑥, 𝑦, 𝑧 → (𝑓𝑥
𝑧, 𝑓
𝑦
𝑧) non-linear
Midterm Review
Camera Model
• 𝑥, 𝑦, 𝑧 → (𝑓𝑥
𝑧, 𝑓
𝑦
𝑧) non-linear
•𝑓𝑥𝑓𝑦𝑧
=𝑓 00 𝑓
0 00 0
0 0 1 0
𝑥𝑦𝑧1
10/21/2011 29
Midterm Review
Camera Model
10/21/2011 30
• 𝑃′ = 𝐾 𝑅 𝑇 𝑃𝑤
• 𝐾 =
𝛼 𝑠 𝑐𝑥
0 𝛽 𝑐𝑦
0 0 1
Midterm Review
Camera Calibration
10/21/2011 31
Midterm Review
Camera Calibration
• 𝑃1 = 3, 4, 6, 1 𝑇; p1 = 9.5, 11.3333 𝑇;
• 𝑃2 = 5, 6, 7, 1 𝑇; p2 = 10.0769, 11.8462 𝑇;
• 𝑃3 = −7, 8, 10, 1 𝑇; p3 = 5.75, 11.75 𝑇;
• 𝑃4 = −3, −9 3, 1 𝑇; p4 = 7.00, 5.2222 𝑇;
• 𝑃5 = −56, −17, 8, 1 𝑇; p5 = −11.9286, 3.3571 𝑇;
• 𝑃6 = −34, 37, 3, 1 𝑇; p6 = −10.2222, 30.7788 𝑇;
• Solved by SVD in matlab:
– 𝑀′ =5.56 0 7.79 63.44
0 5.56 8.9 75.680 0 1.11 6.68
• Actual camera matrix:
– 𝑀 =5 0 7 570 5 8 680 0 1 6
10/21/2011 32
zeroBlock = [0 0 0 0]'; A = [ P1' zeroBlock' -p1(1)*P1'; zeroBlock' P1' -p1(2)*P1'; P2' zeroBlock' -p2(1)*P2'; zeroBlock' P2' -p2(2)*P2'; P3' zeroBlock' -p3(1)*P3'; zeroBlock' P3' -p3(2)*P3'; P4' zeroBlock' -p4(1)*P4'; zeroBlock' P4' -p4(2)*P4'; P5' zeroBlock' -p5(1)*P5'; zeroBlock' P5' -p5(2)*P5'; P6' zeroBlock' -p6(1)*P6'; zeroBlock' P6' -p6(2)*P6'; ]; [U, D, V] = svd(A, 0); m = V(:, end); m = [m(1:4)'; m(5:8)'; m(9:12)'];
Midterm Review
Outline
• Face Recognition
• Filters and Line Fitting
• Segmentation and Clustering
• Pinhole Geometry and Camera Models
• Epipolar Geometry and Stereo
• Q&A
2012.10.26
Midterm Review
Epipolar Geometry
• Epipolar lines, Epipolar plane, Epipoles, Baseline • Epipolar constraint 0)pR(TpT
2012.10.26
Midterm Review
Essential and Fundamental Matrix
Skew symmetric matrix:
0pFpT
01
pKRTKp TT 0 pRTpT
RTE
baba ][
0pEpT
1
KRTKF T
2012.10.26
Midterm Review
A Simple “Trick”
2012.10.26
Midterm Review
Essential Matrix Example
From :http://www.filmschoolrejects.com/features/cinematic-listology-six-incredibly-awesome-uses-of-camera-rigs-dbell.php
2012.10.26
Midterm Review
Essential Matrix Example Continued
How would you find the essential matrices between pairs of evenly spaced cameras around a semi circle?
X
Y
Need R and T for each pair in world coordinates.
2012.10.26
Midterm Review
Reconstruction
• Simplified Depth Estimation Example
2012.10.26
Midterm Review
Outline
• Face Recognition
• Filters and Line Fitting
• Segmentation and Clustering
• Pinhole Geometry and Camera Models
• Epipolar Geometry and Stereo
• Q&A
2012.10.26
Midterm Review
Q&A
2012.10.26