Title: Featurebased alignment outline
1Feature-based alignment outline
2Feature-based alignment outline
3Feature-based alignment outline
- Extract features
- Compute putative matches
4Feature-based alignment outline
- Extract features
- Compute putative matches
- Loop
- Hypothesize transformation T (small group of
putative matches that are related by T)
5Feature-based alignment outline
- Extract features
- Compute putative matches
- Loop
- Hypothesize transformation T (small group of
putative matches that are related by T) - Verify transformation (search for other matches
consistent with T)
6Feature-based alignment outline
- Extract features
- Compute putative matches
- Loop
- Hypothesize transformation T (small group of
putative matches that are related by T) - Verify transformation (search for other matches
consistent with T)
72D transformation models
- Similarity(translation, scale, rotation)
- Affine
- Projective(homography)
8Let us start with affine transformations
- Simple fitting procedure (linear least squares)
- Approximates viewpoint changes for roughly planar
objects and roughly orthographic cameras - Can be used to initialize fitting for more
complex models
9Fitting an affine transformation
- Assume we know the correspondences, how do we get
the transformation?
10Fitting an affine transformation
- Linear system with six unknowns
- Each match gives us two linearly independent
equations need at least three to solve for the
transformation parameters
11What if we dont know the correspondences?
?
12What if we dont know the correspondences?
?
- It would help to be able to compare descriptors
of local patches surrounding interest points (cf
next - lecture).
- This is not strictly necessary. We will
concentrate here on the geometry of the problem.
13Dealing with outliers
- The set of putative matches still contains a very
high percentage of outliers - How do we fit a geometric transformation to a
small subset of all possible matches? - Possible strategies
- RANSAC
- Hough transform
14Strategy 1 RANSAC
- RANSAC loop (Fischler Bolles, 1981)
- Randomly select a seed group of matches
- Compute transformation from seed group
- Find inliers to this transformation
- If the number of inliers is sufficiently large,
re-compute least-squares estimate of
transformation on all of the inliers - Keep the transformation with the largest number
of inliers
15RANSAC example Translation
Putative matches
16RANSAC example Translation
Select one match, count inliers
17RANSAC example Translation
Select one match, count inliers
18RANSAC example Translation
Find average translation vector
19Problem with RANSAC
- In many practical situations, the percentage of
outliers - (incorrect putative matches) is very high (90 or
above) - Alternative strategy Hough transform
20Strategy 2 Hough transform
- Suppose our features are scale- and
rotation-covariant - Then a single feature match provides an alignment
hypothesis (translation, scale, orientation)
model
David G. Lowe. Distinctive image features from
scale-invariant keypoints, IJCV 60 (2), pp.
91-110, 2004.
21Strategy 3 Hough transform
- Suppose our features are scale- and
rotation-covariant - Then a single feature match provides an alignment
hypothesis (translation, scale, orientation) - Of course, a hypothesis obtained from a single
match is unreliable - Solution let each match vote for its hypothesis
in a Hough space with very coarse bins
model
David G. Lowe. Distinctive image features from
scale-invariant keypoints, IJCV 60 (2), pp.
91-110, 2004.
22Hough transform details (D. Lowes system)
- Training phase For each model feature, record 2D
location, scale, and orientation of model
(relative to normalized feature frame) - Test phase Let each match between a test and a
model feature vote in a 4D Hough space - Use broad bin sizes of 30 degrees for
orientation, a factor of 2 for scale, and 0.25
times image size for location - Vote for two closest bins in each dimension
- Find all bins with at least three votes and
perform geometric verification - Estimate least squares affine transformation
- Use stricter thresholds on transformation
residual - Search for additional features that agree with
the alignment
23Beyond affine transformations
- What is the transformation between two views of a
planar surface? - What is the transformation between images from
two cameras that share the same center?
24Beyond affine transformations
- Homography plane projective transformation
(transformation taking a quad to another
arbitrary quad)
25Fitting a homography
- Recall homogenenous coordinates
Converting to homogenenousimage coordinates
Converting from homogenenousimage coordinates
26Fitting a homography
- Recall homogenenous coordinates
- Equation for homography
Converting to homogenenousimage coordinates
Converting from homogenenousimage coordinates
27Fitting a homography
9 entries, 8 degrees of freedom(scale is
arbitrary)
3 equations, only 2 linearly independent
28Direct linear transform
- H has 8 degrees of freedom (9 parameters, but
scale is arbitrary) - One match gives us two linearly independent
equations - Four matches needed for a minimal solution (null
space of 8x9 matrix) - More than four homogeneous least squares