CV4 F
CV4 F
𝒅 𝒌 ,𝒅 𝒌 ,⋯𝒅 𝒌 𝒅 𝒌′ , 𝒅 𝒌′ , ⋯ 𝒅 𝒌′𝒎
image
Matching the features of keypoints
detected in different views
If 𝒅 𝒌 − 𝒅 𝒌 𝒕𝒉
Detecting ⋯ matched!
keypoints
Describing the feature of each keypoint
𝒅 𝒌 ,𝒅 𝒌 ,⋯𝒅 𝒌
7
⊂ 𝐼 𝒙 +𝒖
𝐼 𝒙
⊂
Examples of 9
Good
feature
to track!
𝛥𝑢 𝛥𝑢 𝛥𝑢
𝛥𝑢 𝛥𝑢 𝛥𝑢
𝛥𝑢 𝛥𝑢 𝛥𝑢
𝛥𝑢 𝛥𝑢
𝛥𝑢
10
Approximation of EAC(Δu)
𝜕𝐼 𝒙 𝜕𝐼 𝒙
𝐸 Δ𝒖 = 𝐼 𝒙 + 𝚫𝒖 − 𝐼 𝒙 ≈ 𝐼 𝒙 + , ⋅ 𝚫𝒖 − 𝐼 𝒙
𝜕𝑥 𝜕𝑦
⊂ ⊂
𝜕𝐼 𝒙 𝜕𝐼 𝒙
= ( , ) ⋅ 𝚫𝒖 = 𝐼 𝛥𝑢 + 𝐼 𝛥𝑢
𝜕𝑥 𝜕𝑦
⊂ ⊂
= (𝐼 𝛥𝑢 + 2𝐼 𝐼 𝛥𝑢 𝛥𝑢 + 𝐼 𝛥𝑢 ) = 𝛥𝑢 𝐼 + 2𝛥𝑢 𝛥𝑢 𝐼 𝐼 + 𝛥𝑢 𝐼
⊂ ⊂ ⊂ ⊂
𝐼 𝐼 𝐼
⊂ ⊂ 𝛥𝑢
= 𝛥𝑢 𝛥𝑢
𝛥𝑢 = 𝚫𝒖𝑻 𝑨𝚫𝒖
𝐼 𝐼 𝐼
⊂ ⊂
𝒙 𝒙
autocorrelation matrix A ,
11
Uncertainty ellipse
corresponding to an eigenvalue analysis of
the autocorrelation matrix A
⊂ ⊂
⊂ ⊂
12
⊂ ⊂
⊂ ⊂
Key Points (Feature Points) :
A patch defined by a window (i.e. 25x25) is accepted as a
candidate feature if in the center of the window both eigenvalues
of , and , exceed a predefined threshold .
13
𝐼 𝒙 𝐼 𝒙 𝐼 𝒙
𝑨= ⊂ ⊂ 𝐼 (𝒙)
𝐼 𝒙 𝐼 𝒙 𝐼 𝒙
⊂ ⊂
𝜆 (𝒙)
5. Compute eigenvalues 𝜆 and 𝜆 (𝜆 < 𝜆 ) for scalar interest
measure.
6. Find local maxima above a certain threshold and report them as
detected feature point locations.
keypoints
𝒌 ,𝒌 ,⋯𝒌
14
• Triggs (2004)
Adaptive
Non-Maximal
Suppression
?
Lots of possibilities (this is a popular research area)
– Simple option: match square windows around the point
– SIFT, ORB, AKAZE, etc…
18
Feature descriptors
• After detecting features (keypoints), we must match them.
– we must determine which features come from corresponding locations in
different images.
• A simple error metrics: the sum of squared differences (SSD) or
normalized cross-correlation (NCC)
– But it is working for almost translational, and same size
• The local appearance of features will change in :
– Orientation
– Scale
– Affine / Perspective deformations
…
Invariance
Suppose we are comparing two images I1 and I2 (I2 may be a transformed version of I1)
Keypoint
20
16
pixel
𝒙 𝒙
,
21
Scale-space feature detection using a sub-octave Difference of Gaussian pyramid
(Keypoint detector proposed in SIFT)
22
Feature matching
Establish some preliminary feature matches between two (or more images.
ORB: an efficient alternative to SIFT or SURF [Ethan Rublee et al., ICCV 2011]
ORB (Oriented FAST and Rotated BRIEF)
https://docs.opencv.org/3.4/d1/d89/tutorial_py_orb.html
𝑑 𝑑 𝑑 𝑑
• Key.Net (Barroso-Laguna, Riba et al. 2019), which uses a combination of handcrafted and
learned CNN features to produce a method that produces state-of-the-art results on the
HPatches benchmark (Balntas, Lenc et al. 2017)
• D2D, Describe-to-Detect, (Tian, Balntas et al. 2020), which extracts dense local feature
descriptors and then keeps the ones that have high saliency
26
Lines
29
Hough Transform
• Vote possible line parameters for each detected edge point
original
oriented
30
LSD: a Line Segment Detector
https://doi.org/10.5201/ipol.2012.gjmr-lsd
31
Contour Tracking
Locating boundary curves corresponding to object boundaries
f(i)=(x(i),y(i))
33
Intelligent scissors
the system optimize the contour in real time as the user is drawing
34
Segmentation
image segmentation is one of the oldest and most widely studied problems
experimental comparisons 35
on human-labeled databases
• Mean shift
– implicitly models the density function
using a smooth continuous non-parametric model
– smoothes the distribution
– finds its peaks
– the regions of feature space that correspond to each peak
http://comaniciu.net/Papers/MsAnalysis.pdf
38
K-means
• implicitly models the probability density as a superposition of spherically symmetric
distributions
• given the number of clusters k: it is supposed to find
• iteratively updates the cluster center location based on the samples that are closest
to each center
• initialized by randomly sampling k centers from the input feature vectors
39
Mixture of Gaussians
• each cluster center is augmented by a covariance matrix whose values are re-
estimated from the corresponding samples
• a Mahalanobis distance is used to associate input samples with cluster centers
Mean shift
https://docs.opencv.org/4.x/d7/d00/tutorial_meanshift.html
The key to mean shift:
• a technique for efficiently finding peaks in this high-dimensional data
distribution without ever computing the complete function explicitly
where
clustering in the joint domain 42
five-dimensional space xj
(hs, hr, M)
= (16, 19, 40)
Superpixel segmentation
SLIC(Simple Linear Iterative Clustering)
http://www.sanko-shoko.net/note.php?id=mpfg
44
Summary
• Keypoint detection, description, and matching
– Derivatives of image intensity is used for detecting features
– Feature descriptors should be invariant to camera pose, illumination, …etc.
– Keypoint matching is one of the basic technologies
• 3D reconstruction, image retrieval, AR/MR, etc…