Computer Vision Homework: Linear Algebra, Projective Geometry, Pseudoinverse Fundamentals , Assignments of Computer Science

A homework assignment for the cmsc 828d fundamentals of computer vision course, given in fall 2000. The assignment covers topics such as linear algebra, projective geometry, eigenvalues, singular value decomposition, and projective transformations. Students are asked to perform calculations related to matrix multiplication, eigenvalues, and singular value decomposition, as well as write a matlab function to compute the pseudoinverse of a given matrix using its singular value decomposition.

Typology: Assignments

Pre 2010

Uploaded on 02/13/2009

koofers-user-siu
koofers-user-siu 🇺🇸

5

(1)

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CMSC 828D HOMEWORK 1/15 FALL 2000
FUNDAMENTALS OF COMPUTER VISION 1
Handed out September 20, 2000
Due back September 25 2000
Linear Algebra and Projective Geometry
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. :
A
+
1111
/
and B
-
010
100
1
and C
-
11
00
1
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 do
pf2

Partial preview of the text

Download Computer Vision Homework: Linear Algebra, Projective Geometry, Pseudoinverse Fundamentals and more Assignments Computer Science in PDF only on Docsity!

CMSC 828D HOMEWORK 1/15 FALL 2000

FUNDAMENTALS OF COMPUTER VISION 1

Handed out September 20, 2000 Due back September 25 2000 Linear Algebra and Projective Geometry

  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 A^2. Does the result you obtained hold for A and A n^ 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 -1 b. 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 +^ =( V S -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. : A + 1 1 1 1 / and B - 0 1 0 1 0 0 1 and C^ -^

1 1 0 0 1

  1. 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).
  2. 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 do

CMSC 828D HOMEWORK 1/15 FALL 2000

FUNDAMENTALS OF COMPUTER VISION 2

that, 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.