0% found this document useful (0 votes)
46 views8 pages

AT70.20: Applied Machine Vision, Midterm Exam: Mon Feb 27, 2017

The document provides guidelines and questions for a midterm exam in applied machine vision. It includes 4 questions related to finding lines and planes from equations, fitting data to a logarithmic model using least squares optimization, calculating coordinate transformations between camera and world frames, and using RANSAC to estimate a homography from putative feature correspondences.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views8 pages

AT70.20: Applied Machine Vision, Midterm Exam: Mon Feb 27, 2017

The document provides guidelines and questions for a midterm exam in applied machine vision. It includes 4 questions related to finding lines and planes from equations, fitting data to a logarithmic model using least squares optimization, calculating coordinate transformations between camera and world frames, and using RANSAC to estimate a homography from putative feature correspondences.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

AT70.

20: Applied Machine Vision, Midterm Exam

Mon Feb 27, 2017

Name: Solution

Student ID:

Guidelines:
 READ EACH QUESTION CAREFULLY.
 This is exam is 2.5 hours.
 Fill in your name and student ID above.
 Fill in each question with your answer below. Images should be inserted inline into the
document.
 When you are finished, export this document as a PDF file with filename ID­midterm.pdf,
e.g., 104259­midterm.pdf if your student ID is 104259. Please take care to name your
file properly.
 Be sure to check that your PDF displays correctly in Adobe Reader or evince.
 At the end of the exam, copy your PDF file to the proctor's memory stick.
 After you have copied your PDF to the proctor's memory stick, email the PDF file to
mdailey@ait.asia and note that the emailed copy is just a backup. It is your
responsibility to ensure that your file is properly copied to the proctor's memory stick.
 While working on the exam, you may use any resources available in your books, personal notes,
and on the Internet, but you MAY NOT INTERACT WITH LIVE HUMAN BEINGS. You
cannot send email to anyone (except for the instructor, AFTER you have finished the exam),
receive email from anyone, chat with anyone, or do instant messaging with anyone. Be sure to
TURN OFF your mobile phone and any instant messaging, chat, and email clients BEFORE
THE EXAM STARTS. Anyone caught violating these procedures by the proctors will be dealt
with severely, including an F for the course, a letter in your file, and a letter to the Dean.
 This is a long exam. You can't afford to spend too much time searching the Internet for the
answer. Spend your time thinking, designing, and coding, not searching.
 Use your time wisely. Note that I give partial credit, so you should be sure to attempt every
question, even if your solution is not quite perfect.
 Relax, enjoy the exam, use your brain, and good luck!
Question 1 (15 points)
Let L be the 3D line formed by the intersection of the planes
-0.130672 X + 0.038257 Y + 0.203049 Z - 0.812205 = 0
and
1.090194 X - 0.239195 Y + 1.335786 Z + 0.738230 = 0.
Find the intersection of L with the planes Z = 0 and Z = 1.
L is all linear combinations of the vectors in the basis of the null space of the linear homogeneous
system, i.e.,
-0.19420 -0.79339
0.93841 -0.32145
0.25026 0.46371
0.13801 0.22843
Two points on the line are thus (-1.4071, 6.7996, 1.8134) and (-3.4732, -1.4072, 2.0300). For z=0 we
have
(15.88609, 75.49135, 0.00000)
and for z=2 we have
(6.3495, 37.6103, 1.0000).

Question 2 (15 points)


Suppose you have 10 pairs of noisy measurements (x,y) and you know that x and y are related by the
equation
y = a1 + a2log(a3x)
where a1, a2, and a3 are unknown constants. Suppose the 10 pairs of measurements are as follows (each
row is an x, y pair):
9.15964 8.39477
3.27363 6.97134
8.18111 8.32652
3.94768 7.10584
8.60754 7.97652
1.86671 5.82254
0.10667 1.93339
6.94183 8.03470
7.58933 8.27159
9.64900 8.43694
Use Levenburg-Marquardt minimization to find least-squares solutions to the system given initial
guesses [0.01, 0.01, 0.01] and [2, 1, 6]. Insert the solutions you found here. Also insert the source code
of the error function you passed to leasqr().
Objective function:
function Y = obj(X,P)
  if (P(3) < 0.01)
    P(3) = 0.01;
  end
  Y = P(1) + P(2) * log(P(3)*X);
end
I get (3.2443, 1.4563, 3.6756) for (0.01,0.01,0.01) and (2.1258, 1.4562, 7.9257) for (2, 1, 6).

