



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A problem set for a computer graphics course (cmsc 426) focusing on 2d and 3d motion with matrices, structure-from-motion, and corner detection. It includes a variety of problems related to rotation, translation, scaling, and projection of points in two and three dimensions, as well as the implementation of a corner detection algorithm.
Typology: Assignments
1 / 5
This page cannot be seen from the preview
Don't miss anything!




b. 5 points Give a matrix that will represent a 45 degree clockwise rotation of 2D points.
c. 5 points Give a matrix that will rotate points clockwise by 90 degrees about the point (1,2). That is, the effect should be as if you held the point (1,2) fixed and rotated everything about that point by 90 degrees.
b. 6 points Give matrices that will have the following effects: i. Translate 3D points in the direction (2,-1,3). ii. Translate 3D points in the direction (1,0,-1) and then scale them by a factor of 2. iii. Scale the points by a factor of 2 and then translate them in the direction (1,0,-1).
c. 5 points Give a rotation matrix that will rotate the y axis so that it points in the same direction as (1,1,1) , while rotating the x axis so that it points in the direction (-1, 0, 1).
d. 5 points Explain why it is not possible to rotate the y axis so that it points in the same direction as (1,1,1) , while rotating the x axis so that it points in the direction (-1, 1, 1).
In the second image, we find the same points, now with coordinates:
We use the superscript to indicate the image number, and the subscript to indicate the point number. Suppose we know that the 3D coordinates of the four points are: P 1 =(0, 0, 0), P 2 =(1, 0, 0), P 3 =(0, 1, 0), P 4 =(0, 0, 1). Determine what the camera motion was for these two images. You can describe each camera motion using a 2x4 matrix. This matrix will combine together rotation, translation, scaling, and projection to 2D.
b. Challenge problem (5 points): Do the matrices that you found really represent a rigid 3D motion? Explain how you would determine this.
c. 5 points Suppose there is a fifth scene point, which produces the image coordinates:
Find the 3D coordinates of this scene point.
1 2
1 2
UsingSVD 2
2
0
x y y
Iy = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 5 5 5 5 0 0 0 5 5 5 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Using these to build a C matrix for the point (4,4), we get the matrix:
C = 150 25 25 150
Why these numbers? Below, I show all the gradients, as pairs (Ix,Iy). In red are the gradients in a 5x5 neighborhood around the pixel at (4,4). If we square all the Ix values we get 150, since there are six such values. Similarly for squaring Iy. Only pixel (4,4) gives a non-zero value, 25, for Ix*Iy though.
0,0 0,0 0,0 0,0 0,0 0,0 0, 0,0 0,0 0,0 0,0 0,0 0,0 0, 0,0 0,0 0,0 0,5 0,5 0,5 0, 0,0 0,0 5,0 5,5 0,5 0,5 0, 0,0 0,0 5,0 5,0 0,0 0,0 0, 0,0 0,0 5,0 5,0 0,0 0,0 0, 0,0 0,0 5,0 5,0 0,0 0,0 0,
We will have to do this for every point. Performing svd on the matrix C, we get:
svd(C)
ans =
So the cornerness of this point is 125, which is pretty high. Looking at the cornerness of all the points, we get:
Notice that the point with the highest cornerness is located at (5,5), even though intuitively this does not seem to be exactly where the corner is. This is because a 5x5 region centered at (5,5) has the greatest diversity of gradients, since it has all the non-zero gradients we got in the neighborhood around (4,4), plus some new ones.