Line | Angle Before (cos) | Angle After (cos) |
---|---|---|
Line 1 | 0.99214 | 0.99999 |
Line 2 | 0.9997 | 0.99995 |
In order to perform affine rectification, I used 4 line correspondences, determined from 8 points where every consecutive pair of points defined a line. Since parallel lines intersect at the line at infinity, I crossed the lines (l1 x l2) determined from the cross product of each point pair (e.g. l1 = p1 x p2) to determine the intersection point at infinity for 2 line pairs. This gave 2 points on the line at infinity in the image's current projection, and this was sufficient to determine the line's current equation again using cross product of th two points. Once this was determined, I defined the homography that mapped the line at infinity [0, 0, 1] to the current line, and this was H up to some affine transformation, since the homography for lines is the inverse of the homography for points.
Line | Angle Before (°) | Angle After (°) |
---|---|---|
Line 1 | 0.99987 | 1.00000 |
Line 2 | 0.99672 | 0.99980 |
Line | Angle Before (°) | Angle After (°) |
---|---|---|
Line 1 | 0.98784 | 0.9997 |
Line 2 | 0.98459 | 0.9999 |
Line | Angle Before (°) | Angle After (°) |
---|---|---|
Line 1 | 0.9868 | 0.9999 |
Line 2 | 0.99871 | 0.9999 |
Line | Angle Before (cos) | Angle After (cos) |
---|---|---|
Line 1 | 0.99284 | 0.9999 |
Line 2 | 0.9958 | 0.99955 |
Line | Angle Before (cos) | Angle After (cos) |
---|---|---|
Line 1 | 0.47730 | 0.2983 |
Line 2 | 0.3818 | 0.2242 |
To perform metric recitification, I recovered the degenerate circle conic in the affinely rectified image from the previous step. To do so, I used the premultiplied form of lines m and l that were known to be orthogonal in the original images, and since their dot product "through" the degenerate conic must be 0 in the warped image, I used the equation c1l1m1 + c2(l1m2 + l2m1) +c3l2m2 = 0 as a linear constraint for at least 4 orthogonal pairs of lines per image. I stacked these constraints into a matrix and performed SVD to extract the null vector (c1,c2,c3) that best satisfied these equations (by minimizing the constraints). Then, I was able to construct the instrinsic matrix KK^T = [[c1, c2], [c2, c3]] from rearranging the vector into its matrix representation, and by performing SVD again on this symmetrix matrix, I extracted K, which I proceeded to invert and transform to get the final similarity homography.
Line | Angle Before (°) | Angle After (°) |
---|---|---|
Line 1 | -0.1152 | -0.1974 |
Line 2 | -0.0616 | -0.1410 |
Line | Angle Before (°) | Angle After (°) |
---|---|---|
Line 1 | 0.70466 | -0.10602 |
Line 2 | -0.5693 | -0.1740 |
Line | Angle Before (°) | Angle After (°) |
---|---|---|
Line 1 | 0.19963 | 0.15043 |
Line 2 | -0.1080 | -0.3189 |
Line | Angle Before (°) | Angle After (°) |
---|---|---|
Line 1 | 0.5980 | -0.0741 |
Line 2 | 0.6325 | -0.0226 |
For every point correspondence between p1 and Hp2, I constructed two premultiplied linear constraints in order to represent the known constraint the p1 x Hp2 = 0. To do this, I used the matrix equation given on page 89 of MVG by Hartley and Zisserman. After stacking these linear constraints into a matrix, I performed SVD decomposition to extract the 9x1 vector h, which I rearranged into the final matrix H, and used this transformation to remap the each point p2 to its location p1 in the destination image.