Question 3 (40 points)


Suppose I have a UAV with a downward facing camera. Consider the following:
1. The vehicle coordinate system has x pointing forward and y pointing to the right.
2. The camera is mounted 15cm in front of and 10cm below the origin of the vehicle coordinate system
pointing directly downward, with the x axis of the camera pointing to the drone’s right and the y axis of
the camera pointing toward the drone’s rear.
3. The world coordinate system has the ground plane coincident with the xy plane.
4. At time T0, the drone is hovering exactly 10 meters above the ground, directly above the world
coordinate point (4.0, 6.0, 0), with 0 pitch and 0 roll, with the front of the vehicle rotated 30 degrees to
the left of the world coordinate x axis direction.
5. At time T1, the drone has moved forward 1 meter.
6. The camera is a perfect pinhole camera producing 640x480 images with a focal length of 500 and
principle point at (320,240).
In the space below, provide a 3D homography (4x4 Euclidean transformation matrix) transforming
points from the world coordinate system to the UAV coordinate system at time T0.
I get
0.86603 0.50000 0.00000 -6.46410
0.50000 -0.86603 0.00000 3.19615
0.00000 0.00000 -1.00000 10.00000
0.00000 0.00000 0.00000 1.00000.
This comes from letting Rvw be
|1 0 0| |0.86603 -0.50000 0.00000|
|0 -1 0| * |0.50000 0.86603 0.00000|
|0 0 -1| |0.00000 0.00000 1.00000|
then letting Tvw be [ Rvw, -Rvw*[4;6;10] ; 0 0 0 1 ].
In the space below, provide a 3D homography (4x4 Euclidean transformation matrix) transforming
points from the vehicle coordinate system to the camera coordinate system.
Well, Rcv = [ 0 1 0 ; -1 0 0 ; 0 0 1 ] so I get [ Rcv, -Rcv*[0.15;0;0.1] ] which is
0.00000 1.00000 0.00000 0.00000
-1.00000 0.00000 0.00000 0.15000
0.00000 0.00000 1.00000 -0.10000
0.00000 0.00000 0.00000 1.00000
In the space below, write the camera calibration matrix K for the camera.
500 0 320
0 500 240
0 0 1
In the space below, write the 3x4 projective matrix P0 for the camera at time T0.
2.5000e+02 -4.3301e+02 -3.2000e+02 4.7661e+03
-4.3301e+02 -2.5000e+02 -2.4000e+02 5.6831e+03
0.0000e+00 0.0000e+00 -1.0000e+00 9.9000e+00
In the space below, write what image point the world point (6.0, 7.0, 2.0) will project to at time T0.
I get (328.4794, 108.2246).
In the space below, write what world coordinate point is at the intersection of the ray from the camera
center through image point (50, 60) with the ground plane at time T0.
I get (4.54342, 12.48677, 0.00000)
At time T1, after the drone moves forward one meter, what will the new value of P be? Write your
answer below.
2.5000e+02 -4.3301e+02 -3.2000e+02 4.7661e+03
-4.3301e+02 -2.5000e+02 -2.4000e+02 6.1831e+03
0.0000e+00 0.0000e+00 -1.0000e+00 9.9000e+00
Find a 2D homography mapping points on the image of the ground plane at time T0 to the image of the
ground plane at time T1. Write the homography H in the space below. Hint: project 4 world points on
the ground plane into the image at times T0 and T1, and use the resulting image point correspondences
to calculate a homography.
Sample 3D points:
4 5 5 4
6 6 5 5
0 0 0 0
1 1 1 1
Correspondences:
320.0000 345.2525 388.9912 363.7387
247.5758 203.8371 229.0896 272.8283
1.0000 1.0000 1.0000 1.0000
in correspondence with
320.0000 345.2525 388.9912 363.7387
298.0808 254.3422 279.5947 323.3333
1.0000 1.0000 1.0000 1.0000
So I get
1.00000 -0.00000 0.00000
0.00000 1.00000 50.50511
0.00000 0.00000 1.00000

Question 4 (30 points)


Use RANSAC to find a good homography for the set of putative correspondences at the end of this
document. Assume outliers are random uniform and inliers have sampling noise that is Gaussian with a
standard deviation of 1 in both x and y. Write your estimate of H in the space below.
0.304735 -0.015784 -3.118201
-0.099895 0.235355 -11.598582
-0.045260 -0.032566 1.000000
How many inliers do you think there are among the data I provided?
For that run I had 69 inliers. There were actually 68 in the data set, so one of the outliers
happened to be close enough with this homography.
Given the inlier ratio you found above, how many RANSAC rounds should we run to ensure a 99.9%
probability of finding four inliers?
You only need 27 iterations.
By the way the actual homography was
H = [ 1.1662 -0.12414 33.119
-0.20029 0.97139 -71.517
-0.26970 -0.11550 1 ];
Here are the data. Each row is one correspondence. The first two values are the x and y coordinates in
image 1, and the second two values are the possibly corresponding x and y coordinates in image 2.

4.4122e+02 3.5669e+02 -2.3601e+00 -1.7256e-01


1.4102e+02 4.5156e+02 -1.2853e+00 -3.9569e+00
1.3801e+01 4.0302e+02 1.1422e+02 4.6162e+02
4.2605e+02 3.4917e+02 2.6323e+02 1.5949e+02
5.1989e+02 2.3802e+02 8.2251e+01 3.9666e+02
2.6386e+02 2.7864e+02 3.1431e+02 7.5606e+01
1.3909e+02 1.2320e+02 -3.3999e+00 -1.1976e+00
5.5778e+01 4.5022e+02 4.7082e+01 3.6045e+02
4.3003e+02 2.7685e+02 -3.0426e+00 -5.0519e-01
6.3113e+02 4.6688e+02 -3.8098e+00 -2.1954e-01
2.5758e+02 3.3289e+02 -1.5893e+00 -5.5791e-01
1.8767e+02 3.8154e+02 -2.9630e+00 -8.7075e-01
3.7777e+02 4.7581e+02 2.3548e+02 1.7307e+02
1.8511e+02 4.6053e+02 4.9810e+02 2.8688e+02
1.9170e+02 1.1619e+02 -4.6653e+00 2.9691e-01
3.7304e+02 3.9895e+01 -4.4937e+00 2.0168e-01
6.0214e+02 4.4121e+02 -3.2844e+00 4.8423e-01
4.3120e+02 1.1175e+02 9.0500e+01 7.3717e+01
5.9259e+02 4.5582e+02 -5.2435e-01 -1.1419e+00
6.0639e+01 4.6427e+02 8.4312e-01 -5.9158e+00
2.7896e+02 9.9037e+01 1.9727e+02 3.1475e+02
4.5324e+02 1.0598e+02 -4.1944e+00 2.7562e-01
3.0354e+02 9.4212e+01 -3.2864e+00 3.8957e-01
1.3696e+02 3.1481e+02 -1.7484e+00 -2.4544e+00
1.5759e+02 2.5293e+02 -3.6322e+00 -1.3200e+00
3.1094e+02 2.0235e+02 -3.8414e+00 -1.0901e+00
1.7343e+02 4.2333e+02 -3.4569e+00 -3.9371e+00
3.6762e+01 3.5834e+02 -5.5590e-03 -5.3016e+00
5.1635e+01 3.1612e+02 9.7439e-01 -5.7353e+00
5.9343e+02 4.2102e+02 -2.8265e+00 -1.2313e+00
4.8460e+02 3.9469e+02 2.6387e+02 2.2237e+02
5.5373e+02 3.7907e+02 -3.0684e+00 1.9494e-01
1.9614e+02 2.1430e+02 -3.1453e+00 -2.0243e+00
2.9462e+02 4.0101e+02 5.6956e+02 2.7592e+02
2.8031e+02 3.1582e+02 -2.3848e+00 -1.3164e+00
5.4560e+02 2.0473e+02 4.4105e+02 9.8418e+01
3.9384e+02 3.9231e+02 -3.0280e+00 -1.7480e+00
2.8618e+02 1.1187e+02 -2.9945e+00 2.5118e-02
2.7596e+02 9.2459e+01 -4.7321e+00 -3.9205e-01
2.5694e+02 9.5804e+01 5.2348e+02 2.3251e+02
3.3113e+01 1.3068e+02 1.0516e+02 5.9488e+01
2.7123e+02 2.0288e+02 5.2148e+02 2.2484e+02
5.5682e+01 3.3354e+02 -2.1124e+00 -4.6259e+00
6.3525e+02 3.7279e+02 -4.9155e+00 -5.6509e-01
1.5485e+02 1.3192e+02 -4.4178e+00 -6.0131e-01
2.4838e+02 2.5302e+02 5.4069e+02 1.0883e+02
8.0836e+00 4.2469e+02 -3.1172e-01 -7.3603e+00
3.0633e+02 3.7853e+02 -3.4256e+00 -1.4643e+00
7.6750e+00 3.9950e+02 5.7335e-01 -6.6080e+00
5.6985e+02 1.2186e+02 5.5998e+02 4.6348e+02
6.0806e+02 1.6507e+02 4.9816e+02 2.0361e+01
3.7305e+01 3.5775e+01 -5.1847e+00 4.9041e+00
4.7051e+02 4.4193e+02 -3.3045e+00 -1.4723e+00
2.7733e+02 4.6868e+02 -2.1378e+00 -2.2239e+00
2.9923e+02 4.3434e+02 -3.7926e+00 -2.1575e+00
3.1605e+01 4.0135e+02 8.9749e+01 6.5536e+01
5.1532e+01 2.8080e+02 -7.7820e-01 -4.7095e+00
4.8577e+02 3.4410e+02 -1.3216e+00 -2.7655e+00
5.4407e+02 3.2195e+02 -2.7440e+00 5.8397e-01
5.2658e+01 3.0577e+02 -1.7303e+00 -5.0547e+00
3.2859e+02 2.0973e+01 -5.7084e+00 6.7488e-01
5.4132e+02 2.5211e+02 2.1954e+02 4.0518e+02
2.9132e+02 2.5204e+02 -3.5410e+00 -1.7173e+00
6.2327e+02 3.8025e+02 -5.1229e+00 -9.3900e-01
4.6068e+02 4.2227e+02 -2.8825e+00 -1.0694e+00
2.6908e+02 2.1610e+02 -4.7266e+00 -1.7918e+00
5.9754e+02 9.9301e+01 -3.9602e+00 1.3621e+00
3.5477e+02 3.3707e+02 -3.0081e+00 -1.5099e+00
4.3446e+02 3.2005e+02 -1.7924e+00 -2.2342e+00
3.5697e+02 1.4707e+02 -3.0883e+00 5.8945e-01
2.7596e+02 4.9161e+01 5.1468e+02 4.7889e+02
2.5540e+02 2.6893e+02 -3.8181e+00 -1.8020e+00
4.8040e+01 4.7137e+02 3.7674e+02 6.5381e+01
3.3635e+02 3.3346e+02 -2.3085e+00 -1.6912e+00
3.3770e+02 2.2970e+02 6.0892e+02 1.1993e+02
5.4549e+02 9.6269e+00 -5.5029e+00 5.2547e-01
4.0142e+02 2.0608e+02 -4.7220e+00 -1.4602e-01
2.3762e+02 1.8168e+02 -2.9049e+00 -5.7438e-01
5.3360e+02 2.8132e+02 4.5625e+02 2.3194e+01
3.1358e+02 2.2596e+02 -3.5245e+00 -1.9968e+00
1.1554e+02 9.0529e+01 2.4397e+01 3.7688e+02
2.7537e+01 2.8960e+02 1.6481e+02 4.6060e+02
2.7134e+02 1.7282e+02 3.6070e+02 7.0852e+01
3.6942e+02 2.9681e+02 -3.1730e+00 -1.5885e+00
2.3496e+02 1.2060e+02 -2.2845e+00 -3.8655e-01
1.9637e+02 2.1952e+02 -1.9660e+00 -2.6976e+00
9.8016e+01 1.7705e+02 -3.4515e+00 7.1545e-03
2.3174e+02 1.7245e+02 -3.3155e+00 6.6318e-02
6.1424e+02 4.0837e+02 -3.3307e+00 -9.2676e-01
4.4880e+02 2.2458e+02 4.0821e+02 2.1841e+02
5.8479e+02 3.4771e+02 -2.6328e+00 1.8879e-01
5.0884e+02 3.3654e+01 -5.1868e+00 -8.7152e-01
8.2269e+01 8.2086e+01 -2.3295e+00 1.0687e+00
8.7864e+00 1.9540e+01 2.2020e+01 2.3156e+02
1.7974e+02 3.7486e+02 1.9284e+02 3.1235e+02
1.8886e+02 4.2250e+02 5.1811e+02 5.6626e+01
5.9219e+02 3.0671e+02 -3.8343e+00 -1.2813e+00
7.8470e+01 1.6990e+02 -1.7389e+00 -2.4384e+00
1.6837e+02 3.3281e+02 6.1567e+02 7.9392e+01
2.3116e+02 4.0308e+02 -1.2515e+00 -2.1539e+00

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy