Here are the images I took inside and outside:
By following the formula provided, I was able to take out a 3x3 Homography matrix for each pair of the images.
I used cv.remap to basically warp a source image to destination image and use cv2.Addweight to set original image to 0 and destination image to 1.
By hardcoding points on the book/tea box and the wall behind them, we are able to change perspective (ie rectify images as per our want!)
By increasing the sizes of of the output images, and laying the warped 2nd image over the actual, we are able to create a beautiful mosaic. Iti s a little blurry because it is difficult to overlap points exactly in such a large image size. I'm sure if we did this automatically the result wouldn't be as blurry.
That making panoromic style pictures is quite a bit of work, and involves a lot of mathematical magic.