Below are the images used for this project. I took images Street View 1 and Street View 2 in Queens, NYC for warping and mosaicing. These were done by standing firmly in the middle of the street and rotating my body about 30 degrees.
These images were not so interesting for rectification, so I used an image from a Egyptian restaurant in downtown Manhattan for that part.
Correspondence points were selected on both street view images (shown in green). These points were used to calculate the homography matrix.
The homography matrix H is calculated to map the coordinates from image 1 to image 2 via least squares. The matrix is shown below (rounded for visual pleasure).
For this situation it made the most sense to fix one image and shift the other to align the corresponding points. The second image was chosen to be fixed. The bounding box of the images is also expanded to accomodate the other image.
Image rectification on the street would be a little boring, so I chose a more interesting photo. This image is from an Egyptia restaurant in SoHo. On the ceiling are a series of LED signs. I thought it would be cool to rectify that section to get a clearer view of them. I annotated the corner of that square sign with the hexagonal pattern.
The green points correspond to the sign corners, and the orange correspond to a manually designated square of with lengths corresponding to the longest distance between the green points.