Page 319 -
P. 319
298 6 Feature-based alignment
1. Implement the various alternatives and compare their accuracy on synthetic data, i.e.,
random 2D point clouds with noisy feature positions.
2. One approach is to estimate the translations from the centroids and then estimate ro-
tation in polar coordinates. Do you need to weight the angles obtained from a polar
decomposition in some way to get the statistically correct estimate?
3. How can you modify your techniques to take into account either scalar (6.10) or full
two-dimensional point covariance weightings (6.11)? Do all of the previously devel-
oped “shortcuts” still work or does full weighting require iterative optimization?
Ex 6.4: 2D match move/augmented reality Replace a picture in a magazine or a book
with a different image or video.
1. With a webcam, take a picture of a magazine or book page.
2. Outline a figure or picture on the page with a rectangle, i.e., draw over the four sides as
they appear in the image.
3. Match features in this area with each new image frame.
4. Replace the original image with an “advertising” insert, warping the new image with
the appropriate homography.
5. Try your approach on a clip from a sporting event (e.g., indoor or outdoor soccer) to
implement a billboard replacement.
Ex 6.5: 3D joystick Track a Rubik’s cube to implement a 3D joystick/mouse control.
1. Get out an old Rubik’s cube (or get one from your parents).
2. Write a program to detect the center of each colored square.
3. Group these centers into lines and then find the vanishing points for each face.
4. Estimate the rotation angle and focal length from the vanishing points.
5. Estimate the full 3D pose (including translation) by finding one or more 3×3 grids and
recovering the plane’s full equation from this known homography using the technique
developed by Zhang (2000).
6. Alternatively, since you already know the rotation, simply estimate the unknown trans-
lation from the known 3D corner points on the cube and their measured 2D locations
using either linear or non-linear least squares.
7. Use the 3D rotation and position to control a VRML or 3D game viewer.
Ex 6.6: Rotation-based calibration Take an outdoor or indoor sequence from a rotating
camera with very little parallax and use it to calibrate the focal length of your camera using
the techniques described in Section 6.3.4 or Sections 9.1.3–9.2.1.
1. Take out any radial distortion in the images using one of the techniques from Exer-
cises 6.10–6.11 or using parameters supplied for a given camera by your instructor.

