Description
Homework 2: Homography Estimation, Image Formation Pipeline
- Write a python notebook to “image” a simple object described by vertices (e.g., asimple house) in world coordinates from the view indicated by the extrinsic matrix below. . Use command Line2D to draw the 2D lines between the projected vertices. Do not use any 3d plotting commands. The projections should be handled by using the camera matrix (image formation pipeline) discussed in class.
The calibration parameters are given as follows:
Therefore | , | ||
Also | 0.707
0.707 0 |
. | |
0
−100 0 |
- Where is the camera in the previous question (w.r.t world coordinates)?
- Show the simple object from another camera view by changing the position and/ororientation of the camera. You may do this in one of the following two ways: (1) modify ^{c}T_{w }directly, or (2) choose a ”target” point to look at in world coordinates and a new position of the camera in world coordinates and follow the method in class.
- [EXTRA CREDIT] Image a calibration cube using the camera matrix in the first question. A calibration cube has multiple detectable corners on all 4 sides of the cubes (often a checkerboard but the black/white pattern is irrelevant here). Use Line2D to draw the image of 3 faces of the calibration cube. Set up and solve the system of equations for the DLT method of calibration. Show that you can recover the correct camera matrix M in this ideal no-noise scenario. Coordinate Frame Transformations
- Coordinate frame B is described as follows: Start with B coincident with a known frame Rotate B about ˆz_{A}, by -45^{◦}. Translate B by the vector [1,1,0] (written with respect to A).
- Given ^{A}P = [1,0,2] what is ^{B}P? That is, given a point that is [1,0,2] when written with respect to the A frame, what is that point written with respect to the B frame?
- Coordinate frame B is described as follows: Start with B coincident with a known frame Rotate B about ˆy_{A}, by 90^{◦}. Then Rotate B about ˆz_{A }by 90^{◦ }Translate B by the vector [1,1,0] (written with respect to A).
- What is ˆy_{B }written with respect to the A frame? (b) What is ˆy_{A }written with respect to the B frame?
(c) Given ^{A}P = [1,0,10] what is ^{B}P? That is, given a point that is [1,0,10] when written with respect to the A frame, what is that point written with respect to the B frame?
- Consider Figure 2.
- What is the the rotation matrix ^{A}R_{B}?
- What is the translation vector ^{A}t_{B}?
Figure 1: Coordinate frame A and B.
- Write a python program to estimate a homography between a frontal view and sideview image of a planar surface (e.g. side of a building, sign, photo). The program input should also be corresponding point pairs (Matlab’s ginput is useful here). The program should estimate the homography using the DLT method. Report the homography parameters and warp the side view image to match a frontal view of the window. An example image is provided in png (you may use a different image). You may use an external warping function only if it takes the homography as input (e.g. skimage.transform.warp).
Figure 2: Remap the window region (left) to a frontal view (right) by estimating the appropriate homography and warping the image.