Professional Documents
Culture Documents
2018-Midsem Soln
2018-Midsem Soln
• Try to attempt all four questions. You can score up to 20 extra credit points.
• True/False questions without justification will not be awarded any points. Keep in mind that a
statement is true only if it is always true.
• In the unusual case that a question is not clear, even after discussing with the invigilating TAs, please
state your assumptions clearly and solve the question. Reasonable assumptions will be accounted for
while grading.
1. (20 points) State whether the following statements are true or false with appropriate justification.
a) Matrices A, B ∈ Rm×n , both have rank r. A + B will always have rank
r.
1 2 4 1 2 2
Answer. False. Take an example, A = and B = are rank 2 matrices.
0 1 0 1 1 3
However, A + B is a rank 1 matrix.
b) The effect of radial distortion reduces as you radially move away from the principal point.
Answer. False. The effect of radial distortion increases as you radially move away from the principal
point. Refer to the figure in the slides.
c) For a pinhole camera, size of the image of a world object decreases as the focal length is increased.
Answer. False. It will increase because of the relationship x = fZX . Since the image coordinates x and
y are both directly proportional to f , they will increase with f , thereby increasing the size of the image
of a world object.
e) Given that the cross-ratio is preserved under the projective transformation, it is preserved under affine
transformation as well.
Answer. True. Projective transformations are more general than affine, and all invariants of projective
transformations are preserved in its special cases, i.e., affinities, similarities and isometries (Euclidean
transformations).
g) Points at infinity can be used to find the slope of a set of mutually parallel lines.
Answer. True. The points at infinity encode the direct of the line in a plane, therefore the slope can
be computed.
h) The line at infinity can be estimated from a set of four mutually parallel lines.
Answer. False. In order to find line at infinity we need two pairs of parallel lines in different directions.
i) The skew parameter in the intrinsic camera matrix primarily depends on the length to width ratio of
the pixel on the sensor.
Answer. False. Skewness parameter depends on skewness angle which can be same for different length
to width ratio.
2. (20 points) Let H be a 2 × 2 transformation matrix of a 1-D projective space P 1 such that u = Hv,
where u and v are in P 1 and represented using homogeneous co-ordinates. How many degrees of freedom
does H have? How many point correspondences do you need to solve for H? Can you re-write the equa-
tion u = Hv in the form Ah = 0, where h = vec(H). Write the structure of A in terms of ui and vj .
Answer: Points u and v in P 1 are related as:
h1T v
Hv = 2T
h v
where h1T and h2T are the rows of H.
1T
u h v
u = 1 = 2T
u2 h v
h1T v
u1 " #
u2 = h2T v
u2 h2T v
u2 h2T v
" #
h1T v
u1
u2 = h2T v
1 1
u1 h1T v
= 2T
u2 h v
On cross multiplying we get:
u1 h2T v = u2 h1T v
This gives:
1
h
u1 v1 u1 v2 −u2 v1 −u2 v2 = 2
h
Since each point correspondence gives us one equation and there are three degrees of freedom in H, we
need three equations to solve for H, hence three point correspondences are required.
Page 2 of 2
3. (30 points) Consider a vector y = (2, 5, 1)> , which is rotated by −π/2 about the Y-axis, followed by
a rotation about X-axis by π/2 and finally translated by (−2, −1, 1)> .
b) (4 points) Find the new coordinates of this vector y. Where does the origin of the initial frame of
reference get mapped to?
c) (10 points) What is the direction of the axis of the combined rotation in the original frame of reference
and what is the angle of rotation about this axis?
d) (10 points) Using Rodrigues formula, show that you achieve the same rotation matrix as you get by
sequentially applying the two rotations.
Answer.
a)
−1 trace(R) − 1
θ = cos
2
= 120◦
R32 − R23
1
n= R13 − R31
2 sin θ
R21 − R12
0.5774
= −0.5774
−0.5774
R = I + sin θ N + (1 − cosθ) N2
where,
0 −n3 n2
N = n3 0 −n1
−n2 n1 0
4. (20 points) {Extra Credit:} The image formation process can be summarized in the equation x =
K[R|t]X, where K is the intrinsic parameter matrix, [R|t] are the extrinsic parameters, X is the 3D point
and x is the image point respectively, both in homogeneous coordinates. Let X be an arbitrary 3D point
in the scene and x1 and x2 be its corresponding projections on to two image planes of two corresponding
cameras ({K1 , R1 , t1 } and {K2 , R2 , t2 }). If we assume that the two camera centers coincide (but the
coordinate axes may not be aligned), then there exists a homography H, such that x1 = Hx2 , where H is
an invertible 3 × 3 matrix. Find the matrix H in terms of K1 , K2 , R1 and R2 . Can such a homography
exist if the camera centers do not coincide? Explain why or why not. {Hint: You can assume that one of
the cameras is the world reference frame.}
Answer.
We have point X in world coordinate system in homogeneous form, X = [X, e 1] where, Xe = [x, y, z]. We
also hae transformation from XW to image given as,
Assuming, camera-1 coordinate system is also world coordinate system, we have extrinsic parameter as
Identity,i.e., R1 = I and the translation is t1 = [0, 0, 0]> in non-homogeneous co-ordinates, which changes
the transformation as,
x 1 = K1 X
e (2)
Now, for camera-2 coordinate system, we have extrinsic parameter as pure rotation ,i.e., t1 = [0, 0, 0]> in
non-homogeneous coordinates, which makes the transformation for the world point X as,
x2 = K2 R2 X
e (3)
Since, K1 is an invertible matrix we can write,
e = K−1 x1
X (4)
1
x2 = K2 R2 K−1
1 x1 (5)
Since, all matrices K2 , R2 and K1 are invertible, we have
x1 = K1 R−1 −1
2 K2 x 1 (6)
From equation 6 we have,
H = K1 R−1 −1
2 K2
• Yes, homography will exist, in that case we will also consider the translation between the camera
centers in equation number 3.