Lizhi(Gary) Yang
Here are the photos I shot for the project:
First I define the 4 points in each image with the ginput function of matplotlib. Then I construct the A matrix and b vector in order to solve a least-squares problem with the form Ah=b for the unknowns in the homography matrix, where for one point:
A=[[x2, y2, 1, 0, 0, 0, -x1x2, -x1y2].After I get h, I reshape it into a 3 by 3 matrix and the last element is 1. The homography matrix is as follows, where H is the result of the least squares.
[[H[0], H[1], H[2]],I used my phone and borrowed a friend's device to record the flow of the water fountain. On the left are the original videos and on the right is the mosaic. I handheld the devices so the video is not that stabilized.