\[ \begin{bmatrix} x' \\ y' \\ w' \end{bmatrix} = H \begin{bmatrix} x \\ y \\ 1 \end{bmatrix} \]
where H is an arbitrary 3 x 3 matrix,\[ H = \begin{bmatrix} h_{00} & h_{01} & h_{02} \\ h_{10} & h_{11} & h_{12} \\ h_{20} & h_{21} & 1 \end{bmatrix} \]
To solve for the 8 unknowns, we set up a linear system of n equations of the form Ah = b. These can be constructed using our coordinates:\[ (h_{20}x + h_{21}y + h_{22})x' = h_{00}x + h_{01}y + h_{02} \] \[ (h_{20}x + h_{21}y + h_{22})y' = h_{10}x + h_{11}y + h_{12} \]
Thus, given im1_pts and corresponding im2_pts, the computeH function gives a homography matrix that recovers the transformation. In this first part, the corresponding points are found using a mouse-clicking interface. I labeled the following images, which were taken on my phone.
Image 1 |
Image 2 |
Image 1 (labeled) |
Image 2 (labeled) |
Image 1 |
Image 1 Warped |
The Economist |
The Economist (frontal-parallel) |
Costco |
Costco (frontal-parallel) |
Image 1 |
Image 2 |
Mosaic |
Fire Trail 1 |
Fire Trail 2 |
Mosaic |
Tyndall Effect 1 |
Tyndall Effect 2 |
Mosaic |
harris
package provided by staff, I was able to find the Harris corners for each image.
Indoor 1 (Harris Corners) |
Indoor 2 (Harris Corners) |
Indoor 1 (ANMS) |
Indoor 2 (ANMS) |
Indoor 1 (ANMS) |
Indoor (Mosaic) |
Indoor (Auto-Stitching) |
Indoor (Manual) |
Trail 1 (Harris Corners) |
Trail 2 (Harris Corners) |
Trail 1 (ANMS) |
Trail 2 (ANMS) |
Trail (Matches) |
Trail (Mosaic) |
Trail (Auto-Stitching) |
Trail (Manual) |
sky 1 (Harris Corners) |
sky 2 (Harris Corners) |
sky 1 (ANMS) |
sky 2 (ANMS) |
sky (Matches) |
sky (Mosaic) |