EECS 442 Midterm Exam Panoramic Imaging Problem

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment

Description

5/5 - (5 votes)

1 [40 points] Panoramic Imaging Problem
Assume that we have two cameras with camera matrices M1 and M2
M1 = K1[R1 T1] , and M2 = K2[R2 T2],
where
K1 = K2 = K
R1 = I = Identity matrix
R2 = R
T1 = T2 = [0 0 0]T
Suppose that the cameras generate image 1 and 2 , respectively, as shown in the figure below, where
p
1, p
2, p
3, p
4 and p1, p2, p3, p4 are corresponding points across the two images.
(a) [10 pt ] Similarly to homework 3, prove that the homographic transformation H defined by p
1, p
2, p
3, p
4
and p1, p2, p3, p4 can be expressed as H = KRK−1.
(a) Image 1 (b) Image 2
1
(b) [1 0 pt ] Do N > 3 corresponding points necessarily need to belong to the same planar surface in 3D
in order for the above result to be true? Justify your answer.
(c) [1 0 pt ] Images taken under the above camera configurations give rise to a set of “panoramic” images.
Show that it is possible to estimate the internal matrix K and external parameter R using the H.
(d) [1 0 pt ] If we change, T2 to t = [tx ty tz]
T , then find the homography induced by a plane which is
defined by ZT X = 0 with Z = [vT 1]T . Explain the derivation.
2 [30 points] Computing H
Write a function Homography that takes a set of at least 4 image point correspondences between two images
(manually selected) and returns an estimate of the homographic transformation between the images. Use
the DTL algorithm to compute the homography.
What to return in this problem:
• Your code for the function Homography with comments.
• Numerical values for H if the point correspondences are as in file 4points.txt (Take point correspondences from 4points.txt file which can be read using readPoints.m function).
3 [30 points] Removing Outliers
Suppose an algorithm is available to compute feature correspondences between the two images above. Point
correspondences are obtained from a state-of-the-art feature matching algorithm and are available in the file
200points.txt. You can read this file using readPoints.m file. (See README for details)
Some of these correspondences are incorrect with an outlier population of roughly 12% (out of 200 point
correspondences, 24 are outliers)
(a) [5 points] Use the algorithm in problem 2 to compute H by using all the feature correspondences.
Because of the outliers, the computation of H will be unreliable. Is there a way to fix this issue if you
want to stick with a least square fitting method?
(b) [25 points] Use RANSAC to compute H and to automatically detect the outliers. You may refer to
[HZ or Wikipedia] for implementation details. Perform as many iterations (k) as needed in order
to guarantee that algorithm selects a sample set with inliers only with probability p=0.95 You may use
the formula below (w is the probability that all n points are inliers) :
k = log(1 − p)
log(1 − wn)
What to return in this problem:
• Your code with comments.
• Numerical values of H given by the DTL algorithm using all the correspondences.
• Two original images on top of which you plot the correct point correspondences using a green-cross
mark.
• The same two images where you plot the wrong image point correspondences between two images using
a red-circle mark. (See a demo in ex output.png)
2
n
• A text file (generated by your code) where you report the last N iterations of RANSAC. At each
iteration you need to print out a line reporting:
– Iteration number.
– Number of outliers.
– Fitting error.
• Discussion of your results.
Report the line when RANSAC finds an outlier set of minimal cardinality (or, inlier set of max cardinality).
This is the solution reached by the algorithm.
[Bonus 5 Pt] Solving the Image Panorama Problem
Consider the same cameras as in problem 1. Using the results in problem 1, write a computer program
that estimates the internal matrix K and external parameter R using the H that is estimated in problem 3.
(Note: unlike in homework 3, do not use vanishing points/lines to estimate K and R.)
You must return:
• An outline of the algorithm that you are using to compute R and K.
• The source codes.
• The numerical values of K and R.
• Comments about your results.
3