Page 321 -
P. 321

300                                                                6 Feature-based alignment


                                Ex 6.9: Single view metrology  Implement a system to measure dimensions and reconstruct
                                a 3D model from a single image of a man-made scene using visible vanishing directions (Sec-
                                tion 6.3.3)(Criminisi, Reid, and Zisserman 2000).


                                  1. Find the three orthogonal vanishing points from parallel lines and use them to establish
                                     the three coordinate axes (rotation matrix R of the camera relative to the scene). If
                                     two of the vanishing points are finite (not at infinity), use them to compute the focal
                                     length, assuming a known optical center. Otherwise, find some other way to calibrate
                                     your camera; you could use some of the techniques described by Schaffalitzky and
                                     Zisserman (2000).
                                  2. Click on a ground plane point to establish your origin and click on a point a known
                                     distance away to establish the scene scale. This lets you compute the translation t
                                     between the camera and the scene. As an alternative, click on a pair of points, one
                                     on the ground plane and one above it, and use the known height to establish the scene
                                     scale.

                                  3. Write a user interface that lets you click on ground plane points to recover their 3D
                                     locations. (Hint: you already know the camera matrix, so knowledge of a point’s z
                                     value is sufficient to recover its 3D location.) Click on pairs of points (one on the
                                     ground plane, one above it) to measure vertical heights.

                                  4. Extend your system to let you draw quadrilaterals in the scene that correspond to axis-
                                     aligned rectangles in the world, using some of the techniques described by Sinha,
                                                                                                  15
                                     Steedly, Szeliski et al. (2008). Export your 3D rectangles to a VRML or PLY file.
                                  5. (Optional) Warp the pixels enclosed by the quadrilateral using the correct homography
                                     to produce a texture map for each planar polygon.

                                Ex 6.10: Radial distortion with plumb lines  Implement a plumb-line algorithm to deter-
                                mine the radial distortion parameters.

                                  1. Take some images of scenes with lots of straight lines, e.g., hallways in your home or
                                     office, and try to get some of the lines as close to the edges of the image as possible.

                                  2. Extract the edges and link them into curves, as described in Section 4.2.2 and Exer-
                                     cise 4.8.

                                  3. Fit quadratic or elliptic curves to the linked edges using a generalization of the suc-
                                     cessive line approximation algorithm described in Section 4.3.1 and Exercise 4.11 and
                                     keep the curves that fit this form well.

                                  4. For each curved segment, fit a straight line and minimize the perpendicular distance
                                     between the curve and the line while adjusting the radial distortion parameters.

                                  5. Alternate between re-fitting the straight line and adjusting the radial distortion param-
                                     eters until convergence.

                                 15  http://meshlab.sf.net.
   316   317   318   319   320   321   322   323   324   325   326