#### Table of Contents

## Robotics: Perception Week 01 Quiz Answers

### Quiz 1: Introduction

Q1. In the equation \dfrac{1}{f} = \dfrac{1}{a} + \dfrac{1}{b}*f*1=*a*1+*b*1, what does the f*f* stands for:

- Force
- Distance between image plane and lens
**Focal Length**- Distance between lens and object

Q2. If an object is originally in focus and then you start moving the image plane, what do you expect to happen:

- Image gets sharper
- f = a + b
*f*=*a*+*b* - \dfrac{1}{f} \neq \dfrac{1}{a} + \dfrac{1}{b}
*f*1=*a*1+*b*1 **Image starts blurring**

Q3. The size of the projection of an object increases as the object distance from the lens increases.

- True
**False**

Q4. Parallel lines in the world remain always parallel after projection.

- True
**False**

Q5. Parallel lines in the world remain parallel in the image plane when

**the lines are parallel to the image plane**- the lines are perpendicular to the image plane

Q6. A vanishing point in an image is the intersection of projections of parallel lines in the world. There is at most one vanishing point in an image

- True
**False**

Q7. The two parameters that we can directly control using the bi-perspectograph construction are:

**Focal Length**- Distance from the objects
- Angle between image plane and world plane
**Height of the camera**

### Quiz 2: Vanishing Points

Q1. The School of Athens is a famous fresco by Raphael. Correct perspective projection is visible here. From the three specified points (A, B, or C), which is the vanishing point? (You need to use a ruler)

- A
- B
**C**

Q2. From the three options (l_1, l_2, l_3*l*1,*l*2,*l*3), which is the horizon?

- l_1
*l*1 - l_2
*l*2 **l_3***l*3

Q3. In the following image, from the three options (l_1, l_2, l_3*l*1,*l*2,*l*3), which is the horizon?

**l_1***l*1- l_2
*l*2 - l_3
*l*3

Q4. A vanishing point is always visible inside an image**1 point**

- True
**False**

Q5. The horizon is the set of all directions to infinity for a plane**1 point**

**True**- False

### Quiz 3: Perspective Projection

Q1. Assume you are given a line represented in the form 2x + 2y – 2\sqrt{2} = 02*x*+2*y*−22=0. Which set of parameters (\rho,\theta)(*ρ*,*θ*) gives the same line represented in the form \rho = x \cos\theta + y \sin \theta*ρ*=*x*cos*θ*+*y*sin*θ*:

- (-2,60^o)(−2,60
*o*) - (2,45^o)(2,45
*o*) - (1,30^o)(1,30
*o*) **(1,45^o)(1,45***o*)

Q2. The distance of a line to the origin is \rho=3*ρ*=3 and the norm direction of the line is \theta = \pi/4*θ*=*π*/4. Which of the following is/are valid equations for the line?

- x+y-3=0
*x*+*y*−3=0 **x+y-3\sqrt{2} = 0***x*+*y*−32=0- \sqrt{2}x-\sqrt{2}y-3=02
*x*−2*y*−3=0 - \sqrt{2}x+\sqrt{2}y-3=02
*x*+2*y*−3=0

Q3. What is the equation of the line passing through points with homogeneous coordinates (1,2,1)(1,2,1) and (-1,3,1)(−1,3,1)?

- -2x-y+5= 0−2
*x*−*y*+5=0 - -2x+y+5=0−2
*x*+*y*+5=0 **2x+4y-10=02***x*+4*y*−10=0- x+y+10=0
*x*+*y*+10=0

Q4. The lines l_1=(1,1,0)*l*1=(1,1,0) and l_2=(-1,1,1)*l*2=(−1,1,1) instersect at the point with homogeneous coordinates:

**(0.5,-0.5,1)(0.5,−0.5,1)**- (-0.5,-0.5,1)(−0.5,−0.5,1)
- (1,1,1)(1,1,1)
- (1,-1,1)(1,−1,1)

Q5. Consider the lines y=1*y*=1 and y=2*y*=2 in 2D projective space (as previous s). What is the point of intersection in homogeneous coordinates?

- They do not intersect.
**(1,0,0)(1,0,0)****(-1,0,0)(−1,0,0)**- (0,1,0)(0,1,0)

### Quiz 4: Rotations and Translations

Q1. What is the determinant of a rotation matrix?

- -1 or +1
- -1, 0 or 1
- -1
**+1**

Q2. What is the rotation { }^{c}R_{w}*cRw* such that \mathbf{X}_c = { }^{c}R_{w} \mathbf{X}_w +{ }^{c}T_{w} **X***c*=*cRw***X***w*+*cTw* for a point \mathbf{X}_w**X***w* expressed in the world coordinate frame?

- { }^{c}R _{w}= ⎛⎝−1000−1000−1⎞⎠
*cRw*=⎝⎜⎛−1000−1000−1⎠⎟⎞ - { }^{c}R _{w}= ⎛⎝−100001010⎞⎠
*cRw*=⎝⎜⎛−100001010⎠⎟⎞ **{ }^{c}R _{w}= ⎛⎝−10000−10−10⎞⎠***cRw*=⎝⎜⎛−10000−10−10⎠⎟⎞- { }^{c}R _{w}= ⎛⎝0−10−10000−1⎞⎠
*cRw*=⎝⎜⎛0−10−10000−1⎠⎟⎞

Q3. What is the corresponding translation { }^{c}T_{w}*cTw*?**1 point**

- { }^cT_{w} = (2,0,0)
*cTw*=(2,0,0) - { }^cT_{w} = (0,2,0)
*cTw*=(0,2,0) **{ }^cT_{w} = (0,0,-2)***cTw*=(0,0,−2)- { }^cT_{w} = (-2,0,0)
*cTw*=(−2,0,0) - { }^cT_{w} = (0,0,2)
*cTw*=(0,0,2)

