16-822 Geometry-based Methods in Vision

Assignment 1: Projective Geometry and Homography

Zihan Wang (zihanwa3), Fall 2024

Q1. Affine Rectification

Input imageAnnotated parallel lines on input imageAffine-rectified image

Held-out Test Lines and Metrics

Test lines on input imageTest lines on affine-rectified imageMetrics
Before: [0.9928, 0.9958]
After: [0.9999, 0.9995]
Before: [0.9878, 0.9846]
After: [0.9998, 1.0000]
Before: [0.8964, 0.9575]
After: [1.0000, 1.0000]
Before: [0.9883, 0.9996]
After: [1.0000, 1.0000]
Before: [-0.9984,-0.9811]
After: [-0.9988 -0.9873]

We performed affine rectification by annotating two pairs of parallel lines and computing the line at infinity.

Q2. Metric Rectification

Input image Annotated perpendicular lines on input image Annotated perpendicular lines on affine-rectified image Rectified image

Held-out Test Lines and Metrics

Test lines on input image Test lines on metric-rectified image Metrics
Before: [0.1466, 0.3993]
After: [0.0000, 0.0000]
Before: [0.6686, -0.0448]
After: [-0.0000, -0.0000]
Before: [-0.2527, 0.0882]
After: [-0.0000, 0.0000]
Before: [0.2039, 0.3885]
After: [0.0000, -0.0000]
Before: [-0.0244, 0.4472]
After: [-0.0000, -0.0000]
First, we apply an affine transformation to the image using a predefined homography matrix (obtained from the previous step). This removes projective distortions while preserving metric distortions such as scaling and shearing. Next, we identify at least two pairs of perpendicular lines in the affine-rectified image. These line pairs are used to establish the necessary constraints for metric rectification. Using these line equations, we formulate a constraint system for the dual conic, which represents the circular points. Solving this system allows us to determine the dual conic matrix. With it known, we construct the conic matrix. We then perform Singular Value Decomposition (SVD) on the conic matrix to compute the final metric rectifying homography. Finally, we apply the homography to the affine-rectified image, resulting in a fully metric-rectified image. Q3. Planar Homography from Point Correspondences
Normal imagePerspective imageAnnotated corners in perspective imageWarped and overlaid image

The algorithm computes the transformation between the source and target images using four-point correspondences. Each pair of corresponding points generates two equations in the form and we solve the system of linear equations using Singular Value Decomposition (SVD) .