Q1: Affine Rectification





Annotated images





Output images





Implementation
Find l∞′ by finding intersection of parallel lines on line at infinity and restoring to its canonical position:
Q2: Metric Rectification
Same as for Q1
Annotated images





Output images







Implementation
Find image of conic dual to circular points C∞⋆′ s.t. for images of perpendicular lines l′ and m′:
l′⊺C∞⋆′m′=0
Where
C∞⋆′=ab/2d/2b/2ce/2d/2e/2f
Using the affine rectification result from question 1, d=e=f=0:
C∞⋆′=ab/20b/2c0000
Expanding the polynomial represented by C∞⋆′:
ax12+bx1x2+cx22+dx1x3+ex2x3+fx32=0ax12+bx1x2+cx22=0
Solve for vector of coefficients based on constraints from perpendicular lines using SVD, then solve for homography from C∞⋆′ using SVD.
Q3: Planar Homography from Point Correspondences


Annotated images

Output images

Implementation
- Find homography H gives the following "projectively equal" relationship:
Hxi×xi′=0
- Reconstruct cross product as matrix multiplication for each of 4 point correspondences:
[0−w′x⊺−w′x⊺ 0y′x⊺−x′x⊺]h=0