EE454-CMPEN/EE454代写
时间:2023-07-27

CMPEN/EE 454 Spring2020 ***** SAMPLE QUESTIONS MIDTERM 2 *******
1
Question 1: Similar Triangles (15pts [5+5+5])
Consider an airport hallway that is 20m tall, 20m wide and 100m long. The world coordinate system
U-V-W is located at one corner of the hallway, as shown in the figure below. A perspective camera
with focal length of 60mm is placed at the opposite end of the hall, in the middle of the wall, as shown
by camera coordinate system X-Y-Z in the figure. Assume the camera is taking a picture of a person
running to catch their flight, and that the person is currently halfway down the hallway. The person is
2 meters tall (picture is not drawn to scale). Refer to this scenario to answer the following questions.
1) Compute the height in mm of the image of the person, assuming the vertical centerline of the
person lies within the plane U=50.
Height = _________mm
2) After a little while, the person has run all the way down the hallway, so that their vertical centerline
lies within the plane U=0. How tall do they then appear to be in the image, in mm?
Height = _________mm
3) Recompute the height value for the situation in part 4.2), for a camera that has a focal length
of 120 mm instead of 60 mm.
Height = _________mm
Hint: For this example, does it matter what the V and W coordinates of the camera location are?
2.4
1.2
2.4
f * height / distance
60mm * (2m / 50m)
CMPEN/EE 454 Spring2020 ***** SAMPLE QUESTIONS MIDTERM 2 *******
2
Question  2,  Camera  Projection  (20  points):
A camera is located and oriented with respect to a world coordinate system as shown in the following
figure. In particular, the origin of the world coordinate system is located at point (0,75,500) with
respect to the camera coordinate system.
[10 pts] Specify the 4x4 rotation and translational offset matrices that transform a point in World
coordinates (U,V,W,1) to a point in Camera coordinates (x,y,z,1), in homogeneous coordinates. Keep
the two matrices separate, by filling in the values below:
rotation (4x4) offset (4x4)
continued on next page
1 0 0 500
0 1 0 0
0 0 1 -75
0 0 0 1
0 -1 0 0
0 0 -1 0
1 0 0 0
0 0 0 1
Be careful here! For offset matrix we need
to know location of camera wrt world
coordinate system. Camera is located
500mm away along world –X axis, 0mm
along Y axis, and 75mm along Z axis. So
camera is at (-500,0,75) in world coords.
U
V
W
U
V
W
CMPEN/EE 454 Spring2020 ***** SAMPLE QUESTIONS MIDTERM 2 *******
3
Question  2  continued:
(5pts) Assume that we have performed the World to Camera transformation correctly on the previous
page. We now want to project a 3D point (x,y,z) from camera coordinates into a 2D point (x’,y’) in
the film plane for a camera focal length of 80mm. Specify a 3x4 matrix that does the appropriate 3D
to 2D projection. [note: the film coordinates will thus be computed in mm when using this matrix].
Fill in the values of the 3x4 projection matrix below:
Camera to film plane
projection (3x4)
~
x’
y’
(0,0)
360
mm
640mm
u
v
(0,0)
(640,480)
Film Coords Image Coords
Film to pixel affine
transform (3x3)
u
v
1 0 0 1
x’
y’
x’
y’
80 0 0 0
0 80 0 0
0 0 1 0
1 0 320
0 1 180
(5pts) Finally, we want to convert from (x’,y’) film coordinates into (u,v) image pixel coordinates. The
sensor width and height is 640x480mm and each 1mm X 1mm square gets digitized into a separate
pixel value. Refer to the following two diagrams of the film coordinate and pixel coordinate systems.
Fill in the values of the 3x3 matrix transforming film coordinates to pixel coordinates.
CMPEN/EE 454 Spring2020 ***** SAMPLE QUESTIONS MIDTERM 2 *******
page 4
Question  3.  World  to  Camera,  and  E=RS
U
V
W
The  figure  above  shows  world  coordinate  system  U-­V-­W  along  with  a  train  and  a  fly.    A  
camera  mounted  on  the  train  has  local  coordinate  axes  X-­Y-­Z  as  shown.    Assume  the  train  
camera  is  located  at  (100,50,0)  in  world  coordinates.    The  fly  is  located  at  (200,40,10)  in  
world  coordinates.
A)  Show  the  rotation  and  offset  matrices  that  transform  a  point  in  world  coordinates  into  a  
point  in  camera  coordinates.
U
V
W
X
Y
Z
B)  If  the  focal  length  of  the  camera  is  10mm,  where  does  the  image  of  the  fly  appear  in  the  
film  plane  of  the  camera?
1 0 0 -100
0 1 0 -50
0 0 1 0
0 0 0 1
0 0 1 0
0 -1 0 0
1 0 0 0
0 0 0 1
Plugging in u,v,w = 200,40,10 we see that the fly is located at x,y,z = 10,10,100
in camera coords. The film coordinates of the fly will be fx/z, fy/z = (1,1)
CMPEN/EE 454 Spring2020 ***** SAMPLE QUESTIONS MIDTERM 2 *******
page 5
Question  3.  World  to  Camera,  and  E=RS  (continued)
U
V
W
C)  We  now  have  added  a  second  camera  on  the  fly,  shown  as  red  coordinate  axes.    
Compute  the  Essential  Matrix  E=RS  assuming  the  train  camera  is  the  “left  camera”,  and  
the  fly  camera  is  the  “right  camera”.
x
y
z
From computing the previous answer we know the fly is located at (10,10,100)
in camera coordinates, so tx = 10, ty = 10, tz = 100.
Therefore, S = =
relative rotation R= (worked out using method of lecture14
using train as “world” and fly as “camera”)
So E = RS = =
0 -tz ty
tz 0 -tx
-ty tx 0
0 -100 10
100 0 -10
-10 10 0
0 1 0
1 0 0
0 0 -1
0 1 0
1 0 0
0 0 -1
0 -100 10
100 0 -10
-10 10 0
100 0 -10
0 -100 10
10 -10 0
CMPEN/EE 454 Spring2020 ***** SAMPLE QUESTIONS MIDTERM 2 *******
page 6
Question  4.  The  Essential  Matrix
Consider  the  following  Essential  Matrix
that  relates  left  and  right  images  from
a  stereo  pair.    
(2  pts)  Given  point  (q,r,1)  in  the  left  image,  what  is  the  equation  of  the  corresponding  
epipolar line  in  the  right  image?    [equation  of  a  line  is  of  the  form  ax  +  by  +  c  =  0]
(2  pts)  Given  point  (s,t,1)  in  the  right  image,  what  is  the  equation  of  the  corresponding  
epipolar line  in  the  left  image?
(2  pts)  What  is  the  location  of  the  epipole in  the  left  image?    Represent  the  result  as  
either  an  image  point  or  a  homogeneous  coordinate  vector.
(2  pts)  What  is  the  location  of  the  epipole in  the  right  image?    Represent  the  result  as  
either  an  image  point  or  a  homogeneous  coordinate  vector.
(3  pts)  Could  this  particular  essential  matrix  be  describing  a  stereo  pair  where  the  two  
cameras  are  related  by  a  pure  translational  offset  (orientations  of  axes  are  the  same,  i,e.  
relative  rotation  between  them  is  the  identity  matrix)?    Answer  YES or  NO,  and  briefly  
explain  your  answer.
(3  pts)  )  Is  it  possible  to  have  an  epipolar geometry  where  epipolar lines  are  all  horizontal  
in  the  left  image  and  all  vertical  in  the  right  image?  Answer  YES  or  NO ,  but  also  
explain  how  or  explain  why  it  can’t  happen.
0 1 0
0 0 -­1
0 0 0
E  =
r  x  +  (-­1)  y  +  0  =  0
0  x  +  s  y  +  (-­t)  =  0
[k  0  0]’    à at  infty  in  direction  (1,0)
[0  0  k]    à at  (0,0)  
NO,    E=I*S=S    and  matrix  does  not  look  like  S  (not  skew  symmetric)
YES!     Take  the  usual  simple  stereo  setup  and  rotate  right  camera  by  90  degrees  around  Z  axis.      There  isn’t  an  
algorithmic  procedure  for  determining  this  – you  think  
about  it  for  a  bit  and  either  get  the  answer  or  you  don’t.  
I  include  small  questions  like  this  in  to  identify  which  
students  have  a  good  conceptual  understanding  of
the  material  vs  those  who  simply  learned  how  to  
perform  the  rote  procedural  computations.  
CMPEN/EE 454 Spring2020 ***** SAMPLE QUESTIONS MIDTERM 2 *******
7
transformation                                    degrees  of  freedom                number  of  correspondences
Translation                                                                2                                                                                      1
Euclidean  (rigid)                                          ___________                                                    _____________
Scaled  Euclidean
(aka  Similarity)                                ___________                                                    _____________  
Affine                                                                          ___________                                                      _____________
Projective
(aka  Homography)                  ___________                                                    _____________  
3 2 note: ceil(3/2)
4
6
8
2
3
4
Question5. Image  Transformations   (10  pts).  
In  lecture  21  we  listed  several  2D  planar  transformations  that  map  (x,y)  points  in  
one  image  into  (x’,y’)  points  in  a  second  image.    Identify  how  many  degrees  of  
freedom  (unknown  parameters)  the  following  geometric  transformations  have,  and  
determine  the  minimum  number  of  point  correspondences  (matches)  that  are  
needed  to  estimate  the  parameters  of  that  transformation  using  either  least  
squares  or  RANSAC.
CMPEN/EE 454 Spring2020 ***** SAMPLE QUESTIONS MIDTERM 2 *******
8
Question 6, Estimating Image Transformations (10 pts)
A) what is the minimum number of point correspondences we would need to be able to
solve for the parameters of this type of transformation? Explain why?
B) Assume we are given a set of N point correspondences (xi,yi)à (xi’,yi’), some of
which may be grossly incorrect. Briefly outline how you would use RANSAC to divide
them into a set of inliers and outliers. Use back of page if you need more space.
Consider a small angle approximation to the Euclidean transformation:
where the matrix on the right is a new form of transformation with parameters a, tx and ty.
For the following questions, we will explore transformation matrices of this form.
3 dof (a,tx,ty). Need ceil(3/2) = 2 point correspondences
set global inlier count = 0
Loop N times
select 2 point correspondences at random
compute a,tx,ty from that set using least squares
map all other points (xj,yj) by that transformation to get (xpred,ypred)
for each (xi’,yi’) that is “close enough” to (xpred,ypred)
increment inlier count by one
if inlier count is greater than the global one, update the global inlier count
End loop
we now have the largest set of inliers found. Use least squares to estimate a,tx,ty using
all the correspondences in that inlier set
CMPEN/EE 454 Spring2020 ***** SAMPLE QUESTIONS MIDTERM 2 *******
9
Question  7.  Homographies (10  pts)
The  image  below  shows  the  Renaissance  painting  “Flagellation” by  Piero  della Francesca.        
To  the  right  is  a  “top-­down” view  of  a  tile  pattern  on  the  floor,  derived  by  researchers  who  were  
studying  the  painting.    Explain,  step-­by-­step,  how  you  would  produce  this  top-­down  image  
using  matlab and  any  routines  we  have  discussed  during  this  course.
(I’m  looking  for  pseudocode  here,  not  a  full  matlab program)
Choose 4 points p1,p2,p3,p4 on the corners of the floor tile pattern
we want to unwarp.
Generate 4 points that form a square. (e.g. q1=(0,0),q2=(0,L),
q3=(L,0), q4=(L,L))
Set up least squares problem to estimate homography given four
point correspondences. Solve x = A\b where A is 8x8 and b is 8x1.
Form 3x3 homography matrix by filling in h11,...,h23 from the
solution vector x, and set h33 =1.
For each pixel in unwarped output image (i=1:L, j=1:L) use inv(H)
to determine where it comes from in the original image, and copy
that color to the output image. [alternative answer: Use interp2 in
matlab to fill in output image from input image and the estimated
homography matrix]
CMPEN/EE 454 Spring2020 ***** SAMPLE QUESTIONS MIDTERM 2 *******
10
Question 8. Image Stabilization.
You are designing software for tracking a vehicle from a moving aircraft. As a first
step for tracking, you want to try to determine which pixels are likely to belong to the
vehicle and which belong to the background, based on motion vectors measured from
matching corners between two frames. For example, given the image on the left,
which is one frame in a video sequence, you would like to produce a data
representation similar to the one shown on the right, where green pixels are likely to
be background, red are likely to be vehicle (ignore the blue vectors for this question).
Explain briefly how you would accomplish this task.
find harris corners in each frame. hypothesize correspondences via
NCC on image patches centered at each corner. Now use RANSAC
to determine inlier versus outlier correspondences. Let’s assume an
affine transformation model for the background. We need 3
hypothesized correspondences to compute an affine transformation.
RANSAC repeatedly selects 3 correspondences, computes an affine
transformation, then maps all corners from one image to the other
using the transformation. Corners that map “close” to their
corresponding points are counted as inliers. The random sampling
process repeats N times (say 1000), and at the end, we take the set
of inliers with the largest size as the final inlier set (green vectors in
above image), and the rest as the outlier set (red vectors). This
assumes the object is smaller (fewer corners on it) than the
background scene, otherwise the inliers are from the object and the
outliers are from the background.

essay、essay代写