Q4. What is { }^wR_{c}*wRc*?

- { }^{w}R _{c}= ⎛⎝−100001010⎞⎠
*wRc*=⎝⎜⎛−100001010⎠⎟⎞ **{ }^wR_{c}= ⎛⎝−10000−10−10⎞⎠***wRc*=⎝⎜⎛−10000−10−10⎠⎟⎞- { }^{w}R _{c}= ⎛⎝0−10−10000−1⎞⎠
*wRc*=⎝⎜⎛0−10−10000−1⎠⎟⎞ - { }^{w}R _{c}= ⎛⎝−1000−1000−1⎞⎠
*wRc*=⎝⎜⎛−1000−1000−1⎠⎟⎞

Q5. What is { }^wT_{c}*wTc*?

- { }^wT_{c} = (0,0,-2)
*wTc*=(0,0,−2) **{ }^wT_{c} = (0,-2,0)***wTc*=(0,−2,0)- { }^wT_{c} = (0,0,2)
*wTc*=(0,0,2) - { }^wT_{c} = (0,2,0)
*wTc*=(0,2,0)

Q6. For the quadrotor configuration in the two images below (top view and side view), what is the transformation from the body (imu) coordinate system to the camera?

In particular, what is the rotation { }^{c}R_{b}*c**R**b* such that \mathbf{X}_c = { }^{c}R_{b} \mathbf{X}_b +{ }^{c}T_{b} **X***c*=*c**R**b***X***b*+*c**T**b* for a point \mathbf{X}_b**X***b* expressed in the body coordinate frame?

[Top View] (Distance between origins on XY plane is 4cm)

[Side View] (Distance between origins along Z axis is 3cm)

- { }^cR_{b}= ⎛⎝⎜⎜⎜⎜⎜2√20−2√20−10−2√202√2⎞⎠⎟⎟⎟⎟⎟
*cRb*=⎝⎜⎜⎜⎜⎛220−220−10−22022⎠⎟⎟⎟⎟⎞ - { }^cR_{b}= ⎛⎝⎜⎜⎜⎜⎜2√2−2√20−2√2−2√2000−1⎞⎠⎟⎟⎟⎟⎟
*cRb*=⎝⎜⎜⎜⎜⎛22−220−22−22000−1⎠⎟⎟⎟⎟⎞ - { }^cR_{b}= ⎛⎝⎜⎜⎜⎜⎜2√20−2√2−2√20−2√20−10⎞⎠⎟⎟⎟⎟⎟
*cRb*=⎝⎜⎜⎜⎜⎛220−22−220−220−10⎠⎟⎟⎟⎟⎞ - { }^cR_{b}= ⎛⎝⎜⎜⎜⎜⎜2√20−2√20−10−2√20−2√2⎞⎠⎟⎟⎟⎟⎟
*cRb*=⎝⎜⎜⎜⎜⎛220−220−10−220−22⎠⎟⎟⎟⎟⎞

Q7. What is the corresponding translation { }^{c}T_{b}*cTb*?

- { }^cT_{b} = (0.03, 0, 0.04)
*cTb*=(0.03,0,0.04)m - { }^cT_{b} = (0.04, 0, 0.03)
*cTb*=(0.04,0,0.03)m **{ }^cT_{b} = (-0.04, 0, -0.03)***cTb*=(−0.04,0,−0.03)m- { }^cT_{b} = (-0.03, 0, -0.04)
*cTb*=(−0.03,0,−0.04)m

### Quiz 5: Dolly Zoom

Q1. Given Image 1, which of the four other images (2-5) would be the final result if we reduce the focal length?

[Image 1]

[Image 2]

[Image 3]

[Image 4]

[Image 5]

- Image 2
- Image 3
- Image 4
**Image 5**

Q2. For the five images above, for which one do you think that the camera is the farthest away from the scene?

- Image 1
- Image 2
**Image 3**- Image 4
- Image 5

### Quiz 6: Feeling of Camera Motion

Q1. You are given two images of a scene, before and after a change in the camera. Which transformation can produce this result?

[Before]

[After]

- Changing the focal length
- Movement of the camera on the vertical axis
**Movement of the camera on the horizontal axis**

Q2. You are given two images of a scene, before and after a change in the camera. Which transformation can produce this result?

[Before]

[After]

**Movement of the camera on the vertical axis**- Rotation of the camera around the z
*z*-axis - Changing focal length

Q3. You are given two images of a scene, before and after a change in the camera. Which transformation can produce this result?

[Before]

[After]

- Increasing the focal length
**Rotation around the z***z*-axis of the camera- Translation on the vertical axis of the camera

#### Quiz 7: How to Compute Intrinsics from Vanishing Points

Q1. In the image below, we can see the projections of three orthogonal vanishing points V_1,V_2, V_3*V*1,*V*2,*V*3 and the image center C*C*. Which of the following statements is always true?

**The image center is the centroid of the triangle formed by the projections of three orthogonal vanishing points.**- The image center is the orthocenter of the triangle formed by the projections of three orthogonal vanishing points.
- The image center is the circumcenter of the triangle formed by the projections of three orthogonal vanishing points.
- The image center is the incenter of the triangle formed by the projections of three orthogonal vanishing points.

Q2. Assume that the image center has been computed using the result of the previous question. Then, under which conditions can we compute the focal length from the image projections of three orthogonal vanishing points?

**At least two of the vanishing points are not at infinity.**- All of the vanishing points are at infinity.
- At least one of the vanishing points is not at infinity.

#### Quiz 8: Camera Calibration

Q1. The calibration procedure estimates:

- Focal length
- Image Center
- Radial distortion parameters
**All the above**

Q2. Which two of the four images below suffer mostly from radial distortion effects?

A)

B)

C)

D)

**A**- B
- C
**D**

Q3. For calibration you need to know the size of the checkerboard squares

**True**- False

## Robotics: Perception Week 2 Quiz Answers

### Quiz 1: Homogeneous Coordinates

Q1. The homogeneous coordinates of a point P*P* are (1,2,1)(1,2,1). Which of the following (homogeneous) coordinates represent the same point?

- (1,1,2)(1,1,2)
**(2,4,2)(2,4,2)****(-0.5,-1,-0.5)(−0.5,−1,−0.5)**- (1,2,0)(1,2,0)

Q2. Given a square ABCD, with A = (0,0,1)*A*=(0,0,1) and C = (1,1,1)*C*=(1,1,1), the equation of the diagonal BD in \mathbb{P}^2P2 has the form l^Tx=0*l**T**x*=0 with l*l* equal to

Clarification: For this and following s, we use \mathbb{P}^2P2 to denote the real projective plane.

- (-1,-1,1)(−1,−1,1)
- (-1,2,1)(−1,2,1)
- (1,-1,1)(1,−1,1)
**(-1,1,1)(−1,1,1)**

Q3. Determine the equation of the line in \mathbb{P}^2P2 through the points (a,0,1)(*a*,0,1) and (0,b,1)(0,*b*,1).

**⎛⎝−***b*−*aab*⎞⎠- ⎝⎜⎛−
*b*−*aab*⎠⎟⎞ - ⎛⎝
*baab*⎞⎠ - ⎝⎜⎛
*baab*⎠⎟⎞ - ⎛⎝
*ab*−*ab*⎞⎠ - ⎝⎜⎛
*ab*−*ab*⎠⎟⎞ - ⎛⎝
*abab*⎞⎠ - ⎝⎜⎛
*abab*⎠⎟⎞

Q4. Determine the equation of the line in \mathbb{P}^2P2 through the points (a,b,c)(*a*,*b*,*c*) and (d,e,0)(*d*,*e*,0).

- ⎛⎝
*cecdae*+*bd*⎞⎠ - ⎝⎜⎛
*cecdae*+*bd*⎠⎟⎞ - ⎛⎝−
*cecdae*−*bd*⎞⎠ - ⎝⎜⎛−
*cecdae*−*bd*⎠⎟⎞ - ⎛⎝
*cecdae*−*bd*⎞⎠ - ⎝⎜⎛
*cecdae*−*bd*⎠⎟⎞ - ⎛⎝
*adbe*0⎞⎠ - ⎝⎜⎛
*adbe*0⎠⎟⎞

Q5. Determine the equation of the line in \mathbb{P}^2P2 through the points (a,b,0)(*a*,*b*,0) and (d,e,0)(*d*,*e*,0).

- ⎛⎝
*ae*0*bd*⎞⎠ - ⎝⎜⎛
*ae*0*bd*⎠⎟⎞ - ⎛⎝00
*ae*+*bd*⎞⎠ - ⎝⎜⎛00
*ae*+*bd*⎠⎟⎞ - ⎛⎝00
*ae*−*bd*⎞⎠ - ⎝⎜⎛00
*ae*−*bd*⎠⎟⎞ - ⎛⎝
*adbe*0⎞⎠ - ⎝⎜⎛
*adbe*0⎠⎟⎞

### Quiz 2: Projective Transformations

Q1. What is the least number of non-collinear points required to estimate a projective transformation H:\mathbb{P}^2 \rightarrow \mathbb{P}^2*H*:P2→P2?

**4**

Q2. A projective transformation M*M* preserves the points (1,0,0)(1,0,0), (0,1,0)(0,1,0), and the origin of the coordinate system. However, it maps the point (1,1,1)(1,1,1) to the points (2,1,1)(2,1,1), meaning (2,1,1)^{T} = M (1,1,1)^{T} (2,1,1)*T*=*M*(1,1,1)*T*. Compute M*M*.

**M \sim ⎛⎝200010001⎞⎠***M*∼⎝⎜⎛200010001⎠⎟⎞- M \sim ⎛⎝200010101⎞⎠
*M*∼⎝⎜⎛200010101⎠⎟⎞ - M \sim ⎛⎝200010011⎞⎠
*M*∼⎝⎜⎛200010011⎠⎟⎞ - M \sim ⎛⎝200010111⎞⎠
*M*∼⎝⎜⎛200010111⎠⎟⎞

Q3. Find the projective transformation A*A* which will keep the points (0,0,1)(0,0,1) and (1,1,1)(1,1,1) fixed and will map point (1,0,1)(1,0,1) to (1,0,0)(1,0,0) and point (0,1,1)(0,1,1) to (0,1,0)(0,1,0)?

- A \sim ⎛⎝101011001⎞⎠
*A*∼⎝⎜⎛101011001⎠⎟⎞ **A \sim ⎛⎝−10−10−1−1001⎞⎠***A*∼⎝⎜⎛−10−10−1−1001⎠⎟⎞- A \sim ⎛⎝10−101−1001⎞⎠
*A*∼⎝⎜⎛10−101−1001⎠⎟⎞ - A \sim ⎛⎝−1010−1100−1⎞⎠
*A*∼⎝⎜⎛−1010−1100−1⎠⎟⎞

Q4. Find the projective transformation A*A* that maps the points (1,0,0)(1,0,0), (0,1,0)(0,1,0), (0,0,1)(0,0,1), and (1,1,1)(1,1,1) to the points (-2,0,1)(−2,0,1), (0,1,-1)(0,1,−1), (-1,2,-1)(−1,2,−1) and (-1,1,1)(−1,1,1), respectively.

- A \sim ⎛⎝⎜−2/301/305/3−5/3122⎞⎠⎟
*A*∼⎝⎜⎛−2/301/305/3−5/3122⎠⎟⎞ **A \sim ⎛⎝⎜−2/301/305/3−5/31−21⎞⎠⎟***A*∼⎝⎜⎛−2/301/305/3−5/31−21⎠⎟⎞- A \sim ⎛⎝⎜2/301/305/3−5/3121⎞⎠⎟
*A*∼⎝⎜⎛2/301/305/3−5/3121⎠⎟⎞ - A \sim ⎛⎝⎜1/301/305/35/31−21⎞⎠⎟
*A*∼⎝⎜⎛1/301/305/35/31−21⎠⎟⎞

### Quiz 3: Vanishing Points

Q1. When the camera is zooming, do the vanishing points move?

**Yes**- No

Q2. What camera change would give the following result from Image 1 to Image 2

(Hint: Notice how the vanishing points change)

[Image 1]

[Image 2]

**Camera Translation**- Zooming

Q3. What camera change would give the following result from Image 1 to Image 2

(Hint: Notice if the vanishing points change)

[Image 1]

[Image 2]

- Camera Translation
**Zooming**

Q4. The image of the rectangle-shaped facade of a building has two vanishing points, one at (-b,0)(−*b*,0) corresponding to horizontal lines and one at (0,h)(0,*h*) correspondng to the vertical lines. Which of the following transformations will map the facade to a rectangle. Assume that the origin (0,0)(0,0) and the point (1,1)(1,1) remain fixed.

**4.zh-b+bh 3,3 = bh**

### Quiz 4: Cross Ratios and Single View Metrology

Q1. For the image below, if AB = 12*AB*=12, BC = 4*BC*=4 and CD = 8*CD*=8, what is the cross ratio \mathcal{CR}(A,B,C,D)CR(*A*,*B*,*C*,*D*)?**2**

Q2. For the same image as the previous question, if A’B’ = 5*A*′*B*′=5, B’C’ = 2*B*′*C*′=2 and C’D’ = 4*C*′*D*′=4, what is the cross ratio \mathcal{CR}(A’,B’,C’,D’)CR(*A*′,*B*′,*C*′,*D*′)? (Just Round it off to two decimals)

**1.91**

Q3. Is it possible that the image of A’B’C’D’*A*′*B*′*C*′*D*′ is the result of a perspective projection from ABCD*ABCD*? (assume that the lengths are the same as those from the previous two questions)

- Yes
**No**

Q4. If not, what should be the length A’B’*A*′*B*′, such that A’B’C’D’*A*′*B*′*C*′*D*′ is indeed the result of a perspective projection from ABCD*ABCD*

- 4
**6**- 7
- It is already a perspective projection

## Robotics: Perception Week 3 Quiz Answers

### Quiz 1: Visual Features

Q1. Features can be useful for

**Image retrieval****Image based localization****Scene reconstruction****Panorama stitching**

Q2. What properties of features are desirable?

- Descriptor variance.
- Descriptor invariance.
- Detection Invariance.
- Detection variance.

Q3. A scale space of an image can be build by

**convolving with gaussian filters and subsampling.**- subsampling.
- convolving the image with itself multiple times.

Q4. The scale of a feature is chosen by first convolving the corresponding image patch with Difference-of-Gaussian (DoG) filters and then, by taking the maximum response over all scales.

- False
**True**

Q5. The SIFT detector is

- Scale but not rotation invariant.
**Scale and rotation invariant**- Rotation but not scale invariant

Q6. To compute the SIFT descriptor

**You compute a histogram of gradients in a 16 by 16 grid and rotate them to have the largest magnitude gradient oriented upwards**- You compute a histogram of colors around a point and rotate it so the brightest patch is up

### Quiz 2: Singular Value Decomposition

Q1. If U \Sigma V^T*U*Σ*V**T* is an SVD for a given matrix A*A* then which if the following statements are true?

**U***U*and V*V*are orthogonal matrices- U
*U*and \SigmaΣ are orthogonal matrices - U
*U*is orthogonal and V*V*is diagonal **U***U*is orthogonal and \SigmaΣ is diagonal

Q2. A symmetric real matrix has real eigenvalues and real singular values. Which of the following is true?

- All eigenvalues are nonnegative.
- Singular values are equal to the eigenvalues.
- All singular values are nonnegative.

Q3. The largest singular value of

- ⎡⎣−200001000⎤⎦
- ⎣⎢⎡−200001000⎦⎥⎤ is

**2**

Q4. Which of the following are valid SVD’s of the form U \Sigma V^T*U*Σ*V**T* for the matrix

A =

⎡⎣0020−10300⎤⎦

*A*=⎣⎢⎡0020−10300⎦⎥⎤

**U=-1U=1;-1;-1**

Q5. Find the rank of the matrix

A =

⎡⎣⎢⎢3235437558377451⎤⎦⎥⎥

*A*=⎣⎢⎢⎢⎡3235437558377451⎦⎥⎥⎥⎤

**4**

Q6. Which of the following is true?

- The rank of matrix is equal to its largest singular value.
**The rank of a matrix is equal to the number of nonzero singular values.**- The rank of matrix has nothing to do with its singular values.

Q7. The minimizer of the fitting cost ||Ax||_2^2∣∣*Ax*∣∣22 with A \in \mathbb{R}^{m \times n}*A*∈R*m*×*n*, \operatorname m > nm>*n* subject to ||x||_2=1∣∣*x*∣∣2=1 is

- The eigenvector of A^TA
*ATA*corresponding to the smallest eigenvalue. - The eigenvector of A^TA
*ATA*corresponding to the largest eigenvalue. - \mathbf{1}_n
**1***n*

Q8. Consider the points (0,-0.8), (1,0), (2.2,0.9), (2.9,2.1)(0,−0.8),(1,0),(2.2,0.9),(2.9,2.1). Which of the following lines best fits the given points?

- 0.59 x – 0.57y = 0.58 0.59
*x*−0.57*y*=0.58 - x – y = 1
*x*−*y*=1 **0.58 x – 0.59y = 0.57 0.58***x*−0.59*y*=0.57

### Quiz 3: RANSAC

Q1. Assume we have a case for RANSAC with 300 samples and 200 inliers. If we pick n = 10*n*=10 samples to build our model, what is the probability that we will build the correct model? (Use 3 decimals of precision)

**0.017**

Q2. For the same description, what is the probability that we won’t build a correct model after k = 100*k*=100 iterations? (Use 3 decimals of precision)

**0.174**

Q3. How many iterations will we need at least, in case the desired RANSAC success rate is p \geq 0.99*p*≥0.99?

**264**

### Quiz 4: 3D-3D Pose

Q1. Find the rotation matrix R*R* such that ||A-RB||_F^2∣∣*A*−*RB*∣∣*F*2 is minimized, where

A = ⎡⎣1111−11−1−11−111⎤⎦, \qquad B = ⎡⎣−1.21310.0851−1.2334−1.4413−0.78580.55250.3470−1.65940.35500.5752−0.7885−1.4309⎤⎦*A*=⎣⎢⎡1111−11−1−11−111⎦⎥⎤,*B*=⎣⎢⎡−1.21310.0851−1.2334−1.4413−0.78580.55250.3470−1.65940.35500.5752−0.7885−1.4309⎦⎥⎤

- R = ⎡⎣−0.89410.1141−0.43300.43680.4355−0.78710.0988−0.8930−0.4392⎤⎦
*R*=⎣⎢⎡−0.89410.1141−0.43300.43680.4355−0.78710.0988−0.8930−0.4392⎦⎥⎤ - R = ⎡⎣0.0623−0.01210.99800.3400−0.9399−0.03270.93840.3413−0.0545⎤⎦
*R*=⎣⎢⎡0.0623−0.01210.99800.3400−0.9399−0.03270.93840.3413−0.0545⎦⎥⎤ - R = ⎡⎣0.6580−0.71890.2242−0.7370−0.6759−0.00420.1545−0.1625−0.9745⎤⎦
*R*=⎣⎢⎡0.6580−0.71890.2242−0.7370−0.6759−0.00420.1545−0.1625−0.9745⎦⎥⎤

**2-0.8941**

### Quiz 5: Pose Estimation

Q1. What is the minimum number of point correspondences required for camera pose estimation given the perspective projections of points with known world coordinates?

**3**

Q2. What is the maximum number of solutions obtained from solving the P3P?

**4**

Q3. Assume that all points in the world lie on the plane Z_w = 0*Z**w*=0. Let K*K* denote the camera calibration matrix. The transformation from the world frame to the camera frame reads R X_w + T*RX**w*+*T*, where R=(r_1 \ r_2 \ r_3)*R*=(*r*1 *r*2 *r*3). Which of the following is the projective transformation from the world plane to the camera?

**K (r_1 \ r_2 \ T)***K*(*r*1*r*2*T*)- K (r_1 \ T \ r_3)
*K*(*r*1*T**r*3) - (r_1 \ r_2 \ T)(
*r*1*r*2*T*) - (T\ r_2 \ r_3)(
*T**r*2*r*3)

Q4. Assume that all points in the world lie on the plane Y_w = 0*Y**w*=0. Let K*K* denote the camera calibration matrix. The transformation from the world frame to the camera frame reads R X_w + T*RX**w*+*T*, where R=(r_1 \ r_2 \ r_3)*R*=(*r*1 *r*2 *r*3). Which of the following is the projective transformation from the world plane to the camera?

- K (r_1 \ r_2 \ T)
*K*(*r*1*r*2*T*) **K (r_1 \ r_3 \ T)***K*(*r*1*r*3*T*)- K (r_1 \ T \ r_3)
*K*(*r*1*T**r*3) - K (r_2 \ r_3 \ T)
*K*(*r*2*r*3*T*)

## Robotics: Perception Week 4 Quiz Answers

### Quiz 1: Epipolar Geometry

Q1. Let \widehat{} : \mathbb{R}^3 \rightarrow \mathbb{R}^{3 \times 3}:R3→R3×3 defined by

u =

⎡⎣*u*1*u*2*u*3⎤⎦

\mapsto\widehat{u} =

⎡⎣0*u*3−*u*2−*u*30*u*1*u*2−*u*10⎤⎦

*u*=⎣⎢⎡*u*1*u*2*u*3⎦⎥⎤↦*u*=⎣⎢⎡0*u*3−*u*2−*u*30*u*1*u*2−*u*10⎦⎥⎤

This is denoted [\cdot]_{\times}[⋅]× in the lectures, and you can consider it the cross product operator. We will be using this notation throughout the rest of the quiz.

Consider two images x_1*x*1, x_2*x*2 of the same point p*p* from two camera positions with relative pose (R,T) \in SE(3)(*R*,*T*)∈*SE*(3), where R \in SO(3)*R*∈*SO*(3) is the relative orientation and T \in \mathbb{R}^3*T*∈R3 is the relative position. Then, x_1,x_2*x*1,*x*2 always satisfy

- x_2^T \widehat{T}Rx_1 = 0
*x*2*T**TRx*1=0 - x_2^T R x_1 = 0
*x*2*T**Rx*1=0 - x_2^T \widehat{T}x_1 = 0
*x*2*T**Tx*1=0 - x_2^T x_1 = 0
*x*2*T**x*1=0

Q2. If R*R* is a rotation matrix, which of the following properties hold?

- R^T \widehat{u} R = \widehat{R^T u}
*RTuR*=*RTu* - \widehat{u}^T = -\widehat{u}
*uT*=−*u* - u^T \widehat{u} = \vec{0}^T
*uTu*=0*T* - \widehat{u}u = \vec{0}
*uu*=0

Q3. Let two cameras with poses g_1=(R_1,T_1) \in SE(3)*g*1=(*R*1,*T*1)∈*SE*(3) and g_2=(R_2,T_2) \in SE(3)*g*2=(*R*2,*T*2)∈*SE*(3). Note that the poses are such that a point X_w*X**w* in the world frame is transformed to the frame of camera i*i* as X_{c,i} = R_i^T(X_w-T_i)*X**c*,*i*=*R**iT*(*X**w*−*T**i*). Which of the following matrices are valid essential matrices, that is they satisfy x_1^T E x_2 = 0*x*1*T**Ex*2=0 for all point correspondences x_1 \leftrightarrow x_2*x*1↔*x*2 ? For convenience let T_{ij} \doteq T_j – T_i*T**ij*≐*T**j*−*T**i* and R_{ij} \doteq R_i^T R_j*R**ij*≐*R**iT**R**j*.

- E = \widehat{R_1^T T_{12}} R_{12}
*E*=*R*1*T**T*12*R*12 - E = \widehat{R_1^T T_{21}} R_{12}
*E*=*R*1*T**T*21*R*12 - E = R_1^T \widehat{T_{21}} R_2
*E*=*R*1*T**T*21*R*2 - E = R_1^T \widehat{T_{12}} R_2
*E*=*R*1*T**T*12*R*2

Q4. The relative pose between two views is (R,T) \in SE(3)(*R*,*T*)∈*SE*(3) where R=I*R*=*I* and T*T* corresponds to a translation of 11m in the direction of the z*z*-axis, which of the following is a valid essential matrix? Hint: use the fact that E = \widehat{T} R*E*=*TR*.

- E =
- ⎡⎣00−1000100⎤⎦
*E*=⎣⎢⎡00−1000100⎦⎥⎤**E =****⎡⎣010−100000⎤⎦***E*=⎣⎢⎡010−100000⎦⎥⎤- E =
- ⎡⎣0000010−10⎤⎦
*E*=⎣⎢⎡0000010−10⎦⎥⎤

Q5. The relative pose between two views is (R,T) \in SE(3)(*R*,*T*)∈*SE*(3) where R=I*R*=*I* and T*T* corresponds to a translation of 11m in the direction of the x*x*-axis, which of the following is a valid essential matrix? Hint: use the fact that E = \widehat{T} R*E*=*TR*.

- E =
- ⎡⎣00−1000100⎤⎦
*E*=⎣⎢⎡00−1000100⎦⎥⎤- E =
- ⎡⎣010−100000⎤⎦
*E*=⎣⎢⎡010−100000⎦⎥⎤**E =****⎡⎣0000010−10⎤⎦***E*=⎣⎢⎡0000010−10⎦⎥⎤

Q6. A nonzero matrix E \in \mathbb{R}^{3 \times 3}*E*∈R3×3 is a an essential matrix if and only if E*E* has a singular value deocmposition (SVD) E = U \Sigma V^T*E*=*U*Σ*V**T* with

- \Sigma = \textrm{diag}(\sigma, \sigma,0\}Σ=diag(
*σ*,*σ*,0} for some \sigma<0*σ*<0 and U,V \in SO(3)*U*,*V*∈*SO*(3). - \Sigma = \textrm{diag}(\sigma,0,0\}Σ=diag(
*σ*,0,0} for some \sigma<0*σ*<0 and U,V \in SO(3)*U*,*V*∈*SO*(3). - \Sigma = \textrm{diag}(\sigma, \sigma,0\}Σ=diag(
*σ*,*σ*,0} for some \sigma>0*σ*>0 and U,V \in SO(3)*U*,*V*∈*SO*(3). - \Sigma = \textrm{diag}(\sigma,0,0\}Σ=diag(
*σ*,0,0} for some \sigma>0*σ*>0 and U,V \in SO(3)*U*,*V*∈*SO*(3).

Q7. Given a real matrix F \in \mathbb{R}^{3 \times 3}*F*∈R3×3 with SVD F = U\textrm{diag}(\lambda_1,\lambda_2,\lambda_3)V^T*F*=*U*diag(*λ*1,*λ*2,*λ*3)*V**T* with U,V \in SO(3)*U*,*V*∈*SO*(3), \lambda_1 \geq \lambda_2 \geq \lambda_3*λ*1≥*λ*2≥*λ*3, then the essential matrix that minimizes the error ||E-F||_F^2∣∣*E*−*F*∣∣*F*2 is given by

- E =U \textrm{diag}(\sigma,0,0)V^T
*E*=*U*diag(*σ*,0,0)*VT*with \sigma = (\lambda_1 + \lambda_2)/2*σ*=(*λ*1+*λ*2)/2. - E =U \textrm{diag}(\sigma,0,0)V^T
*E*=*U*diag(*σ*,0,0)*VT*with \sigma = (\lambda_1 + \lambda_2+\lambda_3)/2*σ*=(*λ*1+*λ*2+*λ*3)/2. - E =U \textrm{diag}(\sigma,\sigma,0)V^T
*E*=*U*diag(*σ*,*σ*,0)*VT*with \sigma = (\lambda_1 + \lambda_2+\lambda_3)/2*σ*=(*λ*1+*λ*2+*λ*3)/2. - E =U \textrm{diag}(\sigma,\sigma,0)V^T
*E*=*U*diag(*σ*,*σ*,0)*VT*with \sigma = (\lambda_1 + \lambda_2)/2*σ*=(*λ*1+*λ*2)/2.

Q8. How many point correspondences are required to obtain an essential matrix using the linear algorithm?

- 4
- 5
- 6
**8**

Q9. Which of the following are valid essential matrices?

- E =
- ⎡⎣01/2√00010−1/2√0⎤⎦
*E*=⎣⎢⎡01/200010−1/20⎦⎥⎤- E =
- ⎡⎣01/2√01010−1/2√0⎤⎦
*E*=⎣⎢⎡01/201010−1/20⎦⎥⎤- E =
- ⎡⎣200010000⎤⎦
*E*=⎣⎢⎡200010000⎦⎥⎤- E =
- ⎡⎣100010000⎤⎦
*E*=⎣⎢⎡100010000⎦⎥⎤

Q10. Suppose we know the camera motion always moves on a plane, say the XY*XY*– plane (i.e. translation with only x and y components and rotation only about the z-axis). The essential matrix E = \widehat{T}R*E*=*TR* has the special form

**E =****⎡⎣00***c*00*dab*0⎤⎦**, \qquad a,b,c,d \in \mathbb{R}***E*=⎣⎢⎡00*c*00*d**ab*0⎦⎥⎤,*a*,*b*,*c*,*d*∈R- E =
- ⎡⎣
*a*000*bc*00*d*⎤⎦ - , \qquad a,b,c,d \in \mathbb{R}
*E*=⎣⎢⎡*a*000*bc*00*d*⎦⎥⎤,*a*,*b*,*c*,*d*∈R - E =
- ⎡⎣0
*bca*0000*d*⎤⎦ - , \qquad a,b,c,d \in \mathbb{R}
*E*=⎣⎢⎡0*bc**a*0000*d*⎦⎥⎤,*a*,*b*,*c*,*d*∈R

Q11. Now, assuming the same scenario as in the previous , which of the following solutions for (R,T)(*R*,*T*) in terms of a,b,c,d*a*,*b*,*c*,*d* are valid? Assume that a^2+b^2=1*a*2+*b*2=1 and c^2+d^2=1*c*2+*d*2=1.

**T =****⎡⎣−***ba*0⎤⎦**, \qquad R =****⎡⎣−***bd*−*acad*−*bc*0−*ad*+*bc*−*bd*−*ac*0001⎤⎦*T*=⎣⎢⎡−*ba*0⎦⎥⎤,*R*=⎣⎢⎡−*bd*−*acad*−*bc*0−*ad*+*bc*−*bd*−*ac*0001⎦⎥⎤- T =
- ⎡⎣−
*ba*0⎤⎦ - , \qquad R =
- ⎡⎣−
*bd*+*acad*+*bc*0−*ad*+*bc*−*bd*−*ac*0001⎤⎦ *T*=⎣⎢⎡−*ba*0⎦⎥⎤,*R*=⎣⎢⎡−*bd*+*acad*+*bc*0−*ad*+*bc*−*bd*−*ac*0001⎦⎥⎤- T =
- ⎡⎣−
*ba*0⎤⎦ - , \qquad R =
- ⎡⎣
*bd*−*acad*+*bc*0−*ad*−*bcbd*−*ac*0001⎤⎦ *T*=⎣⎢⎡−*ba*0⎦⎥⎤,*R*=⎣⎢⎡*bd*−*acad*+*bc*0−*ad*−*bcbd*−*ac*0001⎦⎥⎤

Q12. In general, given a normalized essential matrix, we get m*m* distinct poses (R,T)(*R*,*T*) and by enforcing the positive depth constraint, we end up with n*n* valid poses. Which of the following is true?

- (m,n) = (2,1)(
*m*,*n*)=(2,1) **(m,n) = (4,1)(***m*,*n*)=(4,1)- (m,n) = (4,2)(
*m*,*n*)=(4,2) - (m,n) = (8,2)(
*m*,*n*)=(8,2)

### Quiz 2: Nonlinear Least Squares

Q1. Which of the following cost functions can be minimized in the framework of linear least squares? (Note the underscore on the norm refers to the p-norm)

- f(x) = ||x x^T – b||_2
*f*(*x*)=∣∣*xxT*−*b*∣∣2 **f(x) = ||Ax – b||_2^2***f*(*x*)=∣∣*Ax*−*b*∣∣22- f(x) = ||Ax – b||_1
*f*(*x*)=∣∣*Ax*−*b*∣∣1

Q2. Consider the problem of minimizing f(x) = ||Ax-b||_2^2*f*(*x*)=∣∣*Ax*−*b*∣∣22, where the rank of A*A* is larger than the dimension of x*x*. Which of the following corresponds to the optimality condition?

- x=b
*x*=*b* **A^TAx=A^Tb***ATAx*=*ATb*- x=AA^Tb
*x*=*AATb*

Q3. Minimizing ||f(x)-b||^2∣∣*f*(*x*)−*b*∣∣2 is prone, in general, to the existence of local minima.

**True**- False

Q4. Examples of nonlinear least squares problems include

**Perspective-n-Point****Triangulation**- Line fitting

Q5. Assume we want to minimize ||f(x)-b||_2^2∣∣*f*(*x*)−*b*∣∣22. Then, the (globally) optimal solution satisfies

- \dfrac{\partial f(x)}{\partial x}^T f(x)=\dfrac{\partial f(x)}{\partial x}^Tx∂
*x*∂*f*(*x*)*Tf*(*x*)=∂*x*∂*f*(*x*)*Tx* - \dfrac{\partial f(x)}{\partial x}^T x=\dfrac{\partial f(x)}{\partial x}^Tb∂
*x*∂*f*(*x*)*Tx*=∂*x*∂*f*(*x*)*Tb* **\dfrac{\partial f(x)}{\partial x}^T f(x) =\dfrac{\partial f(x)}{\partial x}^Tb∂***x*∂*f*(*x*)*Tf*(*x*)=∂*x*∂*f*(*x*)*Tb*

Q6. If a point satisfies the condition of the previous then it is globally optimal.

- True
**False**

### Quiz 3: 3D Velocities from Optical Flow

Q1. The equation of optical flow given in Lecture is:

u = \frac{1}{Z} (*x**V**z*−*V**x**y**V**z*−*V**y*) + (*x**y*(1+*y*2)−(1+*x*2)−*x**y**y*−*x*) \Omega *u*=*Z*1(*x**V**z*−*V**x**y**V**z*−*V**y*)+(*x**y*(1+*y*2)−(1+*x*2)−*x**y**y*−*x*)Ω

What does the V*V* in this equation represent?

- Angular Velocity
**Heading Direction**- Inverse Depth

Q2. What was the constraint \mathbf{I}(\mathbf{x}) = \mathbf{J}(\mathbf{x} + \mathbf{d}) **I**(**x**)=**J**(**x**+**d**) that we used to find the optical flow called?

- \mathbf{I}
**I**-\mathbf{J}**J**Constancy Constraint - Image Equality Constraint
- None of the above

Brightness Constancy Constraint

Q3. In trying to minimize \|\mathbf{I}(\mathbf{x}) – \mathbf{J}(\mathbf{x}+\mathbf{d}) \|∥**I**(**x**)−**J**(**x**+**d**)∥, we use which of the following items?

**Taylor Expansion \mathbf{J}(\mathbf{x} + \mathbf{d}) = \mathbf{J}(\mathbf{x}) + \frac{\delta \mathbf{J}(\mathbf{x})}{\delta \mathbf{x}} \mathbf{d}J(x+d)=J(x)+***δ*x*δ*J(x)d**Iterating to get incrementally closer the the optimal solution**- The second derivative of the image \frac{\delta^2 \mathbf{J}(\mathbf{x})}{\delta \mathbf{x}^2}
*δ***x**2*δ*2**J**(**x**) **The second moment matrix \frac{\delta \mathbf{J}(\mathbf{x})}{\delta \mathbf{x}}^T \frac{\delta \mathbf{J}(\mathbf{x})}{\delta \mathbf{x}}***δ*x*δ*J(x)*Tδ*x*δ*J(x)- The derivative of the second image \frac{\delta \mathbf{I}(\mathbf{x})}{\delta \mathbf{x}}
*δ***x***δ***I**(**x**)

### Quiz 4: Bundle Adjustment

Q1. Bundle adjustment corresponds to minimization of

- 3D Error
**Reprojection Error**

Q2. Bundle adjustment corresponds to optimization of a cost function with respect to

- Camera orientation
- Camera position
- 3D position of feature points
**All of the above**

Q3. Assume that we want to minimize ||f(x)-b||_2^2∣∣*f*(*x*)−*b*∣∣22. A first order Taylor expansion of f(x)*f*(*x*) around the current value yields f(x+\Delta x) \approx f(x) + \dfrac{\partial f(x) }{\partial x} \Delta x *f*(*x*+Δ*x*)≈*f*(*x*)+∂*x*∂*f*(*x*)Δ*x*. Then, we update as x_{k+1} = x_k + \Delta x*xk*+1=*xk*+Δ*x* where \Delta xΔ*x* satisfies

- \dfrac{\partial f(x) }{\partial x}^T \dfrac{\partial f(x) }{\partial x} \Delta x = – \dfrac{\partial f(x) }{\partial x}^T f(x) ∂
*x*∂*f*(*x*)*T*∂*x*∂*f*(*x*)Δ*x*=−∂*x*∂*f*(*x*)*Tf*(*x*) **\dfrac{\partial f(x) }{\partial x}^T \dfrac{\partial f(x) }{\partial x} \Delta x = \dfrac{\partial f(x) }{\partial x}^T (b-f(x)) ∂***x*∂*f*(*x*)*T*∂*x*∂*f*(*x*)Δ*x*=∂*x*∂*f*(*x*)*T*(*b*−*f*(*x*))- \dfrac{\partial f(x) }{\partial x}^T \dfrac{\partial f(x) }{\partial x} \Delta x = \dfrac{\partial f(x) }{\partial x}^T b ∂
*x*∂*f*(*x*)*T*∂*x*∂*f*(*x*)Δ*x*=∂*x*∂*f*(*x*)*Tb*

Q4. Which of the following tools are useful in a visual odometry framework

**Bundle adjustment over sliding window****Key frame selection****Visual loop closure when places are revisited**

Q5. Select any answer that is an indispensable part of a structure from motion pipeline.

**Pairwise feature matching**- Image blending
- Triangulation of feature points
**Bundle adjustment****Object detection****Outlier rejection with RANSAC****Essential matrix computation**

#### Get all Quiz Answers of Robotics Specialization

Course 01: Robotics: Aerial Robotics Quiz Answers

Course 02: Robotics: Computational Motion Planning Quiz Answers

Course 03: Robotics: Mobility Quiz Answers