## Description

1 [30 points] Fundamental Matrix

In this question, you will explore some properties of fundamental matrix and derive a minimal parameterization for it.

(a) [10 points] Show that two 3 × 4 camera matrices M and M′ can always be reduced to the following

canonical forms by an appropriate projective transformation in a 3D space, which is represented by

a 4 × 4 matrix H. Here, we assume eT

3 (−A′

A−1b + b′

) ̸= 0, where e3 = (0, 0, 1)T , M = [A, b] and

M′ = [A′

, b′

].

Note: You don’t have to show the explicit form of H for the proof.

(Hint: The camera matrix has rank 3.)

Mˆ =

⎡

⎣

1000

0100

0010

⎤

⎦ and Mˆ ′ =

⎡

⎣

a11 a12 a13 b1

a21 a22 a23 b2

0 0 0 1

⎤

⎦

(b) [10 points] Given a 4 × 4 matrix H representing a projective transformation in a 3D space, prove that

the fundamental matrices corresponding to the pairs of camera matrices (M, M′

) and (MH, M′

H) are

the same.

(c) [10 points] Using the conclusions from (a) and (b), derive the fundamental matrix F of the camera

pair (M, M′

) using a11 , a12 , a13 , a21 , a22 , a23 , b1 , b2. Then use the fact that F is only defined

up to a scale factor to construct a seven parameter expression for F. (Hint: The fundamental matrix

corresponding to a pair of camera matrices M = [I | 0] and M′ = [A | b] is equal to [b]×A)

Refer to HZ pg. 581 for expansion to notation: [b]×.

2 [10 points] Epipolar Geometry

Given l and l

′ are epipolar lines corresponding to points x and x′ in two images, and k is any line not passing

through the epipole e, then show that l and l

′ are related by l

′ = F[k]×l.

Refer to HZ pg. 581 for expansion to notation: [k]×.

1

3 [60 points] Programming Assignment

3.1 Fundamental Matrix

This programming assignment is concerned with the estimation of the fundamental matrix from point correspondences. Implement both the linear least squares version [20 points] of the eight-point algorithm and

its normalized version [10 points] as proposed by Hartley. In both cases, enforce the rank-two constraint

for the fundamental matrix via singular value decomposition.

The data for this assignment can be found in the zipped file. The zipped file contains two datasets. For each

dataset, you will find the files

pt 2d 1.txt

pt 2d 2.txt

image1.jpg

image2.jpg

pt 3d.txt

The first two of these files contain matching image points (in the following format: number n of points

followed by n pairs of floating-point coordinates). The two remaining files are jpeg versions of the images

where the points were found. You may use the file readTextFiles.m to read in the data from 2D files. You

may also choose to write your own function to read files.

You must turn in:

• An algorithmic break-down of the process.

• A copy of your code

• For both methods and both datasets, the average distance between the points and the corresponding

epipolar lines for each image, as well as a drawing similar to Figure 10.4 in the PFs book showing the

epipolar lines and the feature points for each image pair.

3.2 Stereo Rectification

[30 points] Using the same dataset, and the function you wrote for problem 3.1, perform image rectification

on the two images. While choosing the matching transform to be applied on the image, make sure the

algorithm minimizes the distance error between transformed pixels.

You must turn in:

• An algorithmic break-down of the process

• A copy of your code

• The H transforms for both images

• Error. You may report the distance error between all transformed pixels.

2