Linear Algebra and Projective Geometry Homework Assignment Question Online Example Question
1. Show by direct calculation for the 2 by 2 matrices A and B that AB and BA have the
same eigenvalues. Does this result hold in general (i.e. for A and B N by N matrices) ?
2. For the 2 by 2 case obtain the relationship between the eigenvalues of A and of A2 . Does
the result you obtained hold for A and An in general (i.e. for general n and for A a N by
N matrix)?
3. Read chapter 2.6 of Numerical recipes. To those who do not have the book, you can find
a copy on the web at http://lib-www.lanl.gov/numerical/bookcpdf/c2-6.pdf
After you read this, solve the following problem.
The solution of a linear equation Ax=b is often represented as x=A-1b. As discussed in
class and in numerical recipes, the equation can also be solved using the singular value
decomposition using the expression x=A+b, where A+=(VS-1 Ut ), where S is the diagonal
matrix of singular values. In case of zero or near zero, singular values the corresponding
elements of S are set to zero.
Write a Matlab function that computes the pseudoinverse of a given matrix after
computing its svd. (Do not use native Matlab functions to compute the pseudo inverse.
You may use the Matlab svd function.)
Find the singular value decomposition and the pseudoinverse of the following matrices. :
4. Verify the statement that the cross-ratio of four points on a line remains invariant when
the points are mapped to a different configuration by a projective transformation (i.e. a
projectivity, or homography).
5. A robot vehicle is equipped with a camera. The camera image is a rectangle of height
500 pixels and width 600 pixels. The focal length is 690 pixels. The center of projection
C of the camera is 3 m above the ground. The optical axis of the camera makes a 20
degree angle with the ground, so that the camera looks slightly downward toward the
road. Large squares of size 4 m have been painted everywhere along the median lines of
roads to facilitate automatic vehicle navigation. Two of the sides of the squares are
parallel to the road edges.
The vehicle is on a flat road where it sees only two squares. The vehicle faces the first
square such that the optical axis of the camera passes through the center of the square,
and is perpendicular to two sides of the square. Because the road turns, the next square is
at an angle with the first square. The centers of the squares are on a circle of radius 100
meters (which is also the radius of the road turn), and the arc between the two centers is
10 degrees.
a. Compute the pixel positions of the images of the corners of the two squares.
b. Make a drawing of the images of the two squares and of the rectangular frame of
the image using Matlab.
c. To navigate, the robot computes a projective transformation (in other words, a
projectivity, or homography) that transforms the images of the squares back to
their actual geometry on the road, in order to compute how the road turns. To dothat, it does not use the camera focal length and the camera position with respect
to the road. Instead, it uses its knowledge that the squares it sees are always of
size 4 m, and computes a projectivity matrix using the four corners of the closest
square it sees. Using the images of the square corners found in (a), compute this
matrix using Matlab.
d. Draw the two reconstructed squares. Compute the radius of the road turn.