Page 251 -
P. 251
230 4 Feature detection and matching
Ex 4.5: Feature tracker Instead of finding feature points independently in multiple images
and then matching them, find features in the first image of a video or image sequence and
then re-locate the corresponding points in the next frames using either search and gradient
descent (Shi and Tomasi 1994) or learned feature detectors (Lepetit, Pilet, and Fua 2006;
Fossati, Dimitrijevic, Lepetit et al. 2007). When the number of tracked points drops below a
threshold or new regions in the image become visible, find additional points to track.
(Optional) Winnow out incorrect matches by estimating a homography (6.19–6.23)or
fundamental matrix (Section 7.2.1).
(Optional) Refine the accuracy of your matches using the iterative registration algorithm
described in Section 8.2 and Exercise 8.2.
Ex 4.6: Facial feature tracker Apply your feature tracker to tracking points on a person’s
face, either manually initialized to interesting locations such as eye corners or automatically
initialized at interest points.
(Optional) Match features between two people and use these features to perform image
morphing (Exercise 3.25).
Ex 4.7: Edge detector Implement an edge detector of your choice. Compare its perfor-
mance to that of your classmates’ detectors or code downloaded from the Internet.
A simple but well-performing sub-pixel edge detector can be created as follows:
1. Blur the input image a little,
B σ (x)= G σ (x) ∗ I(x).
2. Construct a Gaussian pyramid (Exercise 3.19),
P = Pyramid{B σ (x)}
3. Subtract an interpolated coarser-level pyramid image from the original resolution blurred
image,
S(x)= B σ (x) − P.InterpolatedLevel(L).
4. For each quad of pixels, {(i, j), (i +1,j), (i, j +1), (i +1,j +1)}, count the number
of zero crossings along the four edges.
5. When there are exactly two zero crossings, compute their locations using (4.25) and
store these edgel endpoints along with the midpoint in the edgel structure (Figure 4.48).
6. For each edgel, compute the local gradient by taking the horizontal and vertical differ-
ences between the values of S along the zero crossing edges.
7. Store the magnitude of this gradient as the edge strength and either its orientation or
that of the segment joining the edgel endpoints as the edge orientation.
8. Add the edgel to a list of edgels or store it in a 2D array of edgels (addressed by pixel
coordinates).
Figure 4.48 shows a possible representation for each computed edgel.