Part 1: Image Rectification

To rectify an image, I first compute the homography (projective transformation) between two sets of correspondences for the first and second image. For the first set of points, I used the object I am trying to rectify and for the second image, I chose a set of points representing the shape of that object from a head-on view. In my example, I rectified a receipt on the table by warping the shape of the first image to the plane of the head-on shape I want.

Original Image
Rectified to a Head-on View

Part 2: Blending Images Into a Mosaic

I took images from two different perspectives with the same center of projection. I want to blend my images into a panorama shot by warping all the images from different perspectives into the same image plane (center image). I do this with the similar method as the first part, except now I am warping corresponding points in the first perspective to the same points in the second. This will create a blended image with no seam, given that the exposure conditions and center of projection is the same. Here are my results:

Image 1
Image 2
Blended together
Manually Cropped

Image 1
Image 2
Blended and manually Cropped