\[ \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 |

- Interest Point Detection (with single-scale Harris corners)
- Adaptive Non-Maximal Suppression (ANMS)
- Feature Descriptor Extraction
- Feature Matching
- Random Sample Consensus (RANSAC) for estimating homography

`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) |

- For each descriptor in the first image, we compute the distances to all descriptors in the second image.
- Then, we identify the 1-NN and 2-NN and calculate the ratio of the distance of the 1-NN to the 2-NN.
- If this ratio is below the specified threshold (0.7, as shown in the paper), the match is considered good and is added to the list.

## Indoor 1 (ANMS) |

- Select four feature pairs at random.

- Compute homography H.

- Compute inliers where
\[
dist(p_i',\textbf{H}p_i) < \epsilon
\]

- Keep largest set of inliers.

- Re-compute least-squares H estimate on all of the inliers.

## 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) |

Example 3: Sky

## sky 1 (Harris Corners) |
## sky 2 (Harris Corners) |

## sky 1 (ANMS) |
## sky 2 (ANMS) |

## sky (Matches) |

## sky (Mosaic